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
44e4729ad614449634e72e6e6eead065c38cd740
JavaScript
ka-dev12/weather-sun
/js/liff-starter.js
UTF-8
5,620
2.90625
3
[]
no_license
window.onload = function() { const useNodeJS = false; // if you are not using a node server, set this value to false const defaultLiffId = ""; // change the default LIFF value if you are not using a node server // DO NOT CHANGE THIS let myLiffId = ""; // if node is used, fetch the environmen...
true
f89780e8aaf3cb59ab3f9b4fd6c70559ed7841cf
JavaScript
FlavioHenriique/tcc1-web
/src/main/webapp/js/buscas/niveisUnidade.js
UTF-8
1,627
2.65625
3
[]
no_license
function orgaoSuperior(urlInicial) { console.log("executando orgao Superior"); return cliqueFuncao = { events: { click: function (event) { let url = urlInicial + this.name + '/'; alterarUrl(urlPagina, url, "funcao"); client.open('GET', url, fal...
true
d5f9cf1a77221f457f9d3f59461c90f2357844c2
JavaScript
mattdvhope/netlifyWebpackReact
/build/react_router_rdx/components/google_map.js
UTF-8
709
2.609375
3
[]
no_license
import React, { Component } from 'react'; class GoogleMap extends Component { componentDidMount() { // a life-cycle method called after this component (GoogleMap) has been rendered to the screen // This enables third-party apis/libraries (which know nothing about react) to interact nicely with react. In this case ...
true
c7c8863c0a84cb59d85bfbfaeabd97e239b38c89
JavaScript
nachomirsol/Skylab-Coders-Bootcamp-2018
/precurso/proyectos/tema 1 Calculadora/calculator-pro.js
UTF-8
1,701
3.53125
4
[]
no_license
function calculatorPro(){ var totalSum = arguments[0]; var totalSubs = arguments[0]; var totalMult = arguments[0]; var totalDiv = arguments[0]; var results = []; for(var i=1;i<arguments.length;i++){ totalSum = totalSum+arguments[i]; totalSubs = totalSubs-arguments[i]; totalMult = totalMult*argu...
true
464370b8efd3b1ff3c10792ccb0213e23b7d8292
JavaScript
tonyajay/HTML-JS-Assignment
/12th.js
UTF-8
158
2.9375
3
[]
no_license
function average() { num = Number(document.getElementById("reqnum").value); document.getElementById("result").innerHTML = (num*(num+1))/(2*(num+1)); }
true
b87bb9ca41bea7c6c062381f1055a66187d03261
JavaScript
sunxiuguo/MyBlog
/剑指offer/16-合并两个排序的链表.js
UTF-8
1,012
3.921875
4
[]
no_license
// 题目描述 // 输入两个单调递增的链表,输出两个链表合成后的链表,当然我们需要合成后的链表满足单调不减规则。 /*function ListNode(x){ this.val = x; this.next = null; }*/ // 初始化为(pHead1为1, pHead2为2) // 1 -> 3 -> 5 -> 7 // 2 -> 4 -> 6 -> 8 // 第一次执行 拿出1, 结果链表变为 1 -> (下一次递归结果) // 此时pHead1为3,pHead2为2 // 3 -> 5 -> 7 // 2 -> 4 -> 6 -> 8 // 第三次执行, 拿出2...
true
78b605a22b68d1214eb28e089393013a76050dfb
JavaScript
kitety/step-study
/demos/webpack-study/loader/css-loader.js
UTF-8
807
2.9375
3
[]
no_license
// 参数就是源代码 function loader(source) { console.log("css-loader"); let reg = /url\((.+?)\)/g; let pos = 0; let arr = ["let list=[]"]; // 正则匹配出来进行替换 while ((current = reg.exec(source))) { //[matchUrl,group] "url('./img/06jpg')", // "'./img/06jpg'", [matchUrl, group] = current; let last = reg.la...
true
7a5f919f09b7558d59f3d36e856e3407b77d88f8
JavaScript
scharati/jhu-coursera-html-css-javascript
/lecture45-part1/js/script.js
UTF-8
239
3.421875
3
[]
no_license
// object creation: var company = new Object(); company.name ="Facebook"; company.ceo = new Object(); company.ceo.firstName = "Mark"; company.ceo.favColor = "blue"; var name = "newName"; company[name] = "My Name" console.log(company);
true
81de87f96d44dec815e95075c32b39c242dd6376
JavaScript
KevinJavierReyes/AdaThinkLabAssistantClass
/skillAlexa/server.js
UTF-8
6,929
2.71875
3
[]
no_license
const Alexa = require('ask-sdk'); const request = require("request"); const WELCOME_MESSAGE = "¡Hola! soy Ada la asistente virtual de tu educacion, solo dime que necesitas saber!!" const SKILL_NAME = 'Ada Teacher'; const HELP_MESSAGE = '<s>Me puedes preguntar información casi cualquier cosa,como mostrarte el sistema s...
true
edf4fb7de601893758b57cf4c861e1cc4184b55c
JavaScript
serchavalos/sudoku-js
/vanilla-js/src/js/Cell.js
UTF-8
2,561
3.453125
3
[]
no_license
class Cell { constructor (index = 0, value) { this.value = null; this.index = index; this.editable = true; this.selected = false; this.element = document.createElement('DIV'); try { this.setValue(value); this.editable = false; } catch (err) { // Ignore it. } thi...
true
39298552326ca7762b64fb39c29a58b8ed557261
JavaScript
npojoku/OnlineShopping
/frontend/js/checkOut.js
UTF-8
299
2.75
3
[ "MIT" ]
permissive
$(function () { $('#qtyBtn').on('click', function () { var qty = $('#qty').val(); var price = $('#price').text(); var productQty = $('#cQty').text(); var totalAmt = qty * price; document.getElementById('total').innerHTML = 'Total Amount: $' + totalAmt; }) })
true
11948da04d49be6fdea15f7d5d45744a306dba75
JavaScript
Miangame/miangame.github.io
/practicas/DWEC/ReentregaExamenDiciembreGavilanMerinoMiguelAngel/js/formulario.js
UTF-8
3,902
3.328125
3
[]
no_license
/** * @author Miguel Ángel Gavilán Merino */ { let nombre; let primerAp; let segundoAp; let fecha; let errorNombre; let errorPrimerAp; let errorSegundoAp; let errorFecha; let botonCrear; let botonLimpiar; let arrayErrores = []; let error = false; let patrones =...
true
47ab181b82dafaa69db991e5ddbe63079b031966
JavaScript
MdSakibUddin/Banking
/js/banking.js
UTF-8
2,028
3.078125
3
[]
no_license
//handle deposite button document.getElementById('deposit-button').addEventListener('click', function () { //get the ammount deposited var depositInput = document.getElementById('deposit-input'); var depositAmmountText = depositInput.value; var newDepositAmmount = parseFloat(depositAmmountText); // ...
true
1317f1d0ed49a5ce40ac57a46e6bfa612be603d4
JavaScript
augustoerico/hello-react
/public/components/GreeterForm.jsx
UTF-8
780
2.734375
3
[]
no_license
var React = require('react') var GreeterForm = React.createClass({ handleSubmit: function (e) { e.preventDefault(); var nameRef = this.refs.name; var messageRef = this.refs.message; var update = { name: nameRef.value, message: messageRef.value }; nameRef.value = ''; messageRe...
true
0889fb01280228327ec57fafee5e7e02bfda0dba
JavaScript
aaj3f/js-templates-advanced-templating-lab-online-web-ft-112618
/index.js
UTF-8
2,134
3.171875
3
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
function init() { //put any page initialization/handlebars initialization here let recipeFormTemplate = document.querySelector('#recipe-form-template').innerHTML let recipeFormFn = Handlebars.compile(recipeFormTemplate) document.querySelector('main').innerHTML = recipeFormFn({ingredients: ['','','','','']}) ...
true
8d9845342af217f8e63105d013fb412ef028ba21
JavaScript
Catrinici/JS_fundamentals
/js_math.js
UTF-8
2,064
4.84375
5
[]
no_license
// Assignment: JavaScript Math // Complete the below challenges using JavaScript's Math object. // Math 1 // Write a function called zero_negativity(). This function should take an array. Return true if the input array contains no negative numbers, return false if it does. function zero_negativity(arr) { for (let ...
true
ca937576e1a4323772ffa3e853bddfea7193069f
JavaScript
DariuszMajchrowicz/webCV
/app/scripts/_boxes.js
UTF-8
6,500
2.890625
3
[]
no_license
// ======= Boxes.JS ======= console.log('Boxes is loaded'); class Boxes { constructor() { // == Setings == this.carouselTime = 5000; this.animationTime = 0.5; this.introTime = 1; this.numberOfBoxes = 5; this.rotationArray = []; for (let i = 0; i < this.numberOfBoxes; i++) { this.ro...
true
8b670f370325b0ee7602953dbb10dd2b99b9084a
JavaScript
vikashkumarchoudhary/regex-1
/building_a_modular_compiler.js
UTF-8
372
2.5625
3
[]
no_license
function cross(_r){ } function bar(_r){ return 5; } function foo(_r){ var bar1 = _r('import bar'); console.log(bar1); } var _req = function (_request) { // Write your code within this block var regex = /import\s([a-z]+)/g; var str = _request; var m=regex.exec(str); var m1=eval(m[1]); console.log(m[1]) return m1(_req)...
true
f634aeb266b01b65ac2bddacf1cd2cec8484757e
JavaScript
bloodskyfirst/GuJian3-demo
/js/body.js
UTF-8
8,748
3.109375
3
[]
no_license
//广告页以及取消按钮 (function() { var ad = document.getElementsByClassName("ad")[0]; var black = document.getElementsByClassName("av")[0].nextElementSibling.nextElementSibling.nextElementSibling //这里不把大的div 隐藏是因为让div压住位置 setTimeout(function() { ad.children[0].style.display = "none" ad.children[1].style.display =...
true
9b17977d0b210b5849d86e89760c3cb0ec94bb89
JavaScript
theart84/bjs-homeworks
/2.2-object-prototype/task.js
UTF-8
622
3.4375
3
[]
no_license
'use strict' String.prototype.isPalindrome = function() { const source = this.toLowerCase().replace(/\s/g, '').split(""); return source.join("") === source.reverse().join(""); } function getAverageMark(marks) { if (marks.length === 0) return 0; const average = marks.reduce((curValue, prevValue) => { re...
true
4b8d0ef6c7ec716a2efa70270480cc87fa36de7a
JavaScript
dmbaranov/rssReader
/js/script.js
UTF-8
3,213
2.734375
3
[]
no_license
$(function () { var RSSReader = function () { this.navigation = $('.page-header__navigation'); this.posts = $('.page-posts'); this.template = $('.page-posts__post-tmpl'); this.feedUrl = 'http://node.dev.puzankov.com/rss/data'; this.postsOnPage = 5; this.pagination = $('.widget-tags__tags'); ...
true
1501a9bdfe3d9e04f4b9f63261deb7e66416ce5d
JavaScript
tienhieuD/webpack-demo
/src/index.js
UTF-8
643
2.546875
3
[]
no_license
import imgWebpack from "./assets/images/img_webpack.png" import "./assets/scss/style.scss" function createImgElement() { const imgElement = document.createElement("img") imgElement.src = imgWebpack imgElement.alt = "webpack từ A đến Á cùng kentrung" return imgElement } document.getElementById("root").appendCh...
true
4926de6b2b6e455b0ee840944ae6049801b3e814
JavaScript
rezaulhreza/Moose-Coffee
/logger.js
UTF-8
922
3.328125
3
[]
no_license
const EventEmitter = require('events') // the uuid creates an universal and unique identifier const uuid = require('uuid') // console.log(uuid.v4()) // console.log(uuid.v4()) // console.log(uuid.v4()) // console.log(uuid.v4()) // console.log(uuid.v4()) // console.log(uuid.v4()) // console.log(uuid.v4()) // console.lo...
true
ce2f6fcffaf45d9893d2ba4233d83179b7bb90f0
JavaScript
doprojects/safetymaps-archive
/markerclip.js
UTF-8
2,223
2.78125
3
[]
no_license
function MarkerClip(map) { this.map = map; var theClip = this; var markerDiv = document.createElement('div'); markerDiv.id = map.parent.id + '-markerClip-' + new Date().getTime(); markerDiv.style.margin = '0'; markerDiv.style.padding = '0'; markerDiv.style.position = 'absolute'; mark...
true
056e12bcb89ab356f17dd9f29ed42602b0be254d
JavaScript
adrienluitot/trixcms_polycraft
/PolyCraft/assets/js/vote.js
UTF-8
3,459
2.546875
3
[ "MIT" ]
permissive
let path = document.location.href; let pathURL = path.substring(0 , path.lastIndexOf("/")); $('.vote-btn').on('click', function () { let pseudo_field = $('#pseudo_step1').val(); postFormData('/vote/check/pseudo', {pseudo: pseudo_field}, 1).then(function (data) { if(data) { $('#pseudo-step2'...
true
6c2adc1fd69fa0ce0218c5a877c62e569ba9f26d
JavaScript
DanielSalmeron3b/my-store
/index.js
UTF-8
832
2.75
3
[]
no_license
//Se importa todas las dependencias y/o librerías necesarias const express = require('express'); const routerApi = require('./routes'); const { logErrors, errorHandler, boomErrorHandler} = require('./middlewares/error.handler') const app = express(); const port = 3000; //Se usa un Middleware para poder usar el método...
true
49f126475ff28638980ada252cf9acbb2d4df03c
JavaScript
r-kanamaru/chat-space
/app/assets/javascripts/index.js
UTF-8
1,730
2.53125
3
[]
no_license
$(document).on('turbolinks:load', function() { $(function(){ function buildHTML(message){ var addImgTag = (message.image.url !== null)? `<img src="${ message.image.url }", class="contents__right--main__message_image">`:'' var html =` <li class="contents__right--main__message_wrapper" data-mess...
true
5e915c7e9fb632580b35a3d4aa47ca46aaaad08c
JavaScript
burpcat/Youtubers
/src/get/channel.js
UTF-8
3,472
2.84375
3
[ "MIT" ]
permissive
/* * This file will attempt to get a channel's information. If not * found, it will try to get a user's information. * Created On 09 November 2020 */ import utilities from '@vasanthdeveloper/utilities' import axios from 'axios' export default async channel => { // fetch the channel info from the YouTube ...
true
18457b8d406115de208b217d58ce9742ed9d3e24
JavaScript
ma1ex/star-db
/src/components/random-planet/random-planet.js
UTF-8
4,081
3.03125
3
[]
no_license
import React, { Component } from 'react'; import SwapiService from '../../services/swapi-service'; import Spinner from '../spinner'; import ErrorIndicator from '../error-indicator'; import './random-planet.css'; export default class RandomPlanet extends Component { // Объект сервиса для работы с удаленным серверо...
true
ce60fdc061f7c7b4d5e03b2df667fff6581ab5e6
JavaScript
caturprasatya/RUKUN
/AWS/test/UserLogin.test.js
UTF-8
2,121
2.546875
3
[]
no_license
const request = require('supertest') const app = require('../app') describe('TESTING /users/login', () => { let user = { username: "MakmurJaya", password: "123asd" } it('Should return reponse with status code 200', function(done) { request(app) .post('/user/login') .send(user) .end(functi...
true
50688cfb6b27080a993cacaad697a6dc3fe63d9f
JavaScript
yehtony/node-tutorial
/src/basic/app.js
UTF-8
324
3.8125
4
[]
no_license
setTimeout(() => { console.log("timeout") }, 1000) // The first parameter is a function to be executed. // The second parameter indicates the number of milliseconds before execution. setInterval(() => { console.log("interval") }, 1000) // The setInterval() method repeats a given function at every given time-inter...
true
6338a21c5d9f3011dcf2bdb18b3f64bcbdc1a49f
JavaScript
samyakag/Tunnel_Runner
/obstacles.js
UTF-8
2,421
3.234375
3
[]
no_license
function initBuffersObstacles(gl, n) { // Create a buffer for the cube's vertex positions. const positionBuffer = gl.createBuffer(); // Select the positionBuffer as the one to apply buffer // operations to from here out. gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer); // Now create an array...
true
58d6ff7f4b0f14b231085e73ba08355813364499
JavaScript
SmitPatel910/Website-with-Tableau-of-content
/app.js
UTF-8
2,045
3
3
[ "MIT" ]
permissive
const hamburger = document.querySelector('.header .nav-bar .nav-list .hamburger'); const mobile_menu = document.querySelector('.header .nav-bar .nav-list ul'); const menu_item = document.querySelectorAll('.header .nav-bar .nav-list ul li a'); const header = document.querySelector('.header.container'); hamburger.a...
true
af4f39806b133d0b6b30915baef79108b249d233
JavaScript
ashleighcoster/wd77-jsFundamentals
/1-grammarAndTypes/04-hoisting.js
UTF-8
928
4.5
4
[]
no_license
/* HOISTING 1-grammarAndTypes 04-hoisting.js */ //example 1: console.log(scissors); var scissors = 'blue'; //var declaration = variable initialization //example 1 breakdown: var scissors got 'hoisted' to the top; js pulls all variables and functions to top of file; can define variables after using them because...
true
de43a81c7a8a07260aa2e0941799d2fa12bc9c80
JavaScript
trajanofelipe/projeto_aposentadoria_LDW
/SimulaApos/WebContent/js/funcoesDAO.js
UTF-8
4,476
3.546875
4
[]
no_license
/*$(function(){ $('#btn1').on("click",function(){ var sexo = document.getElementById("sexo").value; document.querySelector("#resultado").innerHTML = sexo; }); });*/ $(function(){ $('#btn1').on("click",function(){ var num1 = document.querySelector(".n1").value; var num2 = document.querySelector("....
true
d65bc7ac72a99f83ed8c475fc99fa75841f6777f
JavaScript
mikeio/portfolio-2017
/js/main.js
UTF-8
3,957
2.59375
3
[ "MIT" ]
permissive
$(document).ready(function() { $('.menu, .mobile-nav a').on('click', function() { $('.menu').toggleClass('menu-open'); $('.mobile-nav').fadeToggle(); $("body").toggleClass("overflow-hidden"); }); $(".logo").hover(function () { $(this).toggleClass("start"); }); // set...
true
8b21a9c58cade7d7fa512c32c1a0deda5f96661d
JavaScript
ktd0885/cis-3023-programs
/sales_tax.js
UTF-8
708
2.8125
3
[]
no_license
var $ = function (id) { return document.getElementById(id); } var calculate = function () { var floatsubtotal, inttaxrate, floatshippingcharges, floatsalestax, floattotalamount; floatsubtotal = parseFloat ($("subtotal").value); inttaxrate = parseInt ($("tax_rate").value); floatshippingcharges = parseFloat ($(...
true
d6bf64a03e8c60954f9045d19e5972a537b2d4cd
JavaScript
xyphergrim/yelp-camp-v14
/routes/index.js
UTF-8
3,603
2.75
3
[]
no_license
//================ // AUTH ROUTES //================ var express = require("express"); var router = express.Router(); var passport = require("passport"); var User = require("../models/user"); var Campground = require("../models/campground"); // Root route router.get("/", function(req, res){ res.render("landing"); ...
true
bd790926cd1b9a79604392cb511da5697c460b00
JavaScript
daniel-williams/jscalator
/src/structures/linkedList/LinkedList.js
UTF-8
5,136
3.640625
4
[]
no_license
class LinkedList { constructor() { this._head = null; this._count = 0; } get head() { return this._head; } set head(head) { this._head = head; } add(data) { let newNode = new LinkedListNode(data); // special case: head node is null if(!this._head) { this.head = newNode...
true
eb32817065f719f1d7fb622f8da8bed2d419d495
JavaScript
DanThePutzer/Weekz
/scrpt/signUp.js
UTF-8
3,088
2.59375
3
[]
no_license
// Get Elements var txtFirstname = document.getElementById('first'); var txtLastname = document.getElementById('last'); var txtEmail = document.getElementById('email'); var txtPassword1 = document.getElementById('password1'); var txtPassword2 = document.getElementById('password2'); var btnSignup = document.getElementBy...
true
6fcf025208a47617411543553664ab128f68e111
JavaScript
webXLing/ReactLean
/learn-basic/react-project/src/10_高阶组件/04_高阶组件-增强props-改进 copy.js
UTF-8
1,536
2.515625
3
[]
no_license
/* * @Author: web_XL * @Date: 2021-04-27 22:42:34 * @LastEditors: web_XL * @LastEditTime: 2021-05-05 15:21:54 * @Description: */ import React, { PureComponent, createContext } from 'react' const UserContext = createContext({ // 默认值 name: "moren", age: "moren", job: "moren" }) function enhance (Wrapper) {...
true
a62e76c9acbf222b9652de7fa3dce4f63c2e19d3
JavaScript
supersaiyanslayin420/arc-electron
/scripts/packages/arc-preferences/spec/session-control.main.spec.js
UTF-8
7,426
2.75
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
const assert = require('chai').assert; const fs = require('fs-extra'); const path = require('path'); const {ArcSessionControl} = require('../main'); describe('ArcSessionControl class - main process', function() { describe('Initialization', function() { it('Sets "id" property', function() { const instance =...
true
c53ae6d08fe7b139b2512ff9a26b60b559e2d48f
JavaScript
40a/tldr.jsx
/src/actions/Command.js
UTF-8
2,094
2.515625
3
[]
no_license
import Rx from 'rx'; import request from 'axios'; import moment from 'moment'; const INDEX_URL = "//tldr-pages.github.io/assets/index.json"; // in-memory storage let _commands; let search = (name) => { return getIndex() .filter( byName(name) ) .last( fallbackCommand() ); }; let byName = (name) => { ret...
true
4efa48b72aaec2419f1fafd596cf065a56d25716
JavaScript
stalker3343/stalker3343.github.io
/startTemplate/src/js/scripts/scripts.js
UTF-8
416
2.875
3
[]
no_license
var popup = document.getElementById('popup'), call = document.getElementById('call'), close = document.getElementById('close'); call.addEventListener('click', () => { popup.style.display ='block'; } ); close.addEventListener('click',() => { popup.style.display ='none'; }); window.onclick = function(ev...
true
a3b41586d3369b7290fc8ed48b98166169303c54
JavaScript
FinchRatel/utils
/randomNumber.js
UTF-8
471
3.421875
3
[ "MIT" ]
permissive
/** * 生成任意范围内随机数 * 支持正数,负数,整数,小数 * 默认范围[0, 100] * min: 最小值 * max: 最大值 * len: 小数点后位数 */ function randomNumber(min = 0, max = 100, len = 0) { return Number((min + (max - min) * Math.random()).toFixed(len)); } /** * test */ function randomNumberTest() { setInterval(() => { console.log(randomNumber(0, 100...
true
e00f833e36c4f6bdbf6cad5b0d377cf7920cfce8
JavaScript
vcernomschi/test-node-github-api
/bin/tools/Templates/AbstractConfigTemplate.js
UTF-8
996
2.703125
3
[ "MIT" ]
permissive
/** * Created by CCristi <ccovali@mitocgroup.com> on 4/5/16. */ 'use strict'; import {AbstractTemplate} from './AbstractTemplate'; /** * Abstract Config Template */ export class AbstractConfigTemplate extends AbstractTemplate { /** * @param {Object} config * @param {Object} extendedConfig * @return {O...
true
75d76cd480fa90fd36f566df1a3a672c98a0a5f2
JavaScript
Edwardpauldrgst/Edwardpauldrgst.github.io
/22_fetch_DOGA/alap2.js
UTF-8
1,199
3.078125
3
[]
no_license
function nevnap_datum(){ var datum=document.getElementById("bevitel1").value ; fetch("https://api.nevnapok.eu/nap/"+datum) .then(x => x.json()) .then(y => megjelenit1(y,datum)); } function nevnap_nev(){ var nev=document.getElementById("bevitel2").value ; fetch("https://api.nevnapok.eu/...
true
66a38c7d12517c1bb1e2d0eaf358dfb0ffd3174c
JavaScript
appsincaps/euler_project
/76-100/079_Passcode_derivation.js
UTF-8
291
2.59375
3
[]
no_license
var fs = require('fs'), source = 'p079_keylog.txt', data = fs.readFileSync(source, "utf8").trim().split('\n'); //.map(n=>n.split('').map(Number)); console.log(data.length); data = data.filter((v,i)=>data.indexOf(v,i+1)<0); console.log(data.length); data.sort(); console.log(data);
true
761857a489b710732041f3d315564b45a0b99de3
JavaScript
phonofidelic/projektor-client
/src/utils/createWorkItems.js
UTF-8
482
2.78125
3
[]
no_license
import { uuid } from 'uuidv4'; export default function createWorkItems(n, totalTime) { let workItems = []; for (let i = 0; i < n; i++) { let date = new Date(); workItems.push({ id: uuid(), created: date.setHours(date.getHours() - 4 * i), start: date.setHours(date.getHours() - 4 * i), ...
true
048aca9278e09484faa833eccf4047871b21d586
JavaScript
NazeeshaPattan/GUVI
/day4/2.warmup probs/prob1.js
UTF-8
562
4.75
5
[]
no_license
/* Problem: Write a function called “addFive”. Given a number, “addFive” returns 5 added to that number. Input: addFive(5); addFive(0); addFive(-5); Output: 10 5 0 */ function addFive(num) { //this function will 5 added to the given input try{ if(typeof(num) !== "number")throw "Input is not a Number" //if th...
true
ffaf795d12624c2f0075cb864f6d34a5dd209cf5
JavaScript
jhildenbiddle/css-vars-ponyfill
/src/transform-css.js
UTF-8
7,602
3.078125
3
[ "MIT" ]
permissive
/** * Based on rework-vars by reworkcss * https://github.com/reworkcss/rework-vars */ // Dependencies // ============================================================================= import balanced from 'balanced-match'; import parseCss from './parse-css'; import stringifyCss from './stringify-css'; impor...
true
d3ac4c1a7ceaced811bb235d89af110f879130b5
JavaScript
international-rural-school-report-org/International-Rural-School-Report
/JS/about.js
UTF-8
693
2.953125
3
[]
no_license
class Team { constructor(teamElement) { this.teamContent = teamElement.querySelector(".team-content"); this.buttonsGroup = teamElement.querySelector(".team-buttons"); this.openButton = teamElement.querySelector(".team-btn-open"); this.closeButton = teamElement.querySelector(".team-btn-close"); thi...
true
72e00457c40837db04d2f7b834acca2383c01e68
JavaScript
KimFrans/bootcamp-tests
/functions/findItemsOver20.js
UTF-8
185
3
3
[]
no_license
function findItemsOver20(itemList){ var over20 =[]; for(var i in itemList){ if(itemList[i].qty > 20){ over20.push(itemList[i]) } } return over20; }
true
aed26770f4319f8c1dfdd6be27541fac0bf6b185
JavaScript
jfparadis/agoric-sdk
/packages/ERTP/src/config/coreMintKeeper.js
UTF-8
1,131
2.578125
3
[ "Apache-2.0" ]
permissive
import harden from '@agoric/harden'; import makeStore from '@agoric/store'; export function makeCoreMintKeeper() { // An asset can either be a purse or payment. An asset keeper // keeps track of either all of the purses (purseKeeper) or all // of the payments (paymentKeeper) and their respective units. functi...
true
6f07e9db8852fdf454d161d2cda58bd6c10f9a41
JavaScript
Nishant98/bits-students
/client/src/components/MainComponent.js
UTF-8
2,098
2.59375
3
[]
no_license
import React, { Component } from 'react'; import Header from './HeaderComponent'; import Footer from './FooterComponent'; import Home from './HomeComponent'; import { Switch, Route, Redirect, withRouter } from 'react-router-dom'; import { connect } from 'react-redux'; import { fetchStudents, postStudent } from '../redu...
true
257ab4a9620f3282c129d3781147e3e140ff9efd
JavaScript
Daniel-Choiniere/FCCT
/sortedUnion.js
UTF-8
1,268
4.6875
5
[]
no_license
// Write a function that takes two or more arrays and returns a new array of unique // values in the order of the original provided arrays. // In other words, all values present from all arrays should be included in their // original order, but with no duplicates in the final array. // The unique numbers should be so...
true
622f3388c08b156bfdd55d9f8ea9c19d69d518bd
JavaScript
CONDOTH1/spokeTestData
/lib/person.js
UTF-8
2,612
2.8125
3
[]
no_license
var faker = require('Faker'); var personDetails = require('./personDetails'); var addressDetails = require('./addressDetails'); var uuid = require('node-uuid'); var contactDetails = require('./contactDetails'); function randomAddressNumber() { return Math.floor(Math.random() * 2063); } function chooseRandom(array){...
true
9f80cb472b286722e0d8205603894520bffac4c0
JavaScript
ddugovic/blitz-tactics
/app/javascript/components/position_trainer/index.js
UTF-8
2,357
2.8125
3
[ "MIT" ]
permissive
import Chess from 'chess.js' import StockfishEngine from '../../workers/stockfish_engine' import InteractiveBoard from '../interactive_board' import Instructions from './views/instructions' import Actions from './views/actions' import { uciToMove, getConfig } from '../../utils' import { dispatch, subscribe } from '../...
true
5f3f06c7b4bc842e72872417e05b6d35d8d09584
JavaScript
JoshSutcliffe/anonClosureExample
/main.js
UTF-8
245
3.84375
4
[]
no_license
// Example of an anonymous function (function() { console.log("I am anonymous") })(); // Example of closures (function() { var message = "I'm in a closure"; $('button').on('click', function(){ alert(message); }); })();
true
dbaf761a43c4ba4c3517b944c0f3ea896feeb1ba
JavaScript
chromium/chromium
/components/test/data/payments/has_enrolled_instrument.js
UTF-8
2,317
2.640625
3
[ "BSD-3-Clause" ]
permissive
/* * Copyright 2019 The Chromium Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ /** * Builds a PaymentRequest for the given method with the given options. * @param {PaymentOptions} options - The payment options to use. * @param {DOMString} method...
true
f75c3261cef6d66b931a24e58c7986a5991d3f74
JavaScript
Galileo1998/IMPULSEHDC
/Home/assets/js/bigvideo.js
UTF-8
1,317
2.546875
3
[ "MIT" ]
permissive
$(function() { "use strict"; domReady(() => { const elems = document.querySelectorAll('.ugb-video-popup') const openVideo = el => { if (BigPicture) { const videoID = el.getAttribute('data-video') const args = { el, ...
true
4528560b1a9dc05c4d5d961881f02bf0a5f0c4ec
JavaScript
terkalma/mischa
/empty-example/sketch.js
UTF-8
3,793
2.671875
3
[]
no_license
var canvas, wave, sound, amplitude, img, threshold, started; function preload() { sound = loadSound('mischa.mp3'); img = loadImage("gradient.png"); } function setup() { canvas = createCanvas(window.innerWidth, window.innerHeight, WEBGL); wave = new Wave(10, 0.9, 0.7, 5...
true
1e7ec2881b27f82d2d20e27a42754db06f68eaf9
JavaScript
sskyh0208/env_flask
/web/flaskr/static/js/login_modal/main.js
UTF-8
3,546
2.5625
3
[]
no_license
const loginOpen = document.getElementById('login-open'); const loginClose = document.getElementById('login-close'); const loginModal = document.getElementById('login-modal'); const loginMask = document.getElementById('login-mask'); const loginRegister = document.getElementById('login-register'); const registerClose =...
true
22e1d35922d8e5879f76bf19eb9261798b15848d
JavaScript
tatigoliat/html5-sqlite
/js/demo/02.Recibo.js
UTF-8
445
2.515625
3
[ "MIT" ]
permissive
var Recibo = function () { nova.data.Entity.call(this); this.cliente_id = ""; this.domicilio = ""; this.fecha = ""; this.monto_total = 0; }; Recibo.prototype = new nova.data.Entity(); Recibo.constructor = Recibo; Recibo.prototype.updateFrom = function(recibo) { this.cliente_id = recibo.clien...
true
74a0c76b0a9ab9ffc2a2215dc17a31331f90e52d
JavaScript
mmaxgamma/FirstQuiz
/quizGame.js
UTF-8
2,892
3.953125
4
[]
no_license
const quizContent = document.getElementById("quizContainer"); const question = document.getElementById("question"); let answerOne = document.getElementById("answerOne"); let answerTwo = document.getElementById("answerTwo"); let answerThree = document.getElementById("answerThree"); let answerFour = document.getElementBy...
true
6ba600270cbb76f74de80218732efa15e7222c1a
JavaScript
kennethoo/Chat-room
/script2.js
UTF-8
1,194
2.53125
3
[]
no_license
let containermessage = document.getElementById("container-message") let box =document.getElementById("box-send") let sendmessage = document.getElementById("send-message") let modal =document.getElementById("modal") let info = document.getElementById("info") let information = document.getElementById("information") let...
true
8bfedc73de1c0ca2eead5ff45f57be448fed3ab7
JavaScript
joshuamakula/Refactory-Catalyst005-Final-Technical-Assessment
/JoshuaMakula/public/js/validate.js
UTF-8
2,122
2.90625
3
[]
no_license
function validateForm() { surName = document.covidReg.surName; givenName = document.covidReg.givenName; dob = document.covidReg.dob; residence = document.covidReg.residence; occupation = document.covidReg.occupation; nationality = document.covidReg.nationality; gender = document.covidReg.gen...
true
d493c58efba4e8a9b58e1286c78d3986daafbbd5
JavaScript
PiotrKalinski/zombie
/functions/removeItemFromEquipment.js
UTF-8
1,410
2.59375
3
[]
no_license
const { ZOMBIE_TABLE, ITEM_TABLE } = process.env; const dbClient = require('../utils/ddb.js'); const log = require('../utils/log.js'); const getPriceList = require('../utils/getPriceList'); const response = require('../utils/response.js'); module.exports.handler = async (event, context, callback) => { log.info('Even...
true
1bc2539ce7cbca389be52467dee5641f07e3dd69
JavaScript
gibbi03/FinalProject
/game.js
UTF-8
1,134
3.640625
4
[]
no_license
//Game// //Define variables var character = document.getElementById("character"); var bullet = document.getElementById("bullet"); var counter=0; //Function for making character jump function jump(){ if(character.classList == "animate"){return} character.classList.add("animate"); setTimeout(function(){ ...
true
418f16d8c98053f817bf4799de44bc6fca357d84
JavaScript
aleks279/ai-project1
/spec/javascripts/App.spec.js
UTF-8
1,788
2.515625
3
[]
no_license
jest.mock('axios', () => ({ get: jest.fn(() => Promise.resolve({ data: { "moves": [1,2], "computer_move": 6 } })) })) import { shallow } from 'vue-test-utils' import Vue from 'vue' import App from 'components/App' import axios from 'axios' describe('App.vue', () => { let wrapper beforeEac...
true
f19fbf6b9edca03308654370747bf94389a170ba
JavaScript
golubev-andrey/jest-enzyme-tutorial
/src/middlewares/async.js
UTF-8
507
2.609375
3
[]
no_license
export default ({dispatch}) => next => action => { // check to see if the action has a propmise on porperty if (!action.payload || !action.payload.then) { return next(action) } // if it does then wait for it to resolve // if it doesnt send the action to next middleware action.payload.then((response) =>...
true
c79a03293f9e9400d8671fac149fcd7032f83a5d
JavaScript
JaySnyder/Snyder_Edward_WPF
/Expression Assignment/Expressions_Industry/js/script.js
UTF-8
1,048
3.390625
3
[]
no_license
/* JaySnyder 6/10/2014 Expressions_Industry */ //calculating the cost per copy for client and any sub-clients, then //divide equally between clients and sub-clients. Final result will be an accurate client billing.// var colorCopies = prompt ("How many color copies were made?");//color copies made console.log(color...
true
cc04d4eee73f7282b50c1a2937ac11ace89f2829
JavaScript
vishesh/whalesong
/whalesong/image/private/colordb.js
UTF-8
10,102
2.71875
3
[]
no_license
// This might want to live in the Racket world rather than in // JavaScript land... var colorNamespace = MACHINE.modules['whalesong/image/private/color.rkt'].getExternalExports(); var colorStruct = colorNamespace.get('struct:color'); var makeColor = function(r,g,b,a) { return colorStruct.constructor([r,g,b,a]); }; ...
true
45f3ac58ec4049af31b32b9a3cf6d7dccf7ca7d4
JavaScript
mw10104587/predictions-2016
/app/SenateSeats.js
UTF-8
365
2.5625
3
[]
no_license
'use strict' module.exports = class SenateSeats { constructor(all) { this.all = all this.class_3_by_state_code = new Map() all.forEach(seat => { if (seat.seat_class == 3) { this.class_3_by_state_code.set(seat.state_code, seat) } }) } get_class_3(state_code) { return this...
true
c7443397e70720274355cc7ca9a46e89042fad51
JavaScript
PCSailor/prime_prestudy_01
/script.js
UTF-8
83
2.921875
3
[]
no_license
var msg = "Hey this works!"; var func = function() { console.log(msg); } func();
true
498df3c4d0d86f0412a1079dbc70bd815baa6c72
JavaScript
randallsquared/micro-urlencoded
/index.js
UTF-8
1,272
2.53125
3
[ "Unlicense", "LicenseRef-scancode-public-domain" ]
permissive
const qs = require('qs'); const parse = require('url').parse; const isString = require('is-string'); const { buffer, createError } = require('micro'); const query = async (unk, options) => { if (isString(unk)) { return qs.parse(unk, options); } else if (Buffer.isBuffer(unk)) { return query(unk.toString(), ...
true
2789146b34210294fc0279b72f15d225aed3cd62
JavaScript
Davidjuajinoy/Prueba-Asesores-Java
/src/main/webapp/assets/js/app.js
UTF-8
58,407
2.75
3
[]
no_license
// Efecto index if(location.pathname == "/PruebaAsesores/") { const cardHover= document.querySelectorAll('.hover').forEach(hover => { hover.addEventListener('mouseover',()=>[ hover.classList.add('box-shadow-custom') ]) hover.addEventListener('mouseout',()=>{ hover.classList.remove('box-shadow-cu...
true
5cc34633e56369756caec0089a7b94d99d880c61
JavaScript
yassine-ghaleb/zodiacs
/js/main.js
UTF-8
7,116
3.140625
3
[]
no_license
var zodiacs =[ { Horoscope:"aquarius", img: "img/aquarius.jpg", description:"Perhaps the most misunderstood sign of the zodiac,we can for sure say that the Aquarius personality values intelligence, ideas and loves a good theory. Yet progress for its own sake is not what you’re after; Aquarius people are the discrimi...
true
6394830872fb80d16bde3e393a453ed9e296d985
JavaScript
kate-grant/love-in-the-time-of-covid
/server/controllers/advice-ctrl.js
UTF-8
4,180
2.6875
3
[]
no_license
const Advice = require('../models/advice-model.js') createAdvice = (req, res) => { console.log("1"); const body = req.body if (!body) { return res.status(400).json({ success: false, error: 'You must provide a date idea', }) } console.log("2"); const adv...
true
b0e9b5ddf0c6afbf00229c51dabb596f3477b6db
JavaScript
Gwash3189/just-state
/lib/logger.js
UTF-8
1,136
2.84375
3
[]
no_license
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _uniqueId = require('lodash/uniqueId'); var _uniqueId2 = _interopRequireDefault(_uniqueId); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var stateChangeId = _uniqueId2.default.bind(...
true
66fb31d9b155e245f7433e4e8ff6472cc1bdf9f3
JavaScript
mevorahde/DevEd_JavaScript_Course
/Basics/scope.js
UTF-8
857
4.25
4
[]
no_license
let food = "apple"; let fruits = 5; var x = 2; function store() { console.log("Function Scope: " + food); } //GLOBAL SCOPE console.log("Global Scope: " + food); //FUNCTION SCOPE store(); //BLOCK SCOPE if (true) { console.log("Block Scope: " + food); } // function store() { // let food = "...
true
73742b30c8b7d8cc705caccf9f9db9a12da98189
JavaScript
nadineb1160/READMEGenerator
/inputFilledIn.js
UTF-8
1,635
2.9375
3
[]
no_license
function fillInInput(userChoices) { let longString = `# ${userChoices.title}\n` + `${userChoices.description}\n` + `>Technologies:\n` + `${userChoices.technologies}\n` + `## Table of Contents\n` + `- [Installation](#installation)\n` + `- [Usage](#usage)\n` + `- [Deployment](#d...
true
12161e0e3ee6a5ab8dc2e69d0bba36bc8c1d3a0d
JavaScript
LLZUPUP/llz_js_fullstack
/data-jiegou/linked-list/LinkedListNode.js
UTF-8
711
3.546875
4
[ "MIT" ]
permissive
// 链表结点 // [] 数组怎么运行? 内存分配给我们一定数量的空间(一次性向内存申请一定数量空间) // 存储空间的连续性问题 数据挨着存储 灵活性不够 // 要让数据存储在不同地方 用指针定位 // a[10] = [1,2,3,4,5,6,7,8]; // 连续地址 // 1001 // 1002 // 1003 // 1004 // ... // 1 value 1001 // 1.next 指针,next指向下一个结点的位置 = 101 // 101 10002 export default class LinkedListNode { // data collections data node ...
true
6208d6d45d985fefc221a0e5a09f894bfd96e3c7
JavaScript
domgom/codeschool
/functional-javascript-workshop/8.js
UTF-8
425
3.015625
3
[]
no_license
/** * Created by gomezgarciad on 02/09/2014. */ function duckCount() { return [].reduce.call(arguments, function(init,curr){ if( Object.prototype.hasOwnProperty.call(curr, 'quack')){ return init +1 || 1; } return init; },0); } module.exports = duckCount //var notDuck =...
true
fb3de266d9af40bd2b1b2c37f06dc5d66539d108
JavaScript
WojciechLisCode/clientrepo
/src/pages/PatientDatabase.js
UTF-8
2,768
2.59375
3
[]
no_license
import "../styles/patientDatabase.css"; import axios from "axios"; import { useEffect, useState } from "react"; import PatientCard from "../components/PatientCard"; const PatientDatabase = () => { const [doctors, setDoctors] = useState({ status: "empty", data: [] }); const [patients, setPatients] = useState({ st...
true
1f28b372242a23f54b5e72bb672134e1af391250
JavaScript
webnoble/test
/store/modules/monitor/it.js
UTF-8
1,489
2.6875
3
[]
no_license
/** * 应用软件api接口字段,表示返回api的数据结构. * @typedef {(Object)} getItlist * @property {string} id - 软件id. * @property {string} name - 应用软件名称. * @property {string} area - 所在区域. * @property {string} runState - 运行状态. * @property {string} processNum - 进程数. * @property {string} resState - 响应状态(1.正常,2。错误,3.非常慢,4.缓慢). */ const data ...
true
cdc7af2a03e806b456d43d2d5749945013eada40
JavaScript
W-R126/real-estate-ecommerce
/tests/server/routes/buildings-test.js
UTF-8
1,986
2.515625
3
[]
no_license
// Instantiate all models var expect = require('chai').expect; var Sequelize = require('sequelize'); var db = require('../../../server/db'); var supertest = require('supertest'); describe('Buildings Route', function () { var app, Building, agent, building; beforeEach('Sync DB', function () { retur...
true
b98a288280d567d2770de655b08e0abf45fd9f26
JavaScript
jffjs/gbn
/test/util.js
UTF-8
1,360
2.609375
3
[ "MIT" ]
permissive
/*global require, describe, it, beforeEach*/ var expect = require('chai').expect; var sinon = require('sinon'); var util = require('../lib/util'); describe("util functions", function() { describe("mapTileToAddress", function() { it("maps tile index to address in tile data", function() { expect(util.mapTil...
true
74ec6ccf8be5917e472be750c408e5ec5f102db9
JavaScript
wausrotas/COMP466-Assignment1
/Part4/js/lengthConverter.js
UTF-8
8,354
2.75
3
[]
no_license
function convert_lengths(source, value) { let numberVal = parseFloat(value); let inputFeet = document.getElementById("inputFeet"); let inputMeters = document.getElementById("inputMeters"); let inputInches = document.getElementById("inputInches"); let inputCentimeters = document.getElementById("input...
true
afaf7e4618c57d15ec5d786bee6d19ee0614f949
JavaScript
MananWig/virtualpet2
/sketch.js
UTF-8
2,010
3.15625
3
[]
no_license
const Bodies = Matter.Bodies; const Engine = Matter.Engine; const World = Matter.World; var dog, happyDog, database, foodS, foodStock var feed,lastFed,fedTime,foodObj function preload() { //load images here dog=loadImage("images/dogImg.png") happyDog=loadImage("images/dogImg1.png") } function setup() { create...
true
3e1d105e5b02f2ac0b0046ad40eed8d277ba4b85
JavaScript
sankulka/nuhomoeo
/app/routes-prescriptions.js
UTF-8
1,884
2.75
3
[]
no_license
'use strict'; var fs = require('fs'); var moment = require('moment'); var PRESCRIPTIONS_PATH = './public/prescriptions/'; var PRESCRIPTIONS_FILE = './public/prescriptions/prescriptions.json'; module.exports = function (app) { // Get list of activities for the given patient app.get('/prescriptions', funct...
true
5ee44a31679248073d70acbc38070b4d01a29f63
JavaScript
burend/ASFA
/Javascripts/Source/Places/place139.js
UTF-8
16,468
2.59375
3
[]
no_license
// Place: Kate's Room and she is home function ShowPlace139(stype) { var md; var perKate = findPerson("Kate"); var perMG = findPerson("MrsGranger"); var clv = perKate.getCharmedLevel(); var plcMG = perMG.whereNow(); // What is the state of your relationship with Kate? if (perKate.isCharmedBy("You") && clv == ...
true
677663c451d8d1604f44f31ecc3aed96dbcb3da4
JavaScript
so5tmaker/ES6
/interviews/MIR SOLUTIONS GROUP.js
UTF-8
2,444
3.125
3
[]
no_license
// Calculate total salary MIR SOLUTIONS GROUP // for active teamLeads and members const workers = [ { team: "team A", teamLead: { name: "Kirill", salary: 100, isActive: true }, teamMembers: [ { member: "Eugenia", ...
true
199d2e40e4a3de2bf271f96d227b100c6dfad107
JavaScript
hacksparrow/learnlb
/hacks/connector-template.js
UTF-8
1,775
2.546875
3
[]
no_license
exports.initialize = function initializeDataSource(dataSource, postInit) { dataSource.connector = new RamDb(dataSource.settings); dataSource.connector.connect(postInit); }; function RamDb(settings) { } RamDb.prototype.connect = function (postInit) { postInit(); }; // CRUD // Create a new model instance RamD...
true
5a61880c37c66e89ef43f5ca7387418520aa6e45
JavaScript
nuralam376/javascript-practice
/es6/inheritance.js
UTF-8
372
3.71875
4
[]
no_license
class Parent { constructor() { this.fatherName = "Parent AB"; } } class Child extends Parent { constructor(name) { super(); this.name = name; } getInformation() { return `${this.name} - ${this.fatherName}`; } } const child1 = new Child("Abc"); const child2 = new Child("Def"); console.log(child1.getIn...
true
c0049dd361aa69b7289ca3b34019c4a832eecde6
JavaScript
MayadaTarek25/Verbal-Gestuers-Game
/howtoplay.js
UTF-8
291
2.5625
3
[]
no_license
var audio= document.getElementById("audio"); var backbutton= document.getElementById("backbtn"); backbutton.addEventListener("click",playButtonSound); function playButtonSound() { audio.play(); setInterval('window.location ="page2%20start.html" ',400) }
true
3d342970ec1efa6a6ac947a784eb157c802647e6
JavaScript
lordlinda/chatchord
/client/js/main.js
UTF-8
1,749
3.453125
3
[]
no_license
const chatForm = document.querySelector('#chat-form') const chatMessages = document.querySelector('.chat-messages') //get username and room from url const { username, room } = Qs.parse(location.search, { ignoreQueryPrefix: true }) console.log(username, room) const socket = io() //Join chatrooom socket.emit('joi...
true
3234e536fb6d6c0d4a98a2e51ac7607fd5e85ca4
JavaScript
gabemeola/yat_app
/src/server/helpers/asyncMiddleware.js
UTF-8
404
2.875
3
[ "MIT" ]
permissive
/** * Middleware for catching async promise errors * and passing to next middleware function. * * @example: https://medium.com/@Abazhenov/using-async-await-in-express-with-node-8-b8af872c0016 * @param {function} route */ export default function asyncMiddleware(route) { return (req, res, next) => { Pro...
true
0b884dcea6b1694954371d568caebbc58e90cdbe
JavaScript
MelkamsewG/CS305
/Mocha-test/w1d3/test.js
UTF-8
473
3.328125
3
[]
no_license
// "use strict"; // import { strictEqual } from "assert"; // function checkPrime(num) { // for (let i = 2; i < num; i++) // if (num % i === 0) return false; // return num > 1; // } // describe("checkPrime returns true if argument is prime", function() { // it("37 is prime", function() { // ...
true
e4c0ed5c9d6d43c9ff8fef9592411d51ca904668
JavaScript
babel/babel-archive
/packages/babel-preset-es2015/test/fixtures/traceur/Yield/SwitchGenerator.js
UTF-8
740
3.328125
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "MIT" ]
permissive
function* switchGenerator(val) { switch (val) { case 1: yield val; case 2: yield val * 2; break; case 3: break; default: yield val * 10; } // switch without a default switch (val) { case 1000: yield val; break; } yield val * 5; } function accu...
true