blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
132
path
stringlengths
3
236
src_encoding
stringclasses
29 values
length_bytes
int64
8
7.94M
score
float64
2.52
5.72
int_score
int64
3
5
detected_licenses
listlengths
0
142
license_type
stringclasses
2 values
text
stringlengths
8
7.94M
download_success
bool
1 class
572106aad21d8281bec5adaabc0a88ac65f85db5
JavaScript
mytrofanov/Cube
/js/main.js
UTF-8
545
3.140625
3
[ "MIT" ]
permissive
let text = 'About me:' let aboutMeItems = 'Budding Front-end Software Engineer ' function animateText(id, text, i) { document.getElementById(id).innerHTML = text.substring(0, i); i++; if (text!=aboutMeItems) { if (i>text.length) { id='about_me_items', text=aboutMeItems, i=0 } } setTimeout("anim...
true
52fe6a3dc9e2409de39368da860abfd0b57fd683
JavaScript
zhaobanxian/blog_react
/forreacttest/listtest.jsx
UTF-8
1,016
2.6875
3
[]
no_license
import { log } from "util"; var datalist = [ { name: 'robot', sex: 'unkonw' }, { name: 'robot', sex: 'unkonw' }, { name: 'robot', sex: 'unkonw' }, { name: 'robot', sex: 'unkonw' }, { name: 'robot', sex: ...
true
1dd2d602e58b06ddec3c9655a3350d7ac3e84069
JavaScript
davidhk21/dailys
/tests/Backtracking.test.js
UTF-8
449
2.9375
3
[]
no_license
const letterCombinations = require('../Backtracking/LetterCombinationsOfAPhoneNumber.js'); describe('Letter Combination of a Phone Number', () => { test('should get all of the correct combinations for given digits', () => { expect(letterCombinations('23')).toEqual(["ad","ae","af","bd","be","bf","cd","ce","cf"]);...
true
5815a7deeb39177ebc680a09b5cb82165eb8dbed
JavaScript
Code-Institute-Submissions/simon-random-project-2
/assets/js/calc.js
UTF-8
9,493
3.671875
4
[ "MIT" ]
permissive
/* Below is the basic logical flow of the game: Create a button object for each button image Choose a number of random colours to create a sequence Play the sequence to the player Allow the player to select a sequence If the player gets a sequence wrong then reset the level. If the player matches all sequenc...
true
13de9269985266282c488409661ba37318690ac8
JavaScript
zhouyiw1/webpage
/InClassAssignment5/sketch.js
UTF-8
1,292
3.15625
3
[]
no_license
let lemonList=[]; let orangeList=[]; let watermelonList=[]; let xposList=[]; let yposList=[]; let ypos=0; let yspeedList=[]; function preload(){ for(let i=0;i<30;i=i+1) {lemonList[i] = loadImage('https://i.imgur.com/d8PORoY.png'); } for(let j=0;j<30;j=j+1) {orangeList[j] = loadImage('https://i.imgur...
true
d972309c17688410dc5f1cdc77ddd481452d1100
JavaScript
kevinjanada/simple-3d-model-viewer
/src/ModelViewer/Shapes/Cross/index.js
UTF-8
717
2.546875
3
[]
no_license
import * as THREE from 'three' class Cross extends THREE.Mesh { constructor(_size, _color) { const width = 0.05 const height = 0.1 const depth = 0.4 const size = { width: width * _size, height: height * _size, depth: depth * _size, } let color = _color ? _color : 0x00ff00 ...
true
20024e6ee441658d96a362768410aae703945870
JavaScript
apismenny/apismenny.github.io
/woco/petrovich.js
UTF-8
9,081
3.03125
3
[]
no_license
(function(exports) { /** * Constructor * @param {String|Object} lastName Either a last name of a person, an object with fields 'lastName', 'firstName' and 'middleName' (only argument), or gender (only argument) * @param {String} firstName First name, optional. * @param {String} middleNam...
true
d4d03e851ceef881e483a97d990b7c9751b19f78
JavaScript
sammndhr/algorithms
/leetcode/old/350_intersection_of_two_arrays.js
UTF-8
1,464
3.765625
4
[ "MIT" ]
permissive
/* Given two arrays, write a function to compute their intersection. */ /** * @param {number[]} nums1 * @param {number[]} nums2 * @return {number[]} */ //Solutin using hash map const arrToHash = (arr) => { let res = {}; for (let i = 0; i < arr.length; i++) { res[arr[i]] === undefined ? res[arr[i]] = 1 : r...
true
2931794fa0e21dcdc2139670d26a9d4ba4e617be
JavaScript
Kirragi/test-task
/js/slider.js
UTF-8
6,671
2.9375
3
[]
no_license
let slides = document.querySelectorAll('.slides-item'); const prev = document.querySelector('.offer__slider-prev'), next = document.querySelector('.offer__slider-next'), slid = document.querySelector(".dot_menu"), indicators = document.createElement('ol'), dots = []; let slider = [], idRight = 1, ...
true
d2f0bf7c3e7256e56f77b6254c59f6ec40ee70fd
JavaScript
PaolaGaray/katas
/6kyu/BalanceTheArrays.js
UTF-8
774
4.4375
4
[]
no_license
/* https://www.codewars.com/kata/58429d526312ce1d940000ee/javascript Instructions: Check that the two provided arrays both contain the same number of different unique items, regardless of order. For example in the following: [a,a,a,a,b,b] and [c,c,c,d,c,d] Both arrays have four of one item and two of another, so bala...
true
a4a8b85ae450a2779f99ed9b6f73015ac61afafd
JavaScript
TungNguyen1706/todoappredux.github.io
/src/reducers/tasks.js
UTF-8
2,252
2.734375
3
[]
no_license
import * as types from './../constants/ActionTypes'; import { v4 as uuidv4 } from 'uuid'; let findIndex = (tasks,id) =>{ let result = -1; tasks.forEach((task,index)=>{ if(task.id === id){ return result = index; } }) return result; } let data = JSON.parse(localStorage.ge...
true
0429e6806d222b5bbff5b05a6f889cc1a9fa30b1
JavaScript
gribelgrubel/dev
/resources/bouncing_type_20-06-30_old.js
UTF-8
32,739
3.171875
3
[]
no_license
// Bouncing, animated Type // Frederik Engelbrecht, 2020, für den Rundgang Finkenau SoSe 20 // Based upon https://www.html5canvastutorials.com/advanced/html5-canvas-bouncing-balls/ $(document).ready(function () { var font = new FontFaceObserver('PX Grotesk', {}); font.load().then(function () { console.log('F...
true
dcd8d79a454cba2a77095175067f021036d77687
JavaScript
varCharles/LAEP
/films/scripts/fb-main.js
UTF-8
4,289
2.828125
3
[]
no_license
//global app var var app = {} app.ENTER_KEY = 13; //Create a bare bone model app.Film = Backbone.Model.extend({}) app.Actor = Backbone.Model.extend({}) app.FilmDetail = Backbone.Model.extend({}) //Create collection that is links the model to the 'storage' app.FilmsCollection = Backbone.Collection.extend({ model:...
true
c4987ed069420a5d80efcb50a819ba36261dbc36
JavaScript
asifMushtaq1/burger-builder-application
/src/store/reducers/burgerBuilder.js
UTF-8
3,247
2.8125
3
[]
no_license
import * as actionTypes from '../actions/actionTypes'; import {updateObject} from '../../shared/utility'; const initialState = { ingredients : null, totalPrice : 4, error : false, building : false } const INGREDIENT_PRICE = { salad : 0.5, bacon : 0.7, cheese : 0.5, meat : 8.5, } const ingredientsAd...
true
bbaffea55ec7508acfe18a3fa32b4359590d4d79
JavaScript
Philip-spb/JavaScriptEducation
/js/practice4.js
UTF-8
3,801
3.921875
4
[]
no_license
/* Задание на урок: 1) У нас уже есть рабочее приложение, состоящее из отдельных функций. Представьте, что перед вами стоит задача переписать его так, чтобы все функции стали методами объекта personalMovieDB Такое случается в реальных продуктах при смене технологий или подхода к архитектуре программы 2) Создать метод...
true
f50e9d9d639da988ae2d1b3c96a22cb29c12941b
JavaScript
luiscarbonell/carrot
/src/architecture/group.js
UTF-8
12,146
3.171875
3
[ "MIT" ]
permissive
module.exports = Group; var methods = require('../methods/methods'); var config = require('../config'); var Layer = require('./layer'); var Node = require('./node'); /** * A group instance denotes a group of nodes. Beware: once a group has been used to construct a network, the groups will fall apart into individual n...
true
39367112625cc87d65d7be6da1378e2b4e7701e4
JavaScript
CodeDrivenMitch/curiculum-vitae
/client/terminal/terminal.js
UTF-8
2,108
2.5625
3
[]
no_license
var inputHolderElement, cursorElement; Meteor.startup(function () { // Session vars Session.set('content', []); Session.set('input', ''); Session.set('typing', false); // Jquery elements cursorElement = $('#cursor'); inputHolderElement = $('#inputHolder'); // Initialize cursorEle...
true
4825f4140c5ac7d4939063aefbc4ee98ef67ac62
JavaScript
ShivamBhadula/FCC-Solutions
/Javascript And Algorithms/Basic JavaScript/return-a-value-from-a-function-with-return.js
UTF-8
90
2.71875
3
[]
no_license
function timesFive(a1) { return a1*5; } timesFive(5); timesFive(10); timesFive(0);
true
f2e7638ea0cec534a63e1266ee01b103aa536e6d
JavaScript
nuhuxi/hot-or-cold
/js/app.js
UTF-8
4,299
3.609375
4
[]
no_license
$(document).ready(function () { var randomNumber = '', numGuesses = 0, inputString, theGuess, isItDecimal, userJustWon = false, inputIsValid = false; console.log('Resetting game at the top of the page'); resetGame(); /*--- Display information modal box ---*/ $(".what").click(function () { $(...
true
d5b519aeb06eea44bd8cf1e38c70d724faa641b8
JavaScript
jbataille-git/frontenddev2
/15_js_dom/15_04_browser_events/app.js
UTF-8
980
3.25
3
[]
no_license
// add event listeners // eerst zorgen dat we erbij kunnen // dit is code voor op de prompt /* var h2 = document.querySelector('#book-list h2'); h2.addEventListener('click', function(e) { console.log(e.target); console.log(e); console.log('de shiftkey is', e.shiftKey); }) */ var btns = document.querySe...
true
f70d6f9afb1be7f430e99c3ea59f6b36f30a39b6
JavaScript
iceeeberg/Calculator
/script.js
UTF-8
1,903
3.6875
4
[]
no_license
const displayElement = document.getElementById('input'); let firstNumber = ""; let secondNumber = ""; let operand = ""; document.querySelectorAll('.number').forEach((numberButton) => { numberButton.addEventListener('click', (e) => { if (!operand) { firstNumber += e.target.textContent; displayElemen...
true
af6ccb2ad5cd4dd4cbeb39029aaf20e1bcacc406
JavaScript
Valeripetrukhina/external-courses
/src/ex3_js-objects-part1/task-03.js
UTF-8
132
2.546875
3
[ "MIT" ]
permissive
function strObj(str, obj) { if (obj.hasOwnProperty(str) === true) { return true; } return false; } module.exports = strObj
true
6dcf4c165fe4299c06bf16cfc2982895b13c482d
JavaScript
wanchenyang521/phpZXShop
/js/validation.js
UTF-8
1,820
2.859375
3
[]
no_license
// JavaScript Document function check(){ var yhm=document.form1.yhm.value; if(yhm=="") { alert("用户名不能为空"); document.form1.yhm.focus(); return false; } var checkyhm=/^[a-zA-Z]\w{5,19}$/; if(!checkyhm.test(yhm)){ alert("用户名应由6-20位字母、数字或下划线组成,字母开头"); document...
true
9daf4eaebef93a7d6e2f5243f0bcdb87f6d1f78e
JavaScript
scoppen/CPF
/js/utils.js
UTF-8
2,277
2.890625
3
[]
no_license
/** * @name Utility functions for CPF * @version 0.5 [July 14, 2012] * @author Scott Coppen * @fileoverview * Basic utility functions used for CPF (Content Presentation Framework) */ /* * Copyright 2012 Scott W Coppen * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this ...
true
dbf1deed0e5981c6d339666423598f30556b989c
JavaScript
utkrisht3108/Vmeet
/public/src/room/users.js
UTF-8
448
2.546875
3
[ "MIT" ]
permissive
attendies.addEventListener('click', () => { partOverlay.style.visibility = 'visible'; participantsHead.innerHTML = 'Number of Participants: ' + participants.length; participantsCont.innerHTML = ''; participants.sort(); for (let i = 0; i < participants.length; i++) { participantsCont.innerHTML += `<div cl...
true
e28f41cbb5a7a0afafcf9aab296a4b6953a4a20c
JavaScript
nintichance/algorithms---such
/is-alpha-fb/isAplhaSorted.js
UTF-8
895
3.84375
4
[]
no_license
const isAlph = (words, alph) => { //['c', 'b', 'a', 't'] const alphaLookup = new Map() alph.forEach((char, index) =>{ alphaLookup.set(char, index) }) for (let i = 0; i < words.length; i++) { // if any of them are false I want to return let curr, prev if (i > 0) { curr = words[i] prev =...
true
e3aa1b436b1b647cc33fac22ace40335369bf6c0
JavaScript
Andy82/bingo_game
/models/game.js
UTF-8
2,186
2.796875
3
[]
no_license
r = require('mersenne'); var config = require('../config'); var log = require('../lib/log')(module); Stopwatch = require('./stopwatch.js'); function Game(){ this.numCount = config.get("maxNumbers"); this.numMaxValue = 9; this.numArray = []; this.bBingoArray = []; }; Game.prototype.generateNumbers = function() { ...
true
cee302ae3652a17b88a31a6ed25878fe57d39286
JavaScript
rakafaProg/ajaxAnimals
/ajax.js
UTF-8
1,173
3.21875
3
[]
no_license
// get template var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { // get data let containerHTML = document.getElementById("animalsContainer"); getData(function(data) { console.log(data); let animalsArray...
true
fd7aa0a1d77388f6177a32011ecc63bbddccf287
JavaScript
kscherling/fp
/src/lib/deepMerge.js
UTF-8
427
2.640625
3
[]
no_license
import curry from './curry' const cloneObj = obj => ({ ...obj }) const deepMerge = curry((_target, _source) => { const source = cloneObj(_source) const target = cloneObj(_target) for (let key of Object.keys(source)) { if (source[key] instanceof Object) { Object.assign(source[key], deepMerge(target[ke...
true
cae4d892db8a7a6881691989f89cd495cdd2a771
JavaScript
carrotofficial/csportfolio1819
/int2-checkpoints/loops.js
UTF-8
1,567
3.078125
3
[]
no_license
/* global draw ellipse rect p processing width height size */ var sketch = function(processing) {with(processing) {size(1000, 1000);background(255); // °º¤ø,¸¸,ø¤º°`°º¤ø Create Project Below This Line ø¤º°`°º¤ø,¸,ø¤°// background(200, 200, 200); var frame = 1; frameRate(1); draw = function() { // increment our ...
true
73a321d51cd157348ec1b470bfa4e77c6d66e525
JavaScript
darwintan/Digital-Training-Darwin
/01_Responsive Banner/dev/breakpoints.js
UTF-8
1,202
3.078125
3
[]
no_license
//Banner Breakpoints var breakPoints = [ { w:300, h:600, layout: layouts._1, animation: animation._1 }, { w:300, h:250, layout: layouts._2, animation: animation._2 }, { w:970, h:250, layout: layouts._3, animation: animation._3 }, ] //Calculate the decimal ra...
true
6751c26af3728441a1e09222c88b5f82a9261cc5
JavaScript
Omar-OC/local-library
/public/src/books.js
UTF-8
1,391
3.234375
3
[]
no_license
function findAuthorById(authors, id) { let foundAuthor = authors.find((author) => author.id === id); return foundAuthor } function findBookById(books, id) { let foundBook = books.find((book) => book.id === id); return foundBook } // This function below is the helper function that will be inserted into the par...
true
da311178b64bbca1a31d155f2515325d3cdbcad2
JavaScript
djackreuter/serbian-blog
/validation/register.js
UTF-8
1,464
2.703125
3
[]
no_license
const validator = require('validator'); const _ = require('lodash'); const validateRegisterInput = (data) => { let errors = {}; data.name = !_.isEmpty(data.name) ? data.name : ''; data.email = !_.isEmpty(data.email) ? data.email : ''; data.password = !_.isEmpty(data.password) ? data.password : ''; data.pass...
true
904c167bf554608657132cb6bcbd2d6f1354caa6
JavaScript
zhazhaxia/proxy-server
/test/proxy1.js
UTF-8
1,638
2.53125
3
[]
no_license
var http = require('http'), sys = require('sys'), url = require('url'); var http_server = http.createServer(function(req,res){ //代理重定向http://127.0.0.1:3000?url=http://qq.com // //console.log(req.url); // res.writeHead(200,'text/plain'); // res.end('hello world'); var b_url = url.parse(req.url,true); //con...
true
56b540b8b2a458a315a788eba6d5c115d7ed550e
JavaScript
YoheiTakada-p/JavaScript
/shootingGame/misc.js
UTF-8
3,559
3.375
3
[]
no_license
//misc.js その他、共通関数 //キャラクターのベースクラス class Charabase { constructor(snum, x, y, vx, vy) { this.sn = snum; this.x = x; this.y = y; this.vx = vx; this.vy = vy; this.kill = false; this.count = 0; } updata() { this.count++; this.x += this.vx;...
true
b242cc423c2c9b351e38bd4c972420f82a647120
JavaScript
rdalin82/rails_react_example
/app/assets/javascripts/components/views/questions/shared/hot_questions_list.es6.jsx
UTF-8
847
2.78125
3
[]
no_license
// Hot Questions List class HotQuestionsList extends React.Component { render () { const questions = this.props.questions.map(question=>{ return ( <li key={question.id} style={{marginBottom: '10px'}}> <HotQuestionsListItem question={question} /> </li> ); }); return...
true
6e181e8bde53f71535831c1e2fe02296b2966d6e
JavaScript
thelonious/kld-array-iterators
/test/testRandomIterator.js
UTF-8
1,507
3.109375
3
[ "BSD-3-Clause" ]
permissive
var RandomIterator = require('../lib/RandomIterator'); exports.testNothing = function(beforeExit, assert) { var iter = new RandomIterator(); assert.equal(false, iter.hasNext()); assert.equal(null, iter.next()); }; exports.testEmptyArray = function(beforeExit, assert) { var iter = new RandomIterator([...
true
929a18ab72a59497c233f35ad98bb69a4fd2be4b
JavaScript
AlexLeonNovak/goit-js-hw-07
/js/task-8.js
UTF-8
1,337
3.21875
3
[]
no_license
const refs = { number: document.getElementById('control-number'), btnRender: document.querySelector('[data-action="render"]'), btnDestroy: document.querySelector('[data-action="destroy"]'), boxesContainer: document.getElementById('boxes') } const DEFAULT_SQUARE_WIDTH = 30; let lastWidth = DEFAULT_SQUAR...
true
1ecefacf7e8894b935f3dd9958898fcfbb20dcc0
JavaScript
jlabedzki/lotide
/countLetters.js
UTF-8
733
3.828125
4
[]
no_license
//Creates a new object with the # of times a letter appears in a given string. const countLetters = (string) => { const results = {}; if (typeof string !== 'string') { return undefined; } for (const letters of string.toLowerCase()) { if (letters === ' ') { continue; } if (results[letters...
true
c5b10d7f9b0517510e4975a81bc646d9464ede35
JavaScript
Aleyboy/VaZeBot
/index.js
UTF-8
3,172
2.875
3
[]
no_license
const botconfig = require("./botconfig.json"); const Commando = require("discord.js-commando"); const bot = new Commando.Client(); bot.on("ready", async () => { console.log(`${bot.user.username} is online`); bot.user.setActivity("in the VaZe Dungeons") }); bot.on("message", async message => { if(m...
true
3e5422200c9167fa8d2f5f921de03e5eb81fbccf
JavaScript
alexburgos/rocker-form
/src/store/reducers/index.js
UTF-8
1,235
2.625
3
[]
no_license
import constants from '../constants/index'; const fieldsFromCache = JSON.parse(localStorage.getItem('formState')); const cachedCountries = JSON.parse(localStorage.getItem('countries')); const initialState = { validForm: false, errors: {}, personNumber: fieldsFromCache ? fieldsFromCache.personNumber : '', phoneNum...
true
43e015e9c2ef8a4ce286ee78a55737ab1fb9e170
JavaScript
supremeking23/v88-JS-Express-User-Dashboard
/src/my_module/utilities.js
UTF-8
1,071
2.6875
3
[]
no_license
// function validateEmail(input) { // if (/(^\w.*@\w+\.\w)/.test(input)) { // return true; // } else { // return false; // } // } module.exports = () => { return { validateEmail: (input) => { if (input && /(^\w.*@\w+\.\w)/.test(input)) { return true; } else { return false; } }, formError...
true
8ff710aec3be1fb62e44c17fa48239059e529058
JavaScript
siansrd/Munro_Bagger
/client/src/models/grid_ref.js
UTF-8
990
2.84375
3
[]
no_license
const baseGrids = require('./grid_base'); const GridRef = function(options){ this._letters = options.letters; this._eastings = options.eastings; this._northings = options.northings; Object.defineProperty(this, "letters", { get: function(){ return this._letters; } }); Object.defineProperty(this, "eastings"...
true
d4c7c4397660e3280e4fc59fd08704ed92c92ae6
JavaScript
zaoansijia/demos
/src/App.js
UTF-8
1,028
2.6875
3
[]
no_license
import React from 'react'; // import ReactDOM from 'react-dom'; import './App.css'; import './code/promise.js'; class App extends React.Component{ constructor() { super(); this.state = { count: 0 } } componentDidMount() { // 测试原生方法:手动绑定mousedown事件 // ReactDOM.findDOMNode(this).addEvent...
true
9aa552c3632cd1564b38201b0573c88ec3c8ca4f
JavaScript
felarof99/react-todo-app
/src/todo-list.jsx
UTF-8
757
2.53125
3
[]
no_license
var React = require('react'); var TodoListItem = require('./todo-list-item'); TodoList = React.createClass({ render: function(){ var todo_list = []; for(var key in this.props.todos){ this.props.todos[key].key = key; todo_list.push( <TodoListItem ...
true
5abe6bd40dd4f06af06c7f46e4e93dfc148cc077
JavaScript
ewilde1968/tantravalles
/model/database.js
UTF-8
2,889
2.6875
3
[]
no_license
/* * Database Utility Routes */ module.exports = Database; var mongoose = require('mongoose'), defaultObjects = require('./defaultObjects'), Item = require('./item'), Creature = require('./creature'), Encounter = require('./encounter'); var connected = false; function Database () { if( !connect...
true
20aa1b2f1c0bcaace6dc775a6a81caa6f34fa2e8
JavaScript
Dominik-Zajac/dominik-zajac.github.io
/scripts/app.js
UTF-8
2,398
2.515625
3
[]
no_license
// Preloader const preloader = document.getElementById('loading-page'); window.addEventListener('load', function () { preloader.style.display = 'none'; // Navigation ScrollReveal sr.reveal('nav .navbar-list', { distance: '30px', easing: 'ease-out', delay: '300', origin: 'top' }); }); // =====...
true
3447de44de261493124fb7eabbb2ad6f132fae01
JavaScript
mollie/Shopware6
/src/Resources/app/storefront/src_vendor/shopware-storefront-sdk/helper/String.js
UTF-8
903
2.828125
3
[]
no_license
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toUpperCamelCase = exports.toLowerCamelCase = exports.lcFirst = exports.ucFirst = void 0; function ucFirst(value) { return value.charAt(0).toUpperCase() + value.slice(1); } exports.ucFirst = ucFirst; function lcFirst(value) { r...
true
9d31fe15817f41916a887171991cdef15c9bb990
JavaScript
Shailseen/Food-Emotes
/src/App.js
UTF-8
1,360
3.15625
3
[]
no_license
import React, { useState } from "react"; import "./styles.css"; var emojiList = { "🥙": "Stuffed Flatbread", "🌯": "Burrito", "🫔": "Tamale", "🍡": "Dango", "🍩": "Doughnut", "🍘": "Rice Crackers", "🍢": "Oden", "🍜": "Steaming Bowl", "🍟": "French Fries", "🦞": "A Lobster", "🍱": "Bento", "🍤":...
true
9920c4e4ae0d254862edbc3cae1d83e3855f3c4d
JavaScript
enmeen/study
/nodejs/upFiles.js
UTF-8
673
2.6875
3
[]
no_license
"use strict"; var http = require('http'); var fs = require('fs'); var destinationFile, fileSize, uploadedBytes; http.createServer(function (request, response) { response.writeHead(200); destinationFile = fs.createWriteStream("new.md"); request.pipe(destinationFile); fileSize = request.headers['content-length'...
true
a154ea682c0154c4da68c78346b216bf78800b8b
JavaScript
FrancoCerquetti/francocerquetti.github.io
/src/pokedex/Pokedex.js
UTF-8
2,620
2.609375
3
[]
no_license
import { React, useState } from 'react'; import pokedexImg from '../assets/Pokedex.png'; import { Button, TextField } from '@material-ui/core'; import './Pokedex.css'; const Pokedex = ({ start, correctAnswer, userGuess, setUserGuess, guessButtonDisabled, nextPokemon, score }) => { const [started, setStarted] = us...
true
15991294f78d20c10947e12992286ab0b717d26b
JavaScript
Ifer33/HoT-7-TAJ
/Custom/Shorts/Short17.js
UTF-8
2,658
2.8125
3
[]
no_license
DMessage("Short17: start"); main(); DMessage("Short17: end"); function main() { CMessage("So tell me %PetName%... What do you want more right now?"); CMessage("Make your cock happy and have a big satisfying orgasm.."); let answer0 = getInput("Or make me happy and obey my every wish?"); while (!(answer0....
true
c09535286ee514d1f82a1cae44420a93db40da0f
JavaScript
vishnuteja/courseBuilder
/assets/js/activity-1.6.js
UTF-8
3,414
2.921875
3
[ "Apache-2.0" ]
permissive
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
true
ab3268f54e0b2edacf96920f8cd7a6d9cca8cee3
JavaScript
Zantosko/React-Chat-App
/server/routes/jwtAuth.js
UTF-8
2,468
2.65625
3
[]
no_license
const router = require("express").Router(); const { User } = require("../models"); const bcrypt = require("bcrypt"); const jwtGenerator = require("../utils/jwtGenerator"); const validInfo = require("../middleware/validInfo"); const authorization = require("../middleware/authorization"); //* Register Route router.post(...
true
719aa0cd5c44a7080810b75d019d0776d2328747
JavaScript
imachines/IMA-Interactive-Machine-Learning
/week11-prep/feature_extractor_classification/js/sketch.js
UTF-8
2,005
3.28125
3
[]
no_license
// aven le zhou: https://www.aven.cc // 2019.04 let featureExtractor, classifier; let video, tiger, chicken, stick; let label, ready2predict = false; let labels = []; // let opt = { // version: 1, // alpha: 1.0, // topk: 3, // learningRate: 0.0001, // hiddenUnits: 100, // epochs: 20, // numClasses: ...
true
4106d39fbb38f6f63ee5b26ed8894e2d42e8e13d
JavaScript
sysread/ts-skewheap
/dist/skewheap.spec.js
UTF-8
3,377
3.03125
3
[ "ISC" ]
permissive
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const skewheap_1 = __importDefault(require("./skewheap")); const chai_1 = require("chai"); require("moch...
true
c17a02659a466daac025516b7f7ff7b015aab2b5
JavaScript
ahtae/Practice
/Leetcode/Linked Lists/83.js
UTF-8
347
3.640625
4
[]
no_license
// 83. Remove Duplicates from Sorted List const deleteDuplicates = (head) => { let current = head; while (current && current.next) { if (current.val === current.next.val) { current.next = current.next.next; } else { current = current.next; } } return head; }; // Time Complexity: O(n)...
true
a0ce7f8d69a3da5a5e20a3f35baf925ad0daf754
JavaScript
GeorgiyBeloklokov/Social-Network-Samurai-JS
/src/redux/app-reducer.js
UTF-8
1,755
2.515625
3
[]
no_license
import {getAuthUserData} from "./auth-reducer"; const INITIALIZED_SUCCESS = 'INITIALIZED_SUCCESS'; let inicialState = { initialized: false }; const appReducer = (state = inicialState, action) => { switch (action.type) { case INITIALIZED_SUCCESS: return { ...state, initiali...
true
df5890b10ba3097d38a67a4237905d8f991310da
JavaScript
ryanjwatts/beachcoders
/instaclone/scripts/main.js
UTF-8
1,200
2.8125
3
[]
no_license
$().ready(() => { const signupContainer = $('.signup-container'); const loginContainer = $('.login-container'); $(loginContainer).hide(); $('.show-login').on('click', showLogin); $('.show-signup').on('click', showSignup); function showLogin() { $(signupContainer).hide(1); $(loginContainer).show(1...
true
1d36091d1e78342a5b4e4123f732b4b24508479e
JavaScript
lisovskyd/react-redux-todo-list
/src/sagas/Comments/index.js
UTF-8
992
2.59375
3
[]
no_license
import { put, call, takeLatest, take, cancel } from 'redux-saga/effects'; import { delay } from 'redux-saga'; import { getComments, commentRequest } from '../../actions/'; import * as tasksType from '../../variables/actionTypes'; export default function* watchLoadComments() { const comments = yield takeLatest(ta...
true
723d66a21ad565ecb71f50c051a99015e3f1317a
JavaScript
lukaszmrowiec/manewry_morskie
/public/scripts/websocketclient_start.js
UTF-8
508
2.671875
3
[]
no_license
window.onload = function start () { const socket = io(); setTimeout(() => { document.getElementById('test').style.display = 'none'; }, 5000); function assignPlayers() { socket.emit('setPlayer', ''); } document.getElementById('graj').addEventListener('click', assignPlayers); socket.on('setPlayer', (playe...
true
50317b5f770c8b621c36da16b42a3f49079605be
JavaScript
FuckBrains/old-dumps
/js/like4like/likePin.js
UTF-8
770
2.59375
3
[]
no_license
if(document.getElementsByClassName("buttonText")[1].innerHTML=="Unfollow"){ window.close(); send_req2("http://localhost/js/like4like/likeStatus.php?set=0"); }else{ document.getElementsByClassName("buttonText")[1].click(); setTimeout(function(){window.close();send_req2("http://localhost/js/like4like/likeStatus.php?set...
true
67606a5849e9c39bec15f83b51df8156b5f6152d
JavaScript
AntonKurdo/Hell_Maze
/src/components/Moves.js
UTF-8
1,013
2.703125
3
[]
no_license
import React, {useEffect, useRef} from 'react'; import PropTypes from 'prop-types'; function useKey(key, cb) { const callbackRef = useRef(cb); useEffect(() => { callbackRef.current = cb; }) useEffect(() => { function handle(evt) { if (evt.code === key) { call...
true
9b3c3367cf7b0eaa79bbd6e021acbb20105d918e
JavaScript
Gaspardloriot/comp-direc-front
/src/App.js
UTF-8
5,960
2.71875
3
[]
no_license
import React, { useState, useEffect } from 'react'; import Employees from './Employees' import Location from './Location' import Department from './Department' import './css/card.css'; import './css/small-card.css'; import './css/modal.css'; import './css/App.css'; function App() { const [state, setState] = useSt...
true
7118d2cfc3c07f130811bab7526acc3aae302b74
JavaScript
mrcuijt/region_spider
/resource.js
UTF-8
264
2.78125
3
[]
no_license
function getResource(url){ try{ let strLength = url.lastIndexOf("/"); let str1Length = url.lastIndexOf("."); let str1 = url.substring(strLength+1,str1Length); return str1; }catch(e){ console.log(e) } } module.exports.getResource = getResource;
true
0bf920cf399d892aec135fe6d608bbe782cab75f
JavaScript
igorOsantana/Zeitplan
/src/store/reducers/user.js
UTF-8
988
2.96875
3
[]
no_license
const INITIAL_STATE = { userLogin: false, email: "", name: "", lastName: "", birthDate: "", }; function userReducer (state = INITIAL_STATE, action) { switch (action.type) { case 'REGISTER': return { ...state, userLogin: true, ...
true
ed48456f56072a0aedf48708a2018037968c2548
JavaScript
specter01wj/LAB-Pluralsight
/Paths/Frontend_Dev/Nodejs/Beginner/Learning To Program - Part 1 Getting Started/materials/3/excercises/after/program.js
UTF-8
422
3.96875
4
[ "MIT" ]
permissive
var x = 3, y = 2.5; var z = '3'; var result = x > y; var writeGreeting = function(name) { var message = "Hello, " + name; console.log(message); } writeGreeting("Scott"); writeGreeting("Allen"); var answer = parseInt(z) + y; console.log(answer); console.log(typeof answer); console.log(typeof result); conso...
true
54d1b1dd91327e4a21c505f1ebc51f307ff1a792
JavaScript
Soumabha4AWS/JavaScriptTutorial
/FunctionSample/app4.js
UTF-8
806
3.515625
4
[]
no_license
const combine = (resultHandler, operation, ...numbers) => { const validateNumber = number => { return isNaN(number) ? 0 : number; }; let sum = 0; for (const num of numbers) { if (operation === 'ADD') { sum += validateNumber(num); } else { sum -= validateNumber(num); } } result...
true
14f4ad1898e56d8318ff1c1672a8150d07e11053
JavaScript
samrocksc/boulangerie
/src/lib/buildAdapterFunc.js
UTF-8
1,194
2.921875
3
[ "MIT" ]
permissive
const currier = require('./currier'); const passThru = [x => x]; /** * simple pass through function check * @private */ const passThroughFunc = val => { if (Array.isArray(val) && val.length > 0) { return val; } return passThru; }; /** * @param Creates the build function for an array * @returns {functio...
true
2fa7b7830bf405ad6444770157b0dab2a07c9c03
JavaScript
Griznt/translateit
/server.js
UTF-8
2,925
2.75
3
[]
no_license
const axios = require("axios"); const querystring = require("querystring"); const express = require("express"); const cors = require("cors"); const bodyParser = require("body-parser"); const SENTENCES_REGEXP = /((?!=|\.).)+(.)/g; const DEEPL_API_URL = "https://api.deepl.com/v2/translate"; require("dotenv").config();...
true
cf7e737af48cbf9b8d09a6123f028247fcca98d4
JavaScript
jongeorge1/advent-of-code-2017
/index.js
UTF-8
540
2.59375
3
[]
no_license
require('string.prototype.padstart').shim(); let Stopwatch = require('node-stopwatch').Stopwatch; let day = ('' + process.argv[2]).padStart(2, '0'); let part = process.argv[3]; let Target = require(`./src/day${day}/part${part}`); let target = new Target(); let input = process.argv[2]; let data = require('fs').readFi...
true
2afbd16329d48eaec4098abbcc6583b78276ea4a
JavaScript
quacrobat/OBB
/example/js/Octree.js
UTF-8
2,861
3.109375
3
[]
no_license
function Octree( position, size ) { this.position = position !== undefined ? position : { x: 0, y: 0, z: 0 }; this.size = size !== undefined ? size : { x: 1, y: 1, z: 1 }; this.children = []; this.items = []; } Object.assign( Octree.prototype, { insert: function ( item ) { let index1 = this.getChildIndex(...
true
d944869ca8e239902eb149bcb12a19f6e40882f1
JavaScript
QuantumImmortality/Fullstack-Discord-Bot
/src/input/commands/add.js
UTF-8
724
2.71875
3
[]
no_license
const db = require('../../mongoDB/dbCommands'); const endpoint = require('../../../config/config.json').dbEndpoint; /** * Add a meme to the database * @param client the requesting client * @param message origination point of message * @param args the args sent with the command * @returns {Promise<void>} */ expor...
true
1e41c6200276ec962146f747ef099c88bddc0656
JavaScript
dreammedia/umbrella
/extended/plugins/size/size.js
UTF-8
587
2.734375
3
[ "MIT" ]
permissive
// Find the size of the first matched element // handles iOS bug with elements of fixed position u.prototype.size = function () { var obj = this.first(); var value = obj.getBoundingClientRect(); if (u.isMobileSafari() && this.css('position') === 'fixed') { var top = 0; value = {left: value.left, right: va...
true
884db348611e4ea8b59ff92862d8bf8eef108328
JavaScript
rvaldez20/restserver-poo
/controllers/auth.controller.js
UTF-8
2,881
2.78125
3
[]
no_license
const { response, request } = require('express'); const bcryptjs = require('bcryptjs'); const Usuario = require('../models/usuario'); const { generarJWT } = require('../helpers/generar-jwt'); const { googleVerify } = require('../helpers/google-verify'); // función para las accines del login const login = async(req=r...
true
cec825f1060312b4aff22e6afe6a437c849c778d
JavaScript
rohitkrishna094/codingtrain-practice
/cardioid/sketch.js
UTF-8
673
3.296875
3
[]
no_license
let total = 100; let r; const pointSize = 0; let factor = 2; function setup() { createCanvas(400, 400); r = width / 2 - width / 12.5; } function draw() { background(51); translate(width / 2, height / 2); factor += 0.01; stroke(255); noFill(); circle(0, 0, r); fill(255); for (let i = 0; i < total; ...
true
e7d33c8aee87e8dc243df7837724fe8b7bdaebb2
JavaScript
Aioros/fcc-timestamp-api
/server.js
UTF-8
854
2.71875
3
[]
no_license
var express = require('express'); var app = express(); app.set('views', './views'); app.set('view engine', 'pug'); app.get('/', function (req, res) { res.render('index', { title: 'Hey', message: req.protocol + '://' + req.get('host') }); }); app.get('/:input', function (req, res) { var input = req.params["inp...
true
03792da6795950543e2a1d5d1e78668f752f8e8c
JavaScript
collerhatguy/login
/index.js
UTF-8
1,739
3.25
3
[]
no_license
const newUsername = document.getElementById("createUsername"); const newPassword = document.getElementById("createPassword"); const createForm = document.getElementById("accountCreator"); let LOCAL_STORAGE_ACCOUNTS = "accounts"; // list af all created accounts var accounts = JSON.parse(localStorage.getItem(LOCAL_STORAG...
true
3e9e85a5e2148dedfb096a1c229f9f1eae4636d9
JavaScript
melodyVoid/babyeye-utils
/src/function/throttle.js
UTF-8
1,060
2.875
3
[]
no_license
export default function throttle(fn, wait, options = { leading: true, trailing: true }) { let timer = null let previous = 0 let result const throttled = function(...args) { const now = new Date().getTime() if (!previous && options.leading === false) previous = now const remaining = wait - (now - pre...
true
1490e23f9424f3ef619bda0ef9f43af156cf8c67
JavaScript
Silone1/Client-Scripts
/countdown.js
UTF-8
1,274
2.671875
3
[]
no_license
events = ({ beforeSendMessage: function (message, channel) { var command = "", commandData = "", index = -1; if (message.charAt(0) === "~") { command = message.substr(1); index = command.indexOf(" "); if (index != -1) { co...
true
9d815fd75a55bf7cd4fab2c8e9339ee628ecf505
JavaScript
Thamodaran/reactJs
/src/js/components/Category.js
UTF-8
1,152
2.546875
3
[]
no_license
import {getCategories, addCategory, updateCategoriesListener} from '../stores/layoutstore'; import Todoheader from './Todoheader'; import Todocontent from './Todocontent'; import InputPutText from './InputPutText'; var React = require('react'); class Category extends React.Component{ constructor() { super(); ...
true
335f6276abc77cef5de598e45fa016f72db28ef5
JavaScript
Flex73/node
/blackjack/scripts/card.js
UTF-8
310
2.6875
3
[]
no_license
class Card { constructor(faces, suites) { this.faces = faces; this.suites = suites; } } Card.prototype.faces = [ 'A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K' ]; Card.prototype.suites = [ 'Hearts', 'Spades', 'Diamonds', 'Clubs' ]; module.exports = Card;
true
c0c8b4aa72df306518211cab96dba9a77ae9decb
JavaScript
MstrD/VI-1819
/heatmap.js
UTF-8
14,121
3.03125
3
[]
no_license
//dados iniciais var heatmap_full_win, heatmap_full_nominee; //10 melhores atores (so nome) var heatmap_win, heatmap_nominee; // 10 melhores com linhas todos os anos var dataNomineeWithAll, dataWinWithAll; //qual e o atual var current_heatmap, current_heatmap_data; //original com tudo tudo (same ref que vars full) var ...
true
ec4c9d458acc58a31674703180e9d01b59e88215
JavaScript
xebialabs-community/xlr-cherwell-plugin
/src/main/resources/web/datetimeDeltas/script.js
UTF-8
3,078
3.125
3
[ "MIT" ]
permissive
/* * Copyright 2022 XEBIALABS * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, s...
true
a6e7d0b68c850fa5f93aaac660fd69bd460d43a9
JavaScript
davsket/ClassJS
/test/class-test.js
UTF-8
2,044
3.1875
3
[ "MIT" ]
permissive
/*global Class,beforeEach,expect,it, describe*/ describe('Class', function() { var Animal, Dog, Dalmatian, animal, dog, dalmatian beforeEach(function() { Animal = new Class({ type: 'Animal', isAnimal: true }) Dog = new Class(Animal, { type: 'Dog', isDog: true, bark: function(){ return 'W...
true
2d1d9953f99150d973d07f19573e836c7951d3d9
JavaScript
purple-tiger/team-project-one
/snazr-server/server/handlerHelpers.js
UTF-8
1,282
2.515625
3
[]
no_license
const User = require('./models/users'); const Flag = require('./models/flags'); // const mongoose = require('mongoose'); const Promise = require('bluebird'); const deletePhotos = (user, photosToDelete) => { let { photos } = user; let removed = []; for (let i = 0; i < photosToDelete.length; i++) { for (let j ...
true
983f90eb4e41fe6f0160bb61dd0d2678b15121db
JavaScript
darkfusion90/chatrooms
/server/models/User.js
UTF-8
2,006
2.6875
3
[ "MIT" ]
permissive
const mongoose = require('mongoose'); const MongooseDuplicateKeyError = require('../errors/MongooseDuplicateKeyError') /* A "registered" user uses login information to access the app In contrast, a user who hasn't registered yet uses session cookies to access the app (Which expires after a given amount of ...
true
f88a6076fdf71f3c4ea9ff60a8874bd6dee061cc
JavaScript
bgdmatei/ronpa
/app/javascript/components/flip.js
UTF-8
316
2.6875
3
[]
no_license
const initFlip = () => { const cards = document.querySelectorAll('.flip-card'); console.log(cards); if (cards) { cards.forEach ((card) => { console.log(card); card.addEventListener( 'click', function() { card.classList.add('is-flipped'); }); }); }; } export { initFlip };
true
46ac399c4e3ff6c960d9cc44ca65d00036c03ab6
JavaScript
GiantDwarf01/Mjolnir-Discord
/commands/schedule.js
UTF-8
1,407
2.734375
3
[]
no_license
const util = require('../util.js'); const Discord = require('discord.js'); const fs = require('fs'); module.exports = { name: 'schedule', description: 'Creates a scheduling poll', lastPin: null, execute(message, args) { const sat = {emoji:'🧂', name:"Saturday"}; const sun = {emoji:'🍷',...
true
0491c1240082fa49f3a21cc6d1acc01df7687b1f
JavaScript
li2266/last_for_rcodi
/phase4/repository/IH-Project-2017-ko68_webapp_phase4/index.js
UTF-8
2,468
3.359375
3
[]
no_license
var minRent; var maxRent; //housing profile submit button function submitFunction() { var minPrice = document.getElementById("txtPriceMin").value; var maxPrice = document.getElementById("txtPriceMax").value if (tryParse (minPrice) === false || tryParse(maxPrice)===false) //rent check { if (...
true
462b2a96199083e69aa16ab35bd15303d77ef75f
JavaScript
che-ri/sparta
/algorithm/백준/[1316]_그룹_단어_체커.js
UTF-8
398
3.515625
4
[]
no_license
const input = require('fs').readFileSync('dev/stdin').toString().split('\n'); let cnt = Number(input[0]); input.shift(); for (let word of input) { let arr = []; for (let j = 0; j < word.length; j++) { if (!arr.includes(word[j])) arr.push(word[j]); else if (arr.includes(word[j]) && word[j - 1] === word[j]) ...
true
bd579887a2946061d098cca445e39211912d0828
JavaScript
jpke/elearn
/src/components/EditQuizItemView.js
UTF-8
2,037
2.859375
3
[ "MIT" ]
permissive
import React from 'react'; //view called by EditQuizContainer //called for each quiz item //creates a panel to edit quiz item data //displays question and answer choices in editable input elements //allows user to select one answer choice as correct //allows user to add and delete answer choices //allows user to delet...
true
5ec1b5e941d2f4056468800e904ca4598d0bd72a
JavaScript
swishhh/ThreejsMinecraftScene
/app/loop.js
UTF-8
408
2.828125
3
[]
no_license
define([], function () { 'use strict'; let items = []; return { /** * Add callback item to loop. * * @param callback */ add: function (callback) { items.push(callback); }, /** * Get loop callback items. * * @retur...
true
ad878045c96541f9e010103ee47b7e3517cc5387
JavaScript
hello-stacy/lexiQL
/client/components/URIForm.jsx
UTF-8
3,703
2.578125
3
[]
no_license
import React, { useContext } from 'react'; import { VisualizerContext, CodeContext } from '../state/contexts'; import TableNode from './tableNode'; export default function URIForm() { const { visualizerDispatch } = useContext(VisualizerContext); const { codeDispatch } = useContext(CodeContext); // get the data ...
true
4fa2ad120d845dc82a44e9c30c8bdbd65338de91
JavaScript
alihfph/React-Weather-App
/src/components/WeatherApp.jsx
UTF-8
2,625
2.890625
3
[]
no_license
import React, { useState } from "react"; import DisplayWeather from "./DisplayWeather"; import { Container, Button, Form, Row, InputGroup, Col } from "react-bootstrap"; const WeatherApp = () => { const [weather, setWeather] = useState([]); const [form, setForm] = useState({ cityName: "", countryName: "", ...
true
9a8905bfbef54baf7bc4a43db6f59147e803ddf1
JavaScript
netuser007/nodeJs-assignment-1
/security/security.js
UTF-8
634
2.515625
3
[]
no_license
const adminUser = require('./auth').adminUser; const authorize = (req,res,next) => { //console.log('security !'); if(!req.headers.authorization) { return res.status(401).json({ error: 'Missing Authorization details!' }); } const authStr = req.headers.authorization.split(' ...
true
c7fbae44fa908edea005cf235e127f6b269d6b30
JavaScript
StativaCamelia/AViBACK
/frontend/staticFileLoader/public/Scripts/get_user_profile.js
UTF-8
2,970
2.921875
3
[]
no_license
document.addEventListener("DOMContentLoaded", getUserProfile, false); const url = "http://localhost:5003/users?token="; let filtersOptions; let optionValues = { State: "statesValues", County: "countiesValues", City: "citiesValues", Street: "streetsValues", Timezone: "timezoneValues", }; function setUserProfi...
true
f918ad6a3224d212e17bbd0940177042a0cf1480
JavaScript
benoah/Web-Storage-API-using-localStorage-to-save-and-retrieve-data.
/osl-js-2-module-assignment-1-benoah/js/favourites.js
UTF-8
575
2.9375
3
[]
no_license
import { getExistingFavs } from "./utils/favFunction.js"; const favourites = getExistingFavs(); const productContainer = document.querySelector(".team-container"); if (favourites.length === 0) { productContainer.innerHTML = "No favourites yet"; } favourites.forEach((favourite) => { console.log( favourite); ...
true
4aefb4a83e0af8d9260aeec65dfebf2de3dba60d
JavaScript
Mrshihe/React-Node
/Boss/boss-app/src/components/avatarSelect.jsx
UTF-8
1,117
2.625
3
[]
no_license
import React from 'react' class AvatarSelect extends React.Component { state = { current: '' } handleClick(name){ this.setState({current:name}) // 利用onchange将值传递给父组件Form.Item的name属性 this.props.onChange(name) } render(){ const { current } = this.state const avatarList = 'boy,girl,man,w...
true
62642dbd6770edf1e20c85e41262dca7c9bf383a
JavaScript
Urbinmr/sunshine-forge
/src/test/unit/Sidebar.test.js
UTF-8
2,063
2.640625
3
[]
no_license
import React from 'react'; import { shallow } from 'enzyme' //import { expect } from 'chai' import { Sidebar } from '../../components/Sidebar' describe('Sidebar Component', () => { it('should have button with id addSpace', () => { const spaces = [] const sideBar = shallow(<Sidebar spaces={spaces} f...
true