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
f139d493206819964a7c849eee2be0865257ad85
JavaScript
bobthered/daily-coding-problem
/problems/030/index.js
UTF-8
255
3.125
3
[ "MIT" ]
permissive
const unitsOfWater = arr => { // get min const min = Math.min(arr[0], arr[arr.length - 1]); let total = 0; for (let i = 0; i < arr.length; i++) { if (arr[i] < min) total += min - arr[i]; } return total; }; module.exports = unitsOfWater;
true
e80750ff253f37e71e9e62344e404e0155e4ca85
JavaScript
bernadeteaquino/reactnd-project-readable
/frontend/src/reducers/posts.js
UTF-8
1,951
2.765625
3
[]
no_license
import { GET_POSTS, GET_POST_BY_ID, ADD_POST, EDIT_POST, DELETE_POST } from '../utils/constants' const initialState = { data: [], isLoading: true, } const posts = (state = initialState, action) => { switch(action.type) { case GET_POST_BY_ID: { const { post } = action ...
true
2133aee8694dd57e4be13ecf759fd6e7563c7224
JavaScript
AfonsoDev/WebGamesCenter
/back-end/src/controller/usuario.js
UTF-8
3,761
2.578125
3
[]
no_license
const { Op } = require("sequelize"); const Usuario = require("../models/Usuario"); const bcrypt = require("bcryptjs"); const jwt = require("jsonwebtoken"); const authConfig = require("../config/auth.json"); const Identificacao = require("../models/Identificacao"); module.exports = { // Listar todos os usuarios ...
true
f4b0736d5b25fb7ba758638dddd8da0319d421d4
JavaScript
ty-cmyk/21su-experimental
/1.a/part-2/script.js
UTF-8
2,661
3.484375
3
[]
no_license
let circles = []; var counter = 0; var interval; function setup() { var canvas = createCanvas(600, 600); canvas.parent('app'); timer = createP('timer') // noLoop(); // interval = setInterval(CoTwo, 1000); // var counter1 = new Counter(second()).start(); } // function timeIt() { // ...
true
0f5c248a2359ec9fddd6958684cb7819d0cfca63
JavaScript
davidrfyt/HTML5-Client
/socketManagers/SocketObject.js
UTF-8
383
2.734375
3
[]
no_license
class SocketObject { constructor(target) { this.CONNECT_TARGET = target; this.connected = false; this.socket = null; } packetCompiler(data) { let packetString = "0|"; for (let i = 0; i < data.length; i++) { if (i > 0) packetString += "|"; packetSt...
true
8ec76ee36cbc5554f4602a19db144acc36c3a749
JavaScript
Champion176/osu-stage-5.5
/js/form.js
UTF-8
1,516
2.53125
3
[]
no_license
class Form { constructor() { //this.input = createInput("Name"); this.greeting = createElement('h2'); //this.title = createElement('h2'); this.button1 = createButton('Play'); //this.formsprite= createButton('osu') } hide(){ this.greeting.hide(); // t...
true
3015a0222fa8944391164b6c3955a8cbff15ed19
JavaScript
tupizz/xy-inc-nodejs
/src/__test__/integration/poi-calls/index.js
UTF-8
3,107
2.6875
3
[]
no_license
const app = require('./../../../app/server/app'); const request = require('supertest')(app); const assert = require('assert'); const { apagaDados, carregaDados } = require('../../data/dadosBancoTest'); describe('Integration Test', function () { this.timeout(30000); //30s of timeout beforeEach(async (...
true
081442f316330f44e3d2b7386e861d192906e912
JavaScript
neno--/canvasFun
/Chapter 2/Task 3 - Adding Pickups/js/ScrollingBackground.js
UTF-8
2,105
3.09375
3
[ "MIT" ]
permissive
function ScrollingBackground() { this.width = 0; this.height = 0; this.deltaScroll = 1; this.InitScrollingBackground = function(texture, x, y, z, width, height, deltaScroll) { this.InitDrawableObject(texture, x, y, z); this.width = width; this.height = height; this....
true
2618c5338d3b559b5d4625a68a0aca97eb3739b5
JavaScript
HumbertoMartinez/Semester-1-Final-Project
/Semester-1-Final-Project-master/First-Semester-Final-master/cart.js
UTF-8
638
2.859375
3
[]
no_license
class Cart{ //What is the first part of every class? Type it below. constructor(itemList,itemQuantity){ this.itemList = itemList; this.itemQuantity = itemQuantity; } //Type the instance functions below this comment. addItem(i,q){ this.itemList.push(i); this.itemQuantity.push(q); } totalCart(){ l...
true
b93f4dc9b8de3ddc7f19b865d32b8895450cf9ee
JavaScript
vialab/dimpVis
/d3 Prototyping/Scatterplot/initScatterplot.js
UTF-8
4,133
3
3
[]
no_license
/** This file creates and coordinates a scatterplot and a slider according to the provided dataset * */ //Add a main svg which all visualization elements will be appended to d3.select("#scatter").append("svg").attr("id","mainSvg").on("click",function(){ scatterplot.clearHintPath(); scatterplot.clearPointLabel...
true
2bd2a832aa8b6d763cdfa77a0b932badbf27890a
JavaScript
julienchenel/Human-Evolution-Ajax
/js/chrono.js
UTF-8
3,414
2.71875
3
[]
no_license
let i = prompt ("Choose test number"); $(".start").click(function () { $.ajax ({ type: "POST", url: "../partieAjax.php", data: "nbPerso="+ i, dataType: "json", timeout: 3000, success: function(data) { console.log(data); for (n = 0; n < i; n++...
true
48ed1749245c2fca81247f3eb883491517635df5
JavaScript
Elisa-K/tp1
/src/components/ManualIncrementer.js
UTF-8
752
2.53125
3
[]
no_license
import React from 'react' import Card from './Card' import Button from './Button' class ManualIncrementer extends React.Component { constructor(props) { super(props) this.state = { n: 0 } this.increment = this.increment.bind(this) } increment(e) { e.preventDefault() ...
true
4a9d13984f6108df4a75911c9ed8b76787d62161
JavaScript
mzqmarks/studyBigWEB
/webHtml/part1Exam.js
UTF-8
3,590
3.671875
4
[]
no_license
// 2.1 将下面异步代码使用Promise的方式改进 /* setTimeout(function () { var a = 'hello' setTimeout(function () { var b = 'lagou' setTimeout(function () { var c = 'I ❤ U' console.log(a + b + c) },10) },10) },10) */ // setTimeout(function () { // var a = 'hello' // se...
true
82cd7be5adf5073b60711063f11d8d8c9744604d
JavaScript
weaponhe/trick
/server/test.js
UTF-8
563
2.796875
3
[]
no_license
const fs = require('fs') const path = require('path') let baseDir = path.resolve(__dirname, '../data') let data = [] let folders = fs.readdirSync(baseDir) folders.forEach((folderName) => { let folderObj = {name: folderName, files: []} let files = fs.readdirSync(path.resolve(baseDir, folderName)) files....
true
845f54a1fa8d62368719d5ee28506b04b2d24a07
JavaScript
cotecode/IM-Sanbercode-Reactjs-Batch-21
/Tugas-Harian-Part-1/Tugas-8/index.js
UTF-8
491
2.59375
3
[]
no_license
var readBooks = require("./callback.js"); var books = [ { name: "LOTR", timeSpent: 3000 }, { name: "Fidas", timeSpent: 2000 }, { name: "Kalkulus", timeSpent: 4000 }, { name: "komik", timeSpent: 1000 }, ]; readBooks(10000, books[0], function (bukuBaru) { readBooks(bukuBaru, books[1], function (bukuBaru1) { ...
true
b417430f7f237d7c9151907917e06cab17fb80dc
JavaScript
Bev7787/steamworks-dashboard
/www/js/dashboard.js
UTF-8
7,350
2.609375
3
[ "MIT" ]
permissive
var targetRange = 4; // TODO work out how far we can see var camera = 1; var loop = 1; var currentGyro = 0 var offsetGyro = 0 var cameraStream1 = "http://10.47.74.11:5801/?action=stream" var cameraStream2 = "http://10.47.74.11:5802/?action=stream" var reverse = false; var alliance = "red" var currentState = "stationary...
true
bde51d684d2195b784edb7af188f04ac58e2558e
JavaScript
Kong-T/Practical-training
/Teacher/JS/guide_grade.js
UTF-8
3,160
2.859375
3
[]
no_license
(function () { 'use strict' window.addEventListener('load', function () { // Fetch all the forms we want to apply custom Bootstrap validation styles to var forms = document.getElementsByClassName('needs-validation') // Loop over them and prevent submission Array.prototype.filter.call(forms, functi...
true
1f92014d346fee6ad5828ab62b6515e0dccdd5fb
JavaScript
helmizu/Glosarium_API
/routes/glosarium.js
UTF-8
1,967
2.578125
3
[]
no_license
const express = require('express'); const router = express.Router(); const { insertData, getData, uploadImage, getDataAll, getCollection, updateData, deleteData } = require('../libraries/database'); router.get('/', function(req, res) { getData( req.query.label, req.query...
true
5a74366e6c845963e90fa92d38220f2c8300e01b
JavaScript
acecyq/general-investing
/src/utilities/utilities.js
UTF-8
469
3.0625
3
[]
no_license
import format from "date-fns/format"; const dateString = format(new Date(), "do MMM u"); export function dateToString() { return dateString; } export function formatLabel(dateString) { const dateArray = dateString.split("-").map((att, index) => { return index > 0 ? Number(att) - 1 : Number(att); }); const...
true
6ce26f80a6db87dfa4652a6fd8948fe10a6f2b03
JavaScript
Dhriti-iyer/Class80
/main.js
UTF-8
1,451
3.421875
3
[]
no_license
var student_array=[]; function submit() { var display_student_array=[]; for(var i=1;i<=4;i++){ var name=document.getElementById("stud_"+i).value; console.log(name); student_array.push(name); } console.log(student_array); var len=student_array.length; console.log(len); for(var j=0...
true
9f4188d75a7043094836509f5173dcb1d32a3c9b
JavaScript
Sakitama/component
/js/H5ComponentPie.js
UTF-8
3,816
2.71875
3
[]
no_license
// 饼图组件对象 var H5ComponentPie = function (name, cfg) { var component, w, h, cns, ctx, r, i, step, sAngel, eAngel, perText, x, y, text; component = H5ComponentBase(name, cfg); w = cfg.width; h = cfg.he...
true
6d60ff0eb2422ae889eca852143899439b1941ec
JavaScript
pastrana-karl/SmartCTzen
/server/utils/appError.js
UTF-8
502
2.78125
3
[]
no_license
class AppError extends Error { constructor(message, statusCode) { super(message); this.statusCode = statusCode; //If the status code (error code) with number 4 (such as 400, 404, etc) the status message is "fail" //If not, 500 for example, the status is "error" this.status ...
true
236ec1d41a1172f53b67f9f68ce600cb8f1d1287
JavaScript
ultraq/icu-message-formatter
/source/utilities.js
UTF-8
4,548
2.921875
3
[ "Apache-2.0" ]
permissive
/* * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/) * * 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 requ...
true
34eb55f587dc861801e6d3a572482342cce233a2
JavaScript
mpkumar87/task-manager-api
/src/db/mongoose.js
UTF-8
644
2.84375
3
[]
no_license
const mongoose = require('mongoose'); mongoose.connect(process.env.MONGODB_CONNECTION_URL, { useNewUrlParser: true, useCreateIndex: true }).then((response) => { console.log('Connected'); }).catch((error)=>{ console.log(error.name); }); /* const task = new Task({ description: " This is new sample description for...
true
51e5bb140fc3292eb4930871e5d36700d8945108
JavaScript
quickheaven/Selenium-WebdriverIO
/webdriverio-v5/draft-test/iframe-test.js
UTF-8
547
2.6875
3
[ "MIT" ]
permissive
//https://webdriver.io/docs/api/webdriver.html#switchtoframe describe("IFrame Test", () => { beforeEach(function () { browser.setWindowSize(1800, 1200); browser.url("/IFrame/index.html"); browser.pause(5000); }); it("Test the clicking of a given button housed within a IFrame", () => { const ifram...
true
889f7f5ec751abe2ffcc42d94c012bb6bc2fe816
JavaScript
diko316/libcore
/src/string.js
UTF-8
5,955
2.84375
3
[ "MIT" ]
permissive
'use strict'; import { string, number } from "./type.js"; var HALF_BYTE = 0x80, SIX_BITS = 0x3f, ONE_BYTE = 0xff, fromCharCode = String.fromCharCode, BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", NOT_BASE64_RE = /[^a-zA-Z0-9\+\/\=]/g, BASE64...
true
498c2b56c0b82117ab46ed5d5add50c93f425e7f
JavaScript
tlyau62/leetcode
/ds/key/350_intersect.js
UTF-8
1,274
3.6875
4
[]
no_license
/** * 2 pointers O(Max(n, m)) * fastest: 52ms; this: 68ms; * * @param {number[]} nums1 * @param {number[]} nums2 * @return {number[]} */ // method 1: hash table // group: time, space O(n1 + n2) // search: time, O(min(n1, n2)) // // method 2: sort // sort: time O(n1 lg n1 + n2 lg n2) = O(n lg n), n...
true
0ad8e51661c1548b817f727a3fa0e80336737bf2
JavaScript
IliyanKafedzhiev/TelerikAcademy
/JavaScript/02.Operators-Expressions/Operators_Expressions_1-9.js
UTF-8
3,470
3.90625
4
[]
no_license
console.log("1.Write an expression that checks if given integer is odd or even"); var integer = 55; var isOdd = (((integer % 2 == 0) ? false : true) == true) ? "Integer is Odd" : "Integer is Even"; console.log(integer, isOdd); console.log(" "); console.log("2.Write a boolean expressio...
true
fbf20a9406c393d275ef48d510cb123864055a5c
JavaScript
orianasanabria/calculator
/assets/js/script.js
UTF-8
3,294
3.265625
3
[]
no_license
let screen = document.getElementById('screen'); const block0 = document.getElementById('block0'); const block1 = document.getElementById('block1'); const block2 = document.getElementById('block2'); const block3 = document.getElementById('block3'); const block4 = document.getElementById('block4'); const block5 = documen...
true
cb1b2a4ed26651cabe1b1cf79226e6bf4520713d
JavaScript
yangzhouQS/myCode
/ES6/16-Iterator/03-具有Iterator接口的数据结构.js
UTF-8
412
4.4375
4
[]
no_license
//1 - 数组的Iterator接口 let arr = [1, 2, 3, 4, 5]; let itar = arr[Symbol.iterator](); console.log(itar.next()); console.log(itar.next()); console.log(itar.next()); console.log(itar.next()); console.log(itar.next()); console.log(itar.next()); //数组原生提供了Iterator接口可以直接调用for....of循环的 console.log('---------'); for (const itarEle...
true
9fb4ca00c2b8624e0d6160da68ffc0766c23aae4
JavaScript
TheophileMot/uStaq-client
/socket-server/server.js
UTF-8
7,229
2.625
3
[ "MIT" ]
permissive
const express = require('express'); const WebSocket = require('ws'); const SocketServer = require('ws').Server; const http = require('http'); const https = require('https'); const axios = require('axios'); const uuid = require('uuid/v1'); // Use Damerau-Levenshtein edit distance to detect almost-answers (look for ch...
true
781dc1cb14bfe7b638d44083f05d09ff87cb63cd
JavaScript
sniok/dubenko.dev
/src/webgl.js
UTF-8
1,916
2.703125
3
[]
no_license
import redWaves from "./redWaves.glsl"; import waves from "./waves.glsl"; const shaders = [redWaves, waves]; const vertices = new Float32Array([-1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1]); const scene = { width: 512, height: 512 }; const canvas = document.getElementById("canvas"); const gl = canvas.getContext("w...
true
1f583b87fe53392a65bf685573f79e781f10bdae
JavaScript
harpreetsingh500/react-bmi-calculator
/src/javascripts/components/input-body-info.js
UTF-8
1,088
2.96875
3
[]
no_license
import React from 'react'; function height(unit) { let heightInput = ( <div> <input type='text' id='height' /> centimeters </div> ); if (unit === 'US') { heightInput = ( <div> <input type='text' id='height' /> feet <input type='text' /> inches </div> ); } r...
true
e094e082b849c70a69ac11ab0c837163e591df63
JavaScript
greatcodeclub/intro
/javascript/basics.js
UTF-8
857
4.5
4
[]
no_license
// Variables var name = 'value', num = 1 // var a === undefined var a = null // Define it as having no value // Conditionals if (a) { console.log(a, 'is truthy') } else { console.log(a, 'is falsy') } // => undefined is falsy // => null is falsy // => false is falsy // => true is truthy // => 1 is truthy // Obje...
true
ed249ea9c9db85c46a7ce61e8d25693c1ddc6183
JavaScript
nss-cohort-40/nutshell-c40-crunchy-cashews
/src/scripts/news/data.js
UTF-8
490
2.6875
3
[]
no_license
/* Author: Roxanne Purpose: newsApi manager to get and add news articles */ const newsURL = "http://localhost:8080/news" const newsAPI = { getAllArticles() { return fetch(`${newsURL}`) .then(resp => resp.json()) }, addNewsArticle(newsArticle) { return fetch(`${newsURL}/${newsArticle}`, { ...
true
b27ec9764814f0cdc514c14a803b18ddd80de99f
JavaScript
jianwi/wyqn
/js/ly.js
UTF-8
534
2.734375
3
[]
no_license
var pl_show=document.getElementById("pl_show"); var html_ly=""; for(vale of lysj){ html_ly+=`<div class="plq"> <p id="name" style="text-align: left;">${vale[0]}</p> <br> <p id="text" style="text-align: left">${vale[1]}</p> </div> `; } pl_show.innerHTML...
true
94a9ec22e8e152b191c62d99ec18be62b795509a
JavaScript
tfpractice/bee52
/src/card.js
UTF-8
1,134
2.640625
3
[]
no_license
import { dist, isHigher,isLower, next, prev, rankVal, } from './rank'; export const card = (rank = '', suit = '') => ({ rank, suit, id: `${rank}_${suit}`, }); export const id = ({ rank, suit, } = card()) => `${rank}_${suit}`; export const suit = ({ suit, } = card()) => suit; export const rank = ({ rank, } = card()) =...
true
35e1c53b4bf2e90a56d43ed1e44364eed91d6852
JavaScript
Eva-Navarrete89/rock-paper-scissor
/src/main.js
UTF-8
3,832
3.75
4
[]
no_license
// QUERY SELECTORS var classicGame = document.getElementById('classicGame'); var difficultGame = document.getElementById('difficultGame'); var gameSection = document.getElementById('gameSection'); var gameChoices = document.getElementById('gameChoices'); var gameboard = document.getElementById('gameboard'); var changeG...
true
0e7b510f4d571105c41fa8f01174101c4cef916e
JavaScript
pawsagainsthoomanity/atomic_design_assets
/ver01/Archive/source/js/tree-nav.js
UTF-8
1,827
3.109375
3
[ "MIT" ]
permissive
/*------------------------------------*\ #TREE NAVIGATION \*------------------------------------*/ /** * Toggles active class on the primary nav item * 1) Select all nav dropdown triggers and cycle through them * 2) If not a button, add ARIA role and - to be safe - tabindex=0 * 3) Add explicit keyboard handlin...
true
1521aa44eb237e4f9a0b8192ce02f1de0c143f2e
JavaScript
abharvey/AOC18
/completed/dec9/dec9opt.js
UTF-8
3,536
3.4375
3
[]
no_license
const { getInput } = require("../../readInput.js"); const spliceRem = function(circle, currentMarble, circleSize) { let i = currentMarble; while (i < circleSize) { circle[i] = circle[i + 1]; i++; } }; const spliceAdd = function(circle, newMarblePosition, newMarble, circleSize) { let i = newMarblePosit...
true
5fa396173db200b43efbe300f97a4eac5a273c18
JavaScript
Arsalon-amini/Javascript_ObjectOrientedProgramming
/prototypes.js
UTF-8
4,411
4.125
4
[]
no_license
//prototypes - parents //prototypical inheritance - Javascript inheritance (vs. classical) //Property Descriptor let person = { name: 'Arsalon'}; let objectBase = Object.getPrototypeOf(person); let descriptor = Object.getOwnPropertyDescriptor(objectBase, 'toString'); //returns property descriptor object - takes ob...
true
527db4165e2a1d696dc5dba0a8e1bc70f0e14c0e
JavaScript
angelnalu/lab-mongoose-recipes
/index.js
UTF-8
2,156
2.9375
3
[]
no_license
const mongoose = require('mongoose'); // Import of the model Recipe from './models/Recipe.model.js' const Recipe = require('./models/Recipe.model'); // Import of the data from './data.json' const data = require('./data'); const MONGODB_URI = 'mongodb://localhost:27017/recipe-app'; // Connection to the database "rec...
true
ffebb429840b520f79aae4d672bf9a7396dfaa31
JavaScript
Jpendy/Lab-02-Name-Tag
/app.js
UTF-8
573
3.09375
3
[]
no_license
console.log('hello world'); const name = document.getElementById('name'); name.style.color = 'blue'; name.textContent = 'I AM THE ROCK'; name.style.fontSize = '30px'; name.style.fontFamily = 'fantasy'; // const footer = document.getElementsByTagName('footer'); // const input = document.createElement('input'); // f...
true
fcc63dc17ac127c2b6941fdd288285755bc54985
JavaScript
rdelangelhmx/elearning-3
/Client/src/screens/HomeScreen.js
UTF-8
3,565
2.578125
3
[]
no_license
import React, { useState, useEffect } from "react"; import { Link, useHistory } from "react-router-dom"; import Cookies from "universal-cookie"; import MyCertificates from "../components/MyCertificates"; import RegisteredCourses from "../components/RegisteredCourses"; const HomeScreen = () => { const cookies = new C...
true
351a5a7fc419dcd6bec2ea1dc38e614a5ec49999
JavaScript
fortanza/Calculatrice_V2
/calcul.js
UTF-8
1,678
3.625
4
[]
no_license
// Recuperation des classes let touches = [...document.querySelectorAll(".bouton")]; let listeKeycode = touches.map((touche) => touche.dataset.key); let ecran = document.querySelector(".ecran"); // Prise en charge des boutons du claviers document.addEventListener('keydown', (e) => { const valeur = e.keyCode.toS...
true
0b11040695f9fee5ba6f812100e92ff156ba600b
JavaScript
srivishnu25/React-signin-form
/src/components/userDetails/userDetails.js
UTF-8
657
2.59375
3
[]
no_license
import React, { Component, useState } from 'react'; import './userDetails.css'; const UserDetails = () => { const data = (JSON.parse(localStorage.getItem('UserDetails'))) console.log(data.user) return (<> <div className="userDetails"> <h2>User De...
true
f477a6b5037ebd17afdbb394c984c93269d89116
JavaScript
zhu-qin/redux-grid
/app/components/main-component.jsx
UTF-8
1,496
2.625
3
[]
no_license
import React from 'react' import { addTodo, deleteTodo } from '../actions/todo-actions' class MainComponent extends React.Component { constructor(props) { super(props) this.state = {} } componentDidMount() { let listener = () => this.setState({ todos: this.props.store.getState().todos }) this.un...
true
40aa7eeef794ff7c2a007b2a5ef539c6572834d7
JavaScript
RileyVaughn/ChaosGame
/draw.js
UTF-8
1,526
3.9375
4
[]
no_license
//Narrative: Draw all triangles and point to screen //Preconditions: A canvas and it’s context must be defined as well as the objects to be drawn //Postconditions: All objects are drawn function Draw() { Clear(); DrawTriangles(ctx, coords); ShadeTriangle(ctx, shaded); DrawPoint(ctx, point); } //...
true
75bf53d14cc4337899cf8803a9454553280f63ad
JavaScript
jorgeebn16/Coding_Prework
/watch-that-box/javascript.js
UTF-8
519
2.75
3
[ "MIT" ]
permissive
var box = document.getElementById("box"); document.getElementById("button1").addEventListener("click", function() { box.style.height = "300px"; box.style.width = "300px"; }); document.getElementById("button2").addEventListener("click", function() { box.style.backgroundColor = "blue"; }); document.getElemen...
true
892f67789d0fb6b5c9e681637615207d31fddd0d
JavaScript
omerisimo/bike-me-phonegap
/assets/www/javascript/bike_me/models/routes_finder.js
UTF-8
6,947
2.6875
3
[]
no_license
bikeMe.namespace('Models'); bikeMe.Models.RoutesFinder = function (origin, destination) { this.initialize(origin, destination); }; bikeMe.Models.RoutesFinder.prototype = { initialize: function (origin, destination) { this.originLocation = origin; this.destinationLocation = destination; radio('ne...
true
fed9d420baa9e3061a698a115d6e9bb692c3ce1a
JavaScript
CarloMercuri/M201Chat
/server.js
UTF-8
4,044
2.5625
3
[]
no_license
// REQUIRES const path = require('path'); const express = require('express'); const http = require('http'); const socketio = require('socket.io'); const db = require('./db'); // SETUP const app = express(); const server = http.createServer(app); const io = socketio(server); app.use(express.static(path.join(__dirname,...
true
33ea54d5b454435ef9c0d0d9c27334a3721d22f0
JavaScript
hatvu132/Music11
/commands/clear.js
UTF-8
725
2.875
3
[]
no_license
module.exports = { name: "clear", description: "Clears messages", async run (client, message, args) { const amount = args.join(" "); if(!amount) return message.reply('**Hãy nhập số tin nhắn Ngài cần xóa**') if(amount > 100) return message.reply(`**Ngài không thể xóa hơn...
true
4b63e4d78b502eb4bb14e89885ae07775f84c42e
JavaScript
devin-kormos/guessify
/js/script.js
UTF-8
2,551
3.125
3
[]
no_license
let urlA = 'https://api.agify.io/?name=' let urlB = 'https://api.genderize.io?name=' let urlC = 'https://api.nationalize.io?name=' let name = new Array() function capit(string) { return string.charAt(0).toUpperCase() + string.slice(1); } function validateForm() { var y = 0; var x = document.forms["nameFor...
true
d9a793568088a9c837ff50df633dbb08c06cef16
JavaScript
zaus/MyJsUtilities
/jquery-gettextsize.js
UTF-8
1,564
2.71875
3
[]
no_license
!(function($) { // see discussion at https://coderwall.com/p/ziynxq; // inspired by https://coderwall.com/p/kdi8ua var N = function(key) { return 'getTextSize.' + key; }, fontMapping = function($o, font) { //return {"font": font.font || $o.css('font')}; var result = {}; // don't affect original object $...
true
f96724bcab2716aaf687c41a29cfd2a13de5fa23
JavaScript
phm1234567/leetcode-solving
/problems/337-house-robber-iii/tree-dp.js
UTF-8
589
3.546875
4
[]
no_license
/** * 树形DP * * 时间:84ms */ var rob = function (root) { return Math.max(...dfs(root)) }; /** * 递归函数:表示遍历以`node`为根的子树能获得的最大价值 * @param {TreeNode} node 当前结点 * @returns {number[]} [不偷,偷]的最大价值 */ function dfs (node) { if (!node) return [0, 0] const left = dfs(node.left) const right = dfs(node.right) retu...
true
17e2d23707ef8e33552981e31baa3eecd07d587e
JavaScript
j-avila/node-weatherapp
/forecast.js
UTF-8
841
2.859375
3
[]
no_license
const axios = require("axios") const { searchUrl, forecastUrl, apiKey } = require("./envVars") const setCity = async param => { const instance = city => axios.get(`${forecastUrl}${city}?apikey=${apiKey}`) // getting the city code axios .get(`${searchUrl}?apikey=${apiKey}&q=${param}`) .then(resp => { citycode...
true
255b7f9528d0bc1cd21fe952e86a61c77101d29c
JavaScript
Eirene/avia-tickets-app
/src/js/store/favorites.js
UTF-8
358
2.59375
3
[]
no_license
class Favorites { constructor() { this.ticketsContainer = document.querySelector(".tickets-sections"); this.init(); } init() { console.log("init favorites"); this.ticketsContainer.addEventListener("click", e => { console.log("click add to favourites"); }); } } const favorites = new F...
true
92dad7033d017235c1f9484843d7c85f75f9b425
JavaScript
nanrossi/react-list
/src/Form.js
UTF-8
979
2.84375
3
[]
no_license
import React, { Component } from 'react'; export default class Form extends Component{ constructor(props) { super(props); this.state = { content : '', isBlank : true }; } addItem(){ if(this.state.content.length){ var value = this.state.content.trim(); this.props.onAddNew(value);...
true
0a2a87fc4cb3773510823efb5ecdb65e6a593f21
JavaScript
stanchev89/JavaScript-exams-and-practice
/JS Fundamentals/reverseArrayOfNumbers.js
UTF-8
363
3.703125
4
[]
no_license
function reverseArrayOfNumbers(num, inputArray) { let newArray = []; let lengthNewArray = num; let output = ""; for (let i = 0; i < lengthNewArray; i++) { newArray.push(inputArray[i]); } for (let k = lengthNewArray - 1; k >= 0; k--) { output += newArray[k] + " "; } console.log(output); } reverse...
true
66e46ed617a6979198f1e76520ee1d42523eef69
JavaScript
icodeforlove/node-promise-class
/test/mixin-test.js
UTF-8
2,931
2.8125
3
[]
no_license
"use strict"; var vows = require('vows'), assert = require('assert'), BlueBird = require('bluebird'), PromiseClass = require('../index'); var MixinWithoutPseudoParams = { getName: function () { return this._name; }, get name () { return this._name; }, set name (value) { this._name = String(value).toUp...
true
c9b4e00ced7ed0f433dd3a7787f0868befdd5109
JavaScript
vannuthchhorn/folder_of_jquery
/comment/js/request.js
UTF-8
606
3.140625
3
[]
no_license
const url="https://jsonplaceholder.typicode.com/comments"; fetch(url) .then(resp => resp.json()) .then(data => { const list = document.querySelector('#list'); data.forEach(item =>{ if (item.id <=10) { list.innerHTML +=` <ul class="list-group mt-4 text-secondary"> <li class="li...
true
ee075120a224238e4db5592a8af586f45424c069
JavaScript
miguelaleong/item3
/js/funciones.js
UTF-8
1,185
3.59375
4
[]
no_license
function calcular(valor1,valor2){ var nombreCampoResultado = "resultado"+valor2; var valor3=parseInt(valor1)*parseInt(valor2); totalBilletes = document.getElementById("totalBilletes").value; nuevoTotalBilletes = parseInt(totalBilletes)+parseInt(valor1); totalMonto = document.getElementById("totalMonto").value; nu...
true
c3cfbb9c136c086918221175c7ea1bdd6ba8df21
JavaScript
JoseHerminioCollas/notesjs
/goatstone/notes/rx2.js
UTF-8
2,742
2.90625
3
[]
no_license
const Rx = require('rx') const t = Rx.Observable.timer(0, 1000).take(13) const t1 = Rx.Observable.from([1, 2, 3, 4, 5, 6]) const ts = Rx.Observable.combineLatest(t, t1) const animO = [{ 'device:{prop:value,prop:value}': 1 }, { "b": 4 }, { "c": 5 }] var t2 = Rx.Observable .from(animO) .map(function(value) { re...
true
7602b435f0584e94296662d9c805bbe311a077be
JavaScript
lijiahao1006/react-app
/src/reducers/counter.js
UTF-8
445
2.859375
3
[]
no_license
const initialState = { a: 999, b: 5 }; export default (state = initialState, { type }) => { // if (type === 'add') { // return { // 'a': state.a+1 // } // }else if (type === 'cheng') { // return { // 'b': state.b*2 // } // } // return state; switch (type) { case "add": ...
true
695988b017b3bde2ca49f25613fdd87b1b9173cf
JavaScript
IraCherginyshka/ActionsList
/src/DeleteAction.js
UTF-8
706
2.65625
3
[]
no_license
import { actions, days } from './AddAction'; function deleteAction(target) { const deleteDate = target.parentNode.parentNode.parentNode.dataset.id; let index = actions.findIndex((element) => { if (element.date === deleteDate && element.start === target.parentNode.querySelector('.block-day__item--start').inn...
true
2b9f17154e4cfe156a555ac11cf3dac44b3a5b69
JavaScript
juansuerogit/juansuero_dac_codetes
/app/dacccodetest.js
UTF-8
5,701
2.734375
3
[ "MIT" ]
permissive
var csv = require('csv') var chalk = require('chalk') var util = require('util'); var table = require('easy-table') var appdriver = new ApplicationDriver() appdriver.printStartMsg() appdriver.loadPortfolioData((err) => { if (err.code === 'ENOENT') { console.log('Error Loading ' + err.thefile + ', File...
true
83f41e888ebc71488599743d67e065c4dde4ccb5
JavaScript
howardmann/js_study_notes
/composition/composition-2.js
UTF-8
1,872
4.6875
5
[]
no_license
// Example 1: Using object literal // Pros: is easy to read and understand // Cons: not suitable when you want to create multiple instances, when we change the number it will affect the add method var calculator = { first: 1, second: 2, add: function(){ return this.first + this.second } } console.log(calcu...
true
13e8f714b10a4d997e087c7894eb706dfc08c460
JavaScript
devfest-ufrn/livrei
/livrei/api/controllers/UserController.js
UTF-8
1,585
2.671875
3
[]
no_license
/** * UserController * * @description :: Server-side logic for managing users * @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers */ module.exports = { signup: function signup(req,res){ if(_.isUndefined(req.param('username')) || _.isUndefined(req.param('email')) || _.isUndefined(req...
true
701fa39723b956cf29fa96cab9a2330c78dceab3
JavaScript
denisbodnar/exercises
/randominteger.js
UTF-8
289
4.25
4
[]
no_license
/*Create an expression using both Math.random and Math.floor to generate a random integer between two variables, high and low, where high is greater than low.*/ var low = 14; var high = 56; var randomInteger = Math.floor(Math.random() * (high - low)) + low; console.log(randomInteger);
true
3d4252fa696417c978fdae823a7d4d1083750661
JavaScript
GuildCrafts/jareds-lectures
/Lecture 2017-08-15 Miocha and Chai/example-app/test/sortByCaseInsensitiveAlpha.test.js
UTF-8
642
2.671875
3
[]
no_license
const expect = require('chai').expect const sortByCaseInsensitiveAlpha = require('../sortByCaseInsensitiveAlpha') describe("sortByCaseInsensitiveAlpha", function(){ it('should be a function', function(){ expect(sortByCaseInsensitiveAlpha).to.be.a('function') }) it('should take an array and return an array'...
true
f29f35b4e7752bb290317c9b1133b3c7f2edb364
JavaScript
dave-grig/ACA-Homework-TWO
/script.js
UTF-8
2,992
3.859375
4
[]
no_license
//homework 2 // 1 // comment for me : checked function evenlySpacedNumsArray(a, b, num) { // im bad in math hope i wrote correct formula let space = (b - a) / (num - 1); let res = []; let currentNum = a; for (let i = 0; i < num; i++) { res.push(+currentNum.toFixed(2)); ...
true
9a48f51742328082f52f6ae1ee10ed342bd55b4b
JavaScript
orlandoGAero/cursoJavascriptUdemy
/22-Prototypes/js/02-app.js
UTF-8
729
3.671875
4
[]
no_license
function Cliente(nombre, edad) { this.nombre = nombre; this.edad = edad; } function Empresa(nombre, fundacion, categoria) { this.nombre = nombre; this.fundacion = fundacion; this.categoria = categoria; } function formatearCliente(cliente) { const {nombre, edad} = cliente; return `El clien...
true
bb266751726d42c2b7626a159c46829789697f1c
JavaScript
silenceboychen/node-cors
/index.js
UTF-8
717
2.640625
3
[]
no_license
'use strict'; module.exports = (whitelist) => { return function corsMiddleware(req, res, next){ let q = false; const url = req.headers['origin'] || req.headers['host']; for (const i of whitelist) { if (url.indexOf(i) !== -1) { q = true; break; } } if (!q) { res.end('Cross domain'); } els...
true
c79ff04139cf74104b582644064d2445620f292c
JavaScript
SquawkyToucan/Useless-Web
/main.js
UTF-8
1,177
3.53125
4
[]
no_license
function generateQuote() { var quotePartOne = ["My code is structurally oppressing me ", "I'm going to commit first ", "I would argue for authoritarianism ", "We should listen to what the government says ", "GitHub is bullying me ", "I like communism, ", "We should wear Hamilton shirts ", "GitHub is structurally oppr...
true
25260ecd91e97da8ca5fee818a600ccf1e50c38c
JavaScript
thefaraazansari/practice
/To do list/todo.js
UTF-8
1,295
2.9375
3
[]
no_license
let idCount = 0; document.querySelector("#add-btn").addEventListener("click", addCheckList); function addCheckList() { idCount += 1; document.querySelector(".text-msg").classList.add("hide"); document.querySelector(".task-container").insertAdjacentHTML("beforeend", `<div class="task-info"> ...
true
992949f1cad7378500498305fd28d3b70643fb11
JavaScript
shannonfromomaha/javascript-toy__starter-exercises
/05_BasicMath/global.js
UTF-8
798
4
4
[]
no_license
var input1 = prompt("Let's so some math! Please input a number."); var input2 = prompt("Input another number, please."); var input3 = prompt("One more number!"); num1 = parseFloat(input1) console.log("typeof number 1 is " + (typeof num1)); num2 = parseFloat(input2) console.log("typeof number 2 is " + (typeof num2)); n...
true
82de0c3e80e672c7972f3fe71fbe8029405649ca
JavaScript
matt-antone/match-dashboard
/components/match/Squad.js
UTF-8
3,196
2.65625
3
[]
no_license
import React, { Component } from 'react' import { default as listData } from '../json/sample-list'; import { default as Pilots } from './Pilots' class Squad extends Component { state = { squad: listData, manifest: [], upgrades: [], ships: [], pilots: [], } loading = { active: false, ...
true
68a28d25b496fd6f36c0ce5b3af86962506ca7e6
JavaScript
vitalboyzf/learning-notes
/算法/js算法刷题/数组/移动零.js
UTF-8
463
3.546875
4
[]
no_license
function moveZeroes(nums) { // 指向0的索引位置 let cur = 0; for (let i = 0; i < nums.length; i++) { // 遇到0跳出本次循环(i++,cur不加) if (nums[i] === 0) continue; // 如果cur和i相等,且都不等于0,就不能进行赋值0操作 if (cur !== i) { nums[cur] = nums[i]; nums[i] = 0; } cur++;...
true
8daa1e91e55bc641aa1e813b7bec831064d22cab
JavaScript
aitoroses/evented-cli
/lib/process_manifest.js
UTF-8
3,012
2.6875
3
[ "MIT" ]
permissive
var output = require('./output.js'); var fsx = require('fs-extra'); var async = require('async'); var spawn = require('child_process').spawn; var readline = require('readline'); var cwd = process.cwd(); var i, z, src, dest; // Processes manifest and puts contents into build dir var processManifest = function (manifest...
true
16333a5666811ee0497d71196cb81080bac1d932
JavaScript
RuRuChan/784163-sedona
/js/script.js
UTF-8
338
2.875
3
[]
no_license
function initMap() { // The location of place var place = {lat: 34.8697395, lng: -111.7609896}; // The map, centered at place var map = new google.maps.Map( document.getElementById('map'), {zoom: 13, center: place}); // The marker, positioned at place var marker = new google.maps.Marker({position: pla...
true
312d72a172edffc1e79b85454a9232ad9e77dc6f
JavaScript
adam-kuhn/remion-react
/examples/react/js/exportTasks.jsx
UTF-8
1,065
2.6875
3
[ "MIT" ]
permissive
var app = app || {}; (function () { 'use strict' app.ExportTasks = React.createClass({ click: function () { let rows = [['Task Name', 'Task Complete', 'Task Priority']] let csvContent = 'data:text/csv;charset=utf-8,' const todos = this.props.todos function compare (a, b) { ...
true
df3b21ba897402b9c9340623fc630f4249207b79
JavaScript
maximsnoep/funsualization
/public/scripts/visualization/visualizations.js
UTF-8
2,798
3.3125
3
[]
no_license
//// Draw correct layout, and fill it with the correct visualizations //// // Button and Canvas let updateLayout_btn = document.getElementById('updateLayout') let canvas = document.getElementById('canvas'); // Update Layout Button Listener updateLayout_btn.addEventListener('click', function(){ submitLayout(localStora...
true
b0dcecc158af73f16373afc7e92410a98b42624e
JavaScript
HumorYi/web-demo
/canvas/30443/js.js
UTF-8
1,793
2.875
3
[]
no_license
var FPS = 60; var FRAME_MSEC = 1000 / FPS >> 0; var center_X = 235; var center_Y = 235; var max = 220; var c = document.getElementById("canv"); var $ = c.getContext("2d"); var n = 0; setInterval(intervalHandler, FRAME_MSEC); function intervalHandler() { $.clearRect(0, 0, 500, 500); var prevX ...
true
9836d6d7044550f6f41058dde06d63de8265ad28
JavaScript
pjim/quizApp
/app.js
UTF-8
5,812
3.3125
3
[]
no_license
// an object with the questions built in var questions = [ {question: 'name the hair dog', answers:['monkey','dogdog','carrot','wolf'], correctAnswer: 'wolf'}, {question: 'how much cheese is in my house', answers: ['lots','not much','too much'], correctAnswer: 'lots'} ]; ...
true
e0a152e53638930f2cd484991ab97c2c054431f8
JavaScript
GlitchBliss/patroljournal
/path/web/js/ad439e6.js
UTF-8
7,655
3.421875
3
[ "MIT", "BSD-3-Clause" ]
permissive
/** * A Grid is the model of the playfield containing hexes * @constructor */ HT.Grid = function(/*double*/ width, /*double*/ height) { this.Hexes = []; //setup a dictionary for use later for assigning the X or Y CoOrd (depending on Orientation) var HexagonsByXOrYCoOrd = {}; //Dictionary<int, List<He...
true
d940eaa12687dcef4df92db763f083592a57805e
JavaScript
gigmap/front-end
/src/store/reducers/import/google/mapper.js
UTF-8
854
2.515625
3
[ "MIT" ]
permissive
import type {ImportEntry, ImportResult} from './types'; const sortOrder = (a: ImportEntry, b: ImportEntry) => { return a.googleArtist.title.toLowerCase() > b.googleArtist.title.toLowerCase() ? 1 : -1; }; export const mapImportEntries = (data: ImportEntry[]): ImportResult => { const result = data.reduce((sum, it...
true
ef85e5945797eb18180ab53665507603420ffc23
JavaScript
claudiacole96/fsw120
/w3-dice/src/components/Die.js
UTF-8
854
2.734375
3
[]
no_license
import React from "react" class Die extends React.Component { constructor(props) { super(props) this.state ={ isSelected: false } this.handleClick = this.handleClick.bind(this) } handleClick(e) { this.setState(prevState => { if (prevState.isS...
true
90354b400e30400874749fba09c135eba8da8bb9
JavaScript
gitrows/gitrows-utils
/lib/event.js
UTF-8
1,588
2.5625
3
[ "MIT" ]
permissive
const url = require('url'); const Event={ getData:async(event)=>{ let body=event.isBase64Encoded?Buffer.from(event.body, 'base64').toString('utf-8'):event.body; let data,urlParams; switch (event.headers['content-type']) { case 'application/x-www-form-urlencoded': urlParams=new url.URLSearchParams(body);...
true
f5bb3eb326b96db3e3e86e216896454e945aacfe
JavaScript
skywritergr/recipeApp
/app/scripts/app.js
UTF-8
2,447
2.640625
3
[]
no_license
'use strict'; /** * @ngdoc overview * @name recipeAppApp * @description * # recipeAppApp * * Main module of the application. */ angular .module('recipeAppApp', [ 'ngMessages', 'ngResource', 'ngRoute', 'ngSanitize' ]) .config(function ($routeProvider) { //Basic route configuration. The ...
true
4846dff7a8737d9966e56621b16aff698b9ae5bc
JavaScript
Zwerruga/Teachbase-test-task
/src/utils/registerValidator.js
UTF-8
857
2.78125
3
[]
no_license
export default function validateRegisterData({ login, email, password, cfPassword, }) { const errors = {}; errors.login = !login ? "Username is required" : login.length < 4 ? "Username must be at least 4 characcters long" : ""; errors.email = !email ? "Email is required" : !isEmailValid(e...
true
c6cc24c05897d0bcd9074395fae05ec23c74dbd3
JavaScript
vipinkumar-cse/Drum-Kit
/index.js
UTF-8
1,494
3.078125
3
[]
no_license
var numberofbuttons = document.querySelectorAll(".drum").length; for(var i=0;i<numberofbuttons;i++){ document.querySelectorAll(".drum")[i].addEventListener("click",play); } function play(){ soundselect(this.textContent); buttonpressed(this.textContent); } //function to detec keyboard document.addEventList...
true
66b7fa3db1140d452b846b2067f8e3ef535a6c3a
JavaScript
smylebifa/DisplayingTime
/time.js
UTF-8
750
3.375
3
[]
no_license
setInterval(function () { var date = new Date(); var year = date.getFullYear(), month = date.getMonth(), day = date.getDate(), hour = date.getHours(), minutes = date.getMinutes(); seconds = date.getSeconds(); month++; month = (month < 10) ? '0' + month : month; minutes = (minutes < 10) ? '0' + mi...
true
d092c72860cd791586a69517886953ea3d5760cb
JavaScript
Superjoon/Taboption
/js/LS_jQuery.js
UTF-8
1,928
2.78125
3
[]
no_license
$(function (){ /* $('#appSwitch li').each(function (index){ /!*each 遍历所有的li标签 function中的index在为每个匹配元素执行一个函数*!/ $(this).mouseover(function (){ // this == appSwitch li 鼠标移动到这个元素的时候执行函数内容. $('div.opContent').removeClass('opContent'); // 函数内容:找到content 并且删除这个样式类 ...
true
4e68c03aa2fd84206a578f8242b20728489a63d4
JavaScript
strikeentco/vk-api-calls
/lib/collect.js
UTF-8
867
2.640625
3
[ "MIT" ]
permissive
var objectAssign = require('object-assign'); var CollectStream = require('./collect-stream'); module.exports = function (method, query, callback) { var stream = new CollectStream(this, method, query); var promise = new Promise(function (resolve, reject) { var stored = { items: [] }; stream .on('data', f...
true
feee4a8ec54be27ccde98b646d89654d8292a786
JavaScript
x-sNOw/NetlrBot
/commands/limit.js
UTF-8
1,149
2.90625
3
[ "MIT" ]
permissive
exports.run = (client, message, args) =>{ const auth = message.member; if (!message.guild.me.hasPermission("CONNECT")) return message.channel.send(`I need the CONNECT permission to execute this command...`); if (!message.guild.me.hasPermission("SPEAK")) return message.channel.send(`I need the SPEAK permission...
true
a2432c9ac281106513cb1c68876d7dfb30f2e4b1
JavaScript
bresleveloper/node-basics
/_1 basics/consoles.js
UTF-8
105
2.65625
3
[]
no_license
console.log('hello to my consoles node app'); let a = 7; let b = 8 console.log('my a+b is ', a+b);
true
92f21d97686a89b03d90fc223b09c06b71a5a2d1
JavaScript
josecurioso/risk
/src/modelos/Soldado.js
UTF-8
1,508
2.75
3
[]
no_license
class Soldado extends Modelo { constructor(x, y, isLeft, jugador) { isLeft ? (super(jugador.soldado_izquierda, x, y), this.animDisparar = new Animacion(jugador.dispararIzquierda, 400, 50, 50, 50, 5, 8), this.animDerrota = new Animacion(jugador.derrotaIzquierda, 5...
true
94139a308946c66eec7d67d93621721f51efee62
JavaScript
alexkimin/GA-Assignments
/day08 jQuery practice/js/application.js
UTF-8
3,541
2.859375
3
[]
no_license
$(document).ready(function () { // Create Item // var createItem = function () { var itemName = $('#addItemNameValue').val(); //var itemName = $("input[name='name']").val(); var itemPrice = $('#addItemPriceValue').val(); itemPrice = Number(itemPrice).toFixed(2); // valide input name check i...
true
918ee1b1173cb1b96d2324bce393ed7ae56b7c93
JavaScript
jacob-orellana/transit-simulator
/unit_tests/test_simulation.js
UTF-8
4,789
2.65625
3
[]
no_license
QUnit.module('simulation.js'); /* globals QUnit SimulationEvent Simulation Decision Agent */ /* eslint-disable no-magic-numbers */ QUnit.test('step through events added up-front', (assert) => { const simulation = new Simulation(); const result = []; simulation.addEvent(new SimulationEvent(2, () => { result.p...
true
985071fdc76e393cb18caf8d34b496731267cfd9
JavaScript
enderlabs/teem_release_notes_fe
/src/utils/__tests__/access_tokens.test.js
UTF-8
2,992
2.5625
3
[]
no_license
import moment from 'moment'; import LocalStorageMock from '../../../test/utils/common_mocks'; import * as accessTokens from '../access_tokens'; import { clearData, updateTeemData } from '../local_storage'; Object.defineProperty(window, 'localStorage', { value: new LocalStorageMock(), }); describe('access_tokens uti...
true