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
a3607f9399de20fa8566d43ea322bb0f5613392f
JavaScript
Yitaek/Remi-MedHacks
/remi-twilio/index.js
UTF-8
2,993
2.703125
3
[]
no_license
// Load the env variables var dotenv = require('dotenv'); dotenv.load(); // Load Twilio information var twilio = require('twilio'); var accountSid = process.env.TWILIO_ACCOUNT_SID; var authToken = process.env.TWILIO_AUTH_TOKEN; var client = twilio(accountSid, authToken); // Using Cron var cron = require('node-cron...
true
7048af98f7cfb6e9b0ed0cd77b6e4850dba121d6
JavaScript
oememartinez/horizontal-scroll
/index.js
UTF-8
1,005
2.65625
3
[]
no_license
window.onload = (e) => { var $features = document.querySelector('#features'); var $wrapper = document.querySelector('#features__wrapper'); var $wrapperCanvas = document.querySelector('#features__wrapper__scrollCanvas'); $features.style.height = $wrapperCanvas.getBoundingClientRect().width + 'px'; $wrapper....
true
5026f4be3b88a1426c7a915a45c222c74c9d7d6e
JavaScript
denizLapantov/JavaScript-Core
/JavaScript Fundamentals/Expressions, Conditional Statements and Loops/16.Odd Numbers 1 to N.js
UTF-8
113
3.28125
3
[]
no_license
function OddNumbers1ToN(number) { for (i=1;i<=number; i+=2){ console.log(i) } } OddNumbers1ToN(4)
true
ca28594bfe9abb4cc94036d417e5d6cb3f3d4f49
JavaScript
SoloOgum/Javascript-tutorial2
/js/index.js
UTF-8
787
3.15625
3
[]
no_license
function calc() { // var amountItems = document.forms["thisForm"] // ["aQuantity"].value; // var Price = document.forms["thisForm"] // ["aPrice"].value; // Leaving in the above as an alternate method var amountItems = document.getElementById("aQuantity").value var Price = document.getEle...
true
b8ce40debab80a9d8249d19bdd056a7b0739de07
JavaScript
GeographicaGS/urbo-formacion
/students-todo/www/js/View/Panels/Students/StudentsMasterPanelView.js
UTF-8
3,336
2.8125
3
[]
no_license
'use strict'; /** * Panel Maestro, Dashboard o Estado General */ App.View.Panels.Students.Master = App.View.Panels.Base.extend({ /** * 1. Función initialize: Es el equivalente a un constructor en Java. * @param options: Object => Objeto con la configuración del panel, desde el Router.js se le envía un sco...
true
348bf431346b9a0481834bf2bab5d1be8165c0b7
JavaScript
ecj2/verloren
/js/star.js
UTF-8
1,010
3.578125
4
[ "MIT" ]
permissive
class Star { constructor(x, y) { this.x = x; this.y = y; this.radius = 2; this.type = getRandomNumber() % 3; this.color = Momo.makeColor(getRandomNumber() % 128, getRandomNumber() % 128, getRandomNumber() % 128, getRandomNumber() % 255); } render(camera_x, camera_y) { let x = 0; ...
true
d654c7b6f91a148caca75e12f4185a191a2251c2
JavaScript
damianmcdonald/currencytrade-spray
/src/main/resources/web/scripts/ui/progressbar.js
UTF-8
3,106
2.96875
3
[ "Apache-2.0" ]
permissive
/* * Copyright 2015 Damian McDonald * * 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 applicable law or agreed...
true
cd9de468096c2f80f490590b28e6d2385dfde3de
JavaScript
alexdoloz/netology_node_hw_3
/task3.js
UTF-8
1,832
3.5
4
[]
no_license
/* Дополнительное задание Реализовать свой класс на основе: Readable, Writable, Transform Readable класс должен генерировать бесконечное кол-во случайных цифр. Writable класс должен выводить полученные данные через _write в консоль. Transform класс должен как-либо изменять данные и передавать их на дальнейшую обработ...
true
00f119f324e509086cfb79727c25aba236d87b4b
JavaScript
rhcmoore/Redux-demo
/redux-demo.js
UTF-8
1,013
3.4375
3
[]
no_license
// All necessary Redux components const redux = require('redux'); // node.js syntax, not React here const createStore = redux.createStore; const initialState = { counter: 0 } // Reducer const rootReducer = (state = initialState, action) => { if (action.type === 'INC_COUNTER') { return { // ...
true
ba2e0965b049ac3390fed739846db8767c6dfdc8
JavaScript
Mildark10/calculator-app-main
/js/jsCalculadora.js
UTF-8
1,439
3.671875
4
[]
no_license
// funcion para borrar un caracter ingresado en la pantalla function del() { let value = document.getElementById('ventana').value; document.getElementById('ventana').value = value.substr(0, value.length - 1); } //codigo para controlar el cambio de color: //mis variables const uno = document.getElementById('uno'...
true
76fd97cc14c40c80064dc5e9575fec7f9e11dd05
JavaScript
JonathanHardwick/cis122-labs
/resources/google.js
UTF-8
1,222
2.953125
3
[]
no_license
if (window.addEventListener) { window.addEventListener("load", initializeGoogleStuff, false); } else if (window.attachEvent) { window.attachEvent("onload", initializeGoogleStuff); } function initializeGoogleStuff() { var button = document.getElementById("googletest"); button.onclick = googleExample; loadGoogleCon...
true
8bd221ea2b80497f5af8e0e502dd65b34466b5b4
JavaScript
WebHeroSchool/palindrome-Natalina27
/palindrome.js
UTF-8
178
3.0625
3
[]
no_license
function palindrome(str) { const palind = str.split().reverse().join(); return str.toLowerCase() === palind.toLowerCase() ? 'true' : 'false'; } module.exports = palindrome;
true
93f3bb2b3bec34a6ce88fa76d772d3244e7a8e7d
JavaScript
Boothy742/hitec
/Scripts/code.js
UTF-8
10,807
2.640625
3
[]
no_license
let radius = 198; let originX = 200; let originY = 200; let spinningReels = false; let probabilities = [0,0,0]; let colours = ["darkorange", "green", "darkblue"]; let segNames = ["WIN", "WIN!", "BONUS", "LOSE"]; /** @type {string} */ let spinResult = null; let images = [ "Images/s0_PIP.png", "Images/s1_CHER...
true
aa149de5f82d399ebcc55c50cf1aac40aaed1b5d
JavaScript
alandenison/Ping-Pong
/js/scripts.js
UTF-8
656
3.3125
3
[ "MIT" ]
permissive
var pinger = function(number) { value = parseInt(number); var result = [] for(i=1; i<=value; i++) { if (i % 15 === 0) { result.push("pingpong"); } else if (i % 3 === 0) { result.push("ping"); } else if (i % 5 === 0){ result.push("pong"); } else { result.push(i); }; };...
true
a4b16adde538bc173a916e4739ab70e7c189b0cd
JavaScript
Deepak003/istanbul-code-coverage-example
/aura/tsm/SystemMessageHome/SystemMessageHomeHelper.js
UTF-8
1,817
2.515625
3
[ "MIT" ]
permissive
({ //Funciton hitting the backend to get all the system notifications getAllSystemMessages : function(component, event) { var action = component.get("c.getAllSystemNotifications"); action.setCallback(this, function(response) { var state = response.getState(); if (state ...
true
1365f9efa2e9b4c517c232fc9e40729890baee0c
JavaScript
iuvei/666
/static/js/MobEpp-1.1.1.js
UTF-8
16,695
2.65625
3
[]
no_license
// 输出 function log(txt){ console.log(txt); } function keyPress() { var keyCode = event.keyCode; if ((keyCode >= 48 && keyCode <= 57)) { event.returnValue = true; } else { event.returnValue = false; } } // 选项卡切换 function tabs_cg(Oobj,Otabch,event){//选项卡切换 1.点击的对象 2...
true
48737ecb20d3246a6e415d5d452022aa06bafee6
JavaScript
aidarovaa/Home-Works-2
/countChar.js
UTF-8
188
3.296875
3
[]
no_license
const countChar = (mass) => { console.log('Длина аргумента: ' + mass.length + " символов"); } let mass = prompt('Введите строку'); countChar (mass);
true
67a4b1fc3b72c791f651062e1e6386bbe4ceed30
JavaScript
padwalab/Reddit-Backend
/utils/createNestedObject.js
UTF-8
517
2.671875
3
[]
no_license
export const findFor = (parentId, arr, comments) => { const z = []; for (let i = 0; i < arr.length; i++) { if (arr[i].parent === parentId) { let ch = findFor(arr[i].id, arr.slice(i + 1), comments); let o = Object.keys(ch).length == 0 ? {} : { children: ch }; let res = findInArray(comments, arr...
true
53b0b8536ab7ffab092259c9bd65936c47ce9e1a
JavaScript
alinaw89/ga-javascript-bdd
/chapters/02-jasmine-intro/src/02-simple-app.js
UTF-8
1,003
3.0625
3
[]
no_license
var simpleApp = (function() { var foo; var bar; var localVarNames; return { initialize: function() { foo = null; bar = null; localVarNames = ['foo', 'bar']; return this; }, setFoo: function(value) { foo = value; ...
true
f7423768c19376a7faefcb66a6dd184c4846a592
JavaScript
giwanaga/techdevguide
/FoundationsPath/CanBalance/canBalance.js
UTF-8
758
3.890625
4
[]
no_license
const canBalance = array => { var point = getHalfPoint(array) var leftArray = array.slice(0, point + 1) var rightArray = array.slice(point + 1, array.length) return sumArray(leftArray) === sumArray(rightArray) } const getHalfPoint = array => { var target = sumArray(array) / 2 for (var i = 0; i < array.lengt...
true
478f7fb1b75ebe417563db8d96046354ec8c9a7f
JavaScript
hiRerEarcDhy/CanvasAnimation
/CA2/BoxAnimationEnd.js
UTF-8
1,620
3.140625
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ function BoxAnimationEnd(ctx, animationStartDelay, endY, x) { var animationInterval = null; var ANIMATION_SPEED = 1; // chang...
true
a6f4c3597d897b3a82599fb10e3c0b74452302b9
JavaScript
SonTrungTo/Full_Stack
/EloquentJS/ch5/yourOwnLoop.js
UTF-8
216
3.6875
4
[ "MIT" ]
permissive
// A high-order loop function function loop(start, test, update, body) { for (let current = start; test(current); current = update(current)) { body(current); } } loop(0, i => i < 10, i => ++i, console.log);
true
7f18b22eb04ddd2e447e15824c6121faea5266ff
JavaScript
bboyle/audio-scrub
/audio-scrub.js
UTF-8
2,990
3.015625
3
[ "Unlicense" ]
permissive
const CAPTURE_PASSIVE = { capture: true, passive: true }; const audio = document.querySelector('audio'); const scrubber = document.querySelector('.scrubber'); const output = { frame: document.querySelector('output.frame'), totalFrames: document.querySelector('output.total-frames'), pointerX: document.querySelector(...
true
551a58001db6dfec5874e176b78a0234c2f4a590
JavaScript
shundev/webaudio-procedual
/template.js
UTF-8
1,388
2.640625
3
[ "MIT" ]
permissive
(function () { var onDOMContentLoaded = function () { document.onkeypress = function(evt) { evt = evt || window.event; var charCode = evt.keyCode || evt.which; } window.AudioContext = window.AudioContext || window.webkitAudioContext; var context = new AudioContext(); context...
true
ffdb7ee1d7adfe049d87aeb75653e4893749d242
JavaScript
RussellMoore1987/myCode
/projects/scoreCounter/scoreCounter.js
UTF-8
2,257
4.03125
4
[]
no_license
// game variables let p1Score = 0; let p2Score = 0; let playTo = 5; let gameLock = false; // grabbing the html elements let p1Btn = document.querySelector("#p1"); let p2Btn = document.querySelector("#p2"); let resetBtn = document.querySelector("#reset"); let p1Display = document.querySelector("#p1Display"); let p2Disp...
true
ad642778d7b1c0d240d0a589eca41200ec043483
JavaScript
atmimnurrona/siap-present
/src/configs/sagas/pagination.js
UTF-8
462
2.609375
3
[]
no_license
const pagination = (action) => { let parameter = '' // console.log('' + `page=${1-1}` + "&" + `&size=${5}`) // console.log("page=0&size=5") if(action.pagination.page) { parameter+= `page=${action.pagination.page}` } if (action.pagination.size) { if(parameter.length > 0) { ...
true
9fcb44a7a707144da98732a9946bda538127b6d8
JavaScript
Lorenzomp/gl02
/mimeParser.js
UTF-8
10,850
2.59375
3
[]
no_license
var mail = require("./mail"); var mimeParser = function(sTokenize, sParsedSymb, errors){ // The list of POI parsed from the input file. this.parsedMail = []; this.symb = ["Message-ID", "Date", "From", "To", "Subject", "Cc", "Mime-Version", "Content-Type", "Content-Transfer-Encoding", "Bcc", "X-From", "X-To", "X-cc"...
true
d5c7f157ae0b60e433074842c73e1d954a65f79e
JavaScript
pcyli/sf_covid_data
/src/App.js
UTF-8
674
2.59375
3
[]
no_license
import React, { useState } from 'react'; import DataTable from "./classes/DataTable"; import './App.css'; function App () { const [dataset, setDataset] = useState([]); const [loaded, setLoaded] = useState(false); let body; if (loaded) { body = <DataTable dataset={dataset} /> } else { fet...
true
5d684fdeac2a8e1100bfe88c4e4e15a876a5ffe3
JavaScript
christianRuizR/DrlloWevjavaScript_Christian_Ruiz
/js/app.js
UTF-8
4,490
3.203125
3
[]
no_license
var calculadora = { pantalla: document.getElementById("display"), suma:" ", resta: " ", multiplicacion:" ", divicion:" ", cambioStyle: function(){ var hojaDeEstilo = document.createElement("style"); hojaDeEstilo.innerHTML=".teclado img:active{padding:1.5px;}"; document.head.appendChild(hojaDeEstilo);...
true
47b2824fb9dd684bc9221b8ebef7f6ed97334f6c
JavaScript
Marvelous-Maddie/Time-Tracking-Application
/tracker-frontend/src/components/Tracker.js
UTF-8
2,737
2.703125
3
[]
no_license
import React, { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; const Tracker = () => { //const [seconds, setSeconds] = useState(0); const [time, setTime] = useState({s:0, m:0, h:0}); const [playing, setPlaying] = useState(false); const [interv, setInterv] = useState(); ...
true
74d87ab73f511156cf0b62ae728233ff122a9ff1
JavaScript
warrior888/toci_commercial
/adhed/scripts/bankaccounts.js
UTF-8
1,780
3.234375
3
[]
no_license
/** * Created by Adam on 2015-07-18. */ var bankDictionary = {}; // Bank dictionary with number and bank names // Load unique number and bank names from JSON file // NOT WORKING WITH LOCAL FILE and CROSS-DOMAIN function loadBankDictionaryWithJQuery() { jQuery.getJSON("http://leniwiec.vot.pl/TOCI/scripts/banksLi...
true
d1c748c3210516ef889fa39e6282d4214979fc23
JavaScript
MoritzGoeckel/NodeJS_FinancePlayground
/Tests/startOptimizeStrategy.js
UTF-8
2,283
2.546875
3
[]
no_license
const TradeLog = require("./../TradeLog.js"); const StrategyTester = require("./../StrategyTester.js"); const optimizeStrategy = require("./../optimizeStrategy.js"); const dl = require("./../OandaDownload.js"); const columnify = require('columnify') const fs = require('fs'); var Time = require('./../Time.js'); let tim...
true
f32af4ed541ffb756c110916f13953453605d188
JavaScript
TehShrike/page-path-builder
/test.js
UTF-8
2,191
2.859375
3
[]
no_license
var test = require('tape') var buildPath = require('./') test('basic path construction', function(t) { var path = buildPath('/wat/:huh/yeah', { huh: 'go figure' }) t.equal(path, '/wat/go%20figure/yeah', 'string output matches expected path') t.end() }) test('using the parsed path more than once', function(t) {...
true
09bbb3862b8573d1ffb092e91e1c7533d22bb09d
JavaScript
CEDT-touch/special-touch
/main/templates/report/report8/js/function.js
UTF-8
8,250
2.96875
3
[]
no_license
function createnewtable(tableid,tabledata){ //生成新表 tableid:表格id;tabledata:表格内容 var tablecontent = document.createElement('div'); tablecontent.className = 'tableContent'; tablecontent.id = 'table'+tableid; var newtable = document.createElement('table'); if (tabledata[0].length == 1) { //若含有标题 var newcaption...
true
588e8b77dd0d650659cfe05006f82ce999a8c4cc
JavaScript
08yuta1408/dmo_projects
/javascript/gift_cost/2017/gift_cost_april.js
UTF-8
1,043
2.734375
3
[]
no_license
var gift_cost_april = [0, 0, 0, 0, 0, 0]; //index番号順に、無し、1000円以下、1001円〜2000円以下、2001円〜3000円以下、3001円〜5000円以下、5001円以上 $(function(){ $.ajax({url: 'json/2017/data_april.json', dataType: 'json', async: false}).done(function(data){ for(var i = 0; i < data.length; i++){ if(data[i]["gift costs"] == "0"){ ...
true
91a197f61448dd4887aef8640e95511ed0f7d450
JavaScript
kylehovey/PiZero_WiFi_Scanner
/public/js/components/loader/loader.js
UTF-8
711
2.578125
3
[]
no_license
"use strict"; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Loader = /* * Manage the display of a loader */ function Loader(loaderId) { var _this = this; var timeOut = arguments.length > 1 && argumen...
true
0625d9ca5a350594db5bd2787d82802a8e0548c5
JavaScript
ga-ak/smartgrid_3rd_web
/web/lineChart.js
UTF-8
3,306
2.734375
3
[ "CC-BY-3.0" ]
permissive
$(document).ready(function () { let dataset = {}; var cate = []; //x축 var cate1 = []; //y축 var options = { chart: { width: 1160, height: 540, title: '24-hr Average Temperature' }, yAxis: { title: 'Electronic data', }, ...
true
f91ff541acd2bc9bb55d43d5ef9e3bffd0c33730
JavaScript
wdalmorra/Desenvolvimento-de-Software
/WebVersion/views/js/balancoMensal.js
UTF-8
6,778
2.734375
3
[]
no_license
$(function () { var email = getCookie("email"); if (email == "") { window.location.href = "../index.html"; } }); function carregaInfos() { var nome = getCookie("nome"); if (nome != "") { var dropdown = document.getElementById("dropdown"); dropdown.innerHTML = "Olá, " + nome + "!"; } carregaMesAtual(); } ...
true
03beb57bb9d2827b8fab11f33f5712b4fc41be93
JavaScript
BunFongUng/node-students-subject-api
/controllers/student-controller.js
UTF-8
2,678
2.5625
3
[]
no_license
const _ = require('lodash'); const { ObjectID } = require('mongodb'); const { Student } = require('../models/student'); module.exports = { // get students list getStudentList: (req, res) => { Student.find().then((students) => { res.send({ status: 'success', data: students }); }).catch((err) => { ...
true
1aed5a0a0d4952bb9dd56250bf6245a5528de1d2
JavaScript
yjj963/dom-event
/js/main.js
UTF-8
1,082
2.84375
3
[]
no_license
//$(".wrapper").on('click',false)//阻止传播和默认事件 //如果有很多个popover都需要监听,是很耗费内存的 //节省内存 $("#button").on("click",function(e){ $(".popover").show() //在还没冒到document时就把监听点击处理函数放入事件队列里了 //刚一冒上去就执行 //不是冒泡阶段出问题,正是因为它冒泡了所以执行- //与放在外面不同的是进队列的时间不同- //现在的情况是在冒泡的过程中去后面添加事件处理函数 //不等冒泡走完就执行了, //不让他那么快执行的两种方法, //阻...
true
037d9b1f1071a97d09ac0b93f1c3dee51b5dc022
JavaScript
Caleb-Bolsonello/DnD-Discord-Bot
/commands/dungeons/randChar.js
UTF-8
4,161
2.90625
3
[]
no_license
const Commando = require('discord.js-commando'); const Discord = require('discord.js'); const {Generator} = require('tiyl'); //Package Credit: https://www.npmjs.com/package/tiyl class randCharCMD extends Commando.Command { constructor(Client) { super(Client,{ name: 'randchar', g...
true
2b3a9e25088fd4edd278d04c4d9530edd4aa767b
JavaScript
owuracoder/Todo-app
/src/index.js
UTF-8
14,263
2.703125
3
[]
no_license
import { format } from 'date-fns' //UI controller that handles all Dom stuffs const UIController = { selectElement(elementId){ return document.getElementById(elementId) }, displayTextBox(element,activeClass){ element.classList.add(activeClass) }, addClassToElement(element,classNam...
true
62e94bbefe72806119567b52b90ee62cb899bfb5
JavaScript
abhinavjonnada82/VideoBrowserPage
/src/components/search_bar.js
UTF-8
1,088
3.234375
3
[ "MIT" ]
permissive
import React from 'react'; class SearchBar extends Component { constructor(props) { //initial state,etc. super(props); //state record user events this.state = {term: ''}; //so whenevr we use state // we initialize it by creating a new obj and assigning it //to this.state, t...
true
1c339e2d01f4c1f04d490654409fd2f4d193b1e8
JavaScript
imrantechwiz/Google-Keep-Clone
/src/App.js
UTF-8
922
2.6875
3
[]
no_license
import { useState } from 'react'; import './App.css'; import Header from "./Components/Header"; import CreateArea from "./Components/CreateArea"; import Note from "./Components/Note"; import Footer from './Components/Footer'; function App() { const[notes, setNotes] = useState([]); const addNote = (newNotes) =>{ ...
true
f588d44fccfd4d94a5031b02d2bc4348e8ce9049
JavaScript
lsimpson667/carolsCRUD
/index.js
UTF-8
2,518
3.0625
3
[]
no_license
const mongodb = require('mongodb'); // Get mongoClient to act as a bridge between node and mongo const mongoClient = mongodb.MongoClient; const DB_URL = 'mongodb://localhost:27017'; mongoClient.connect(DB_URL, (err, db) => { if (err) { // In case there was an error console.log(err); } else...
true
0cdfd68f28066b51d4ee951bcad41bdff0438244
JavaScript
cezary-kania/booklist-mdb
/src/js/FormHandlers/BookEditFormHandler.js
UTF-8
1,240
2.65625
3
[]
no_license
import BookFormHandler from "./BookFormHandler"; export default class BookEditFormHandler extends BookFormHandler { GetForm() { return document.querySelector('#BookEditForm'); } GetSubmitBtn() { return document.querySelector('#BookEditSubmitBtn'); } SuccessSubmitAction(form) ...
true
5cc07987743f924dd1f5873a182f731bdb448f42
JavaScript
Tallic/name-it
/src/assets/FileService.js
UTF-8
2,178
2.515625
3
[ "MIT", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-free-unknown" ]
permissive
const assert = require("assert"); const fs = require("fs"); const {dialog} = require('electron').remote; const path = require('path'); const numberRegex = /\d+/gm; export default { async loadFiles() { const result = await dialog.showOpenDialog({ properties: ["openFile", "multiSelections"], ...
true
368328a607230c3982bf4af1ee516013b26c48fa
JavaScript
darsoohoo/bartenders2u
/client/src/components/layout/Landing.js
UTF-8
8,150
2.609375
3
[]
no_license
import React, { Component, Fragment } from 'react' import When from '../When' import Where from '../Where' import PackageSelection from '../PackageSelection' import QuoteReview from '../QuoteReview' import './Landing.css' export class Landing extends Component { state = { levels: [], step: 1,...
true
0de0ca7b6cb907a6bf0fc5769fb9498c144e2362
JavaScript
kscript/customEvent
/index.js
UTF-8
860
2.578125
3
[]
no_license
const Custom = {} const DEFAULT_OPTIONS = { quill: null, container: null, options: null } export default class CustomEvent { constructor(quill, options) { Custom.quill = quill Custom.options = options Custom.eventHandlers = (options.events || []).map(item => { this.container.addEventListener(i...
true
61a9fd694237c1a5ea857a9f1888983c53c2a590
JavaScript
viginayak007/gst
/app/comman.js
UTF-8
675
2.625
3
[]
no_license
(() => { 'use strict'; const getKeyOfRequestedTypeOfObjectProperty = (obj, type) => { return obj.filter((f) => { switch(type) { case 'only_object': return typeof(fileData[f] === 'object') && !Array.isArray(fileData[f]); case 'only_array': ...
true
42e1db7ace72f7a951d715a4b3757f3d34a2bdbe
JavaScript
shunwuyu/lesson_md
/interview/BATJTMD/karl_fang/163/memorize_demo/2.js
UTF-8
570
3.203125
3
[]
no_license
function memoize(fn) { const cache = new Map(); // 使用 Map 存储已经计算过的结果 return function (...args) { const key = JSON.stringify(args); //将参数序列化成字符串作为键值 if (cache.has(key)) { return cache.get(key); // 若已经计算过,直接返回缓存的值 } const result = fn.apply(this, args); // 调用原函数计算结果 cache.set(...
true
ab97bb83de23600a3925110064664371ca2deac9
JavaScript
DeniferSantiago/reddit
/__tests__/TimeFormat.spec.js
UTF-8
1,709
2.75
3
[]
no_license
import { TimeFormat } from "../src/Helpers/TimeFormatter"; import "moment/locale/es-do"; import moment from "moment"; moment.locale("es-do"); describe("TimeFormat", () => { it("Yesterday", () => { const yestarday = moment().add(-1, "day"); expect(TimeFormat(yestarday, "short")).toBe("1d"); e...
true
f70eef039b7607d6b79010f60aeeae956cb549fb
JavaScript
rmparanhos/Trabalho-3---Devweb
/03. projeto-completo-JQ-com-BS-4.1.3/js/script.js
UTF-8
5,453
2.75
3
[]
no_license
$(function() { $('[data-toggle="tooltip"]').tooltip(); }); $(function() { $('[data-toggle="popover"]').popover(); }); $("#id_nome").blur(function() { validaNomeFunction() }); $("#id_email").blur(function() { validaEmailFunction() }); $("#id_faixa_etaria").blur(function() { validaFaixaEtariaFunct...
true
e50ff3dbc4ab3cdb9bed9f3d24174298abf1d49b
JavaScript
igoist/nodejs-usecase
/http/demo0003/transfer.js
UTF-8
2,175
2.734375
3
[]
no_license
const fs = require('fs'); const path = require('path'); const dirName = 'data190109'; const mode = 1; // const handle = (err, data) => { // if (err) throw err; // let tmp = JSON.parse(data); // for (let i = 0; i < tmp.length; i++) { // let tmpStr = `${ tmp[i].title }: ${tmp[i].link}\n`; // // console.l...
true
79004ae1abc336f576d355bd09ea4711672301af
JavaScript
vitalyli81/Algorithmic-problems
/src/problem-set-1/maximalSquare/maximalSquare1.js
UTF-8
988
2.953125
3
[]
no_license
export const maximalSquare = matrix => { const rows = matrix.length; const cols = rows ? matrix[0].length : 0; let maxSqrLen = 0; for (let row = 0; row < rows; row++) { for (let col = 0; col < cols; col++) { if (matrix[row][col] === '1') { maxSqrLen = Math.max(maxSqrLen, getSqlCount(matrix, r...
true
f8a043dd1bf5d30bc604fc95651dfe3173cd404f
JavaScript
node-jpi/jpi-models
/index.js
UTF-8
2,949
2.609375
3
[ "MIT" ]
permissive
'use strict' const array = require('./array') function model (schema) { const paths = [] // const root = ee({}) const callbacks = {} const root = Object.create({}, { on: { value: function (event, selector, fn) { if (typeof selector === 'function') { fn = selector selecto...
true
44a32cbbbf735b52791d65e41448464d57e8d891
JavaScript
rguiu/gch_builder
/lib/solution.js
UTF-8
2,702
2.546875
3
[]
no_license
var sys = require('sys') var fs = require('fs'); var process = require('process'); require('shelljs/global'); var redis = require("redis"); var client = redis.createClient(); var QUEUE_NAME = "solutions:tags:set"; var Solution = function(delayMs) { this.delayMs = delayMs; } Solution.prototype.init = function() { ...
true
6cbcd7b84615ad9bf57b82f21b8786c161c2cf9d
JavaScript
thatsmydoing/gtfs.html
/src/components/Calendar.js
UTF-8
2,548
2.8125
3
[]
no_license
import React, {Component} from 'react'; import {monthsOfYear, daysPerMonth} from '../constants'; function isLeapYear(year) { return year % 400 == 0 || (year % 4 == 0 && year % 100 != 0) } function Box(props) { let className = 'box '+props.className; return <td className={className}>{props.day}</td> } function ...
true
36f3e939441f0155bc4935d56b4bb8c55001b5ab
JavaScript
cmeubanks/ny-times-news-reader
/src/Components/List/List.js
UTF-8
436
2.546875
3
[]
no_license
import React, { useState } from 'react'; function List( { genre, stories, handleClick }) { const articles = stories.map(story => { return ( <button className="article-btn" key={story.id} onClick={() => handleClick(story.id)}> {story.title} </button> ) }) return ( <section classNa...
true
1a1aca5a8600d5d93a48830f60b57ed006717efa
JavaScript
jabadia/mooc_mapreduce
/js/ex5b.1.js
UTF-8
1,897
3.109375
3
[]
no_license
var points = [ [28, 145], [25, 125], [50, 130], [65, 140], [38, 115], [44, 105], [55, 118], [29, 97], [43, 83], [50, 90], [63, 88], [35, 63], [42, 57], [50, 60], [55, 63], [23, 40], [50, 30], [64, 37], [33, 22], [55, 20] ] var clusters = [ [25, 125], [44, 105], [29, 97], [35, 63], [42, 57], [...
true
d0b627f38f0a335904f95a2ee5bf46926b5b9354
JavaScript
ajkachnic/crisp
/lib/cli.js
UTF-8
487
2.703125
3
[]
no_license
#!/usr/bin/env node const addon = require('../native'); // fs without promises is kinda cursed ngl const fs = require('fs/promises') if(process.argv.length > 2) { for(let fileName of process.argv.slice(2)) { fs.readFile(fileName) .then(file => { const output = addon.minify(file.toString()) consol...
true
84a71ca66f93616a8ebcc300cf20f10544d11863
JavaScript
sergiomajluf/sergiomajluf.github.io
/p5-experiments/006-ripple/particle_system.js
UTF-8
555
3.25
3
[]
no_license
// Ring Trail Class (Particle System) // This System is a collection of other objects. // based on Particle Systems / The Nature of Code by Daniel Shiffman // http://natureofcode.com function RingTrail(position) { this.rings = []; } RingTrail.prototype.addRing = function() { this.rings.push(new Ring(mouseX, ...
true
6c0406406ef4d00ab27da68b7735fb48ad25b4e6
JavaScript
BlazedMario/FantasyManagementGame
/js/screens/components/portrait_component.js
UTF-8
2,650
2.703125
3
[]
no_license
var PortraitComponent = function(screen, characterId, options) { options = options || {}; options.x = options.x || 0; options.y = options.y || 0; options.normalTint = options.normalTint || 0xFFFFFF; options.disabledTint = options.disabledTint || 0x999999; options.enabled = options.enabled || true; options...
true
74558751ea3bc41acb0f18887aa8dc455a49b3b5
JavaScript
NelsonBarrios/MercadoLiebre.v2.0
/src/modules/jsonModule.js
UTF-8
956
2.515625
3
[]
no_license
const fs = require('fs'); const path = require('path'); module.exports = function(file) { const functions = { path: path.join(__dirname, '..', 'data', file + '.json'), readJson: function(){ let products = fs.readFileSync(this.path, 'utf-8'); products = JSON.parse(products...
true
93160f47cc591ca8bb32a1d9982b591b343f3ee5
JavaScript
FrancisVega/aoc2020
/src/utils/index.js
UTF-8
482
2.640625
3
[]
no_license
const { readFileSync } = require("fs") const readInput = (day, ex) => { const inputFile = `./src/${day}/input${ex ? "-example" : ""}` const rawInput = readFileSync(inputFile, "utf8") return rawInput } const readInputAsArray = (day, ex) => { return readInput(day, ex) .split("\n") .filter(line => line !...
true
f44327e7bdc35a61313d3f58c0fafef6de32578b
JavaScript
ekarincodizm/wemall.com
/public/assets/js/jquery.getQueryString.js
UTF-8
754
2.578125
3
[ "MIT" ]
permissive
(function ($) { $.extend({ getQueryString: function (name) { function parseParams() { var params = {}, e, a = /\+/g, // Regex for replacing addition symbol with a space r = /([^&=]+)=?([^&]*)/g, d = ...
true
22017e96ca3052d1957dafc9651536834bd4db89
JavaScript
MMoscosoR/TestCalendar
/public/assets/js/helpers.js
UTF-8
466
3.03125
3
[]
no_license
function getDataFromString(string,data){ let objDate= new Date(string); switch (data){ case 'fulldate': return objDate.getUTCFullYear()+'-'+String(objDate.getMonth()+1).padStart(2,'0')+'-'+String(objDate.getDate()).padStart(2,'0'); case 'time': return String(objDate.getUT...
true
7cbd573943e82649e0170b55732569321bcab9de
JavaScript
creater-shikha/solverjs
/src/time/time.js
UTF-8
693
2.796875
3
[ "MIT" ]
permissive
// time conversion methods. // nanosecond to micorsecond. let nsToUs = (ns) => ns / 1000; // nanosecond to milisecond. let nsToMs = (ns) => ns / 1e+6; // nanosecond to second. let nsToSc = (ns) => ns / 1e+9; // nanosecond to minute. let nsToMi = (ns) => ns / 6e+10; // nanosecond to hour. let nsToHr = (ns) => ns / 3.6e...
true
bd62452669a8cea7bf6e693de0b6450dac5cc441
JavaScript
yanturck/MICROPROJETO-03
/client.js
UTF-8
2,906
3.125
3
[]
no_license
const axios = require('axios'); const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); console.log("Bem-vido ao sFood!\n[V] para visualizar o cardapio\n[P] para Listar os Pedidos\n[A+IndiceProduto] para Adicionar um Pedido\nExemplo: A4 (pa...
true
c4d7622e418857079558d8247f838bb17db79016
JavaScript
Iron-berg/ayGre-ta
/public/javascripts/thunberg.js
UTF-8
2,708
3.125
3
[ "Apache-2.0" ]
permissive
const THUNBERG_MAX_LENGTH = 140; // Post Thunberg Form const onPostClick = async function() { const message = document.getElementById("message").value; const loggedUser = document .getElementById("btnThunberg") .getAttribute("data-userid"); await postThunberg(message, loggedUser); const response = awa...
true
f66216b891fae591239b4fbf39e05311f00b7206
JavaScript
tarawadee/cswlab6
/src/components/Student.js
UTF-8
3,656
3.078125
3
[]
no_license
import React, {useState, useEffect} from 'react' import axios from 'axios' export default () => { const [students, setStudents] = useState({}) const [name, setName] = useState('') const [surname, setSurName] = useState('') const [Major, setMajor] = useState('') const [GPA, setGPA] = useState(...
true
617588577b64a0205a6a3fc5cc9cbcc0c4854754
JavaScript
Micev/JavaScript-OOP
/2. JavaScript Object-Oriented-Programming/Shapes.js
UTF-8
5,863
3.5625
4
[]
no_license
Object.prototype.extends = function (parent) { if (!Object.create) { Object.prototype.create = function (proto) { function F() { }; F.prototype = proto; return new F(); }; } ; this.prototype = Object.create(parent.prototype); this.prot...
true
ac11ea18021d8cda11b9c2056ccfe06b83629853
JavaScript
foolOnTheHill/crypto-proj
/src/test-password-manager.js
UTF-8
4,245
2.6875
3
[]
no_license
"use strict"; function assert(condition, message) { if (!condition) { console.trace(); throw message || "Assertion failed!"; } } var lib = require("./lib/lib"); var password_manager = require("./password-manager"); var password = "auJKAjkxnasklNcauaLK"; var keychain = password_manager.keychain(); var toDump = ...
true
e3d246c0494d2ba70d71c3c8f87c37f3fffcfff1
JavaScript
mosmant/JS-Course
/04-Dom/Ornek2-Manipule/app.js
UTF-8
3,477
2.90625
3
[]
no_license
//ara butonuna tıklandığında çalan telefon çıksın,zil çalsın let resim = document.querySelector(".resim"); //resim e ulaştım let ring = document.querySelector(".ses"); //audio ya ulaştım //ara butonuna ulaştım document.querySelector(".on").onclick = function () { resim.src = "./img/img.gif"; //resim değiştirdim rin...
true
cb8b954332c4220e0852381ceb4e91d3a79ced46
JavaScript
ElliotMtb/trading-game-simulator-ng
/src/scripts/models/player_model.js
UTF-8
2,585
2.84375
3
[]
no_license
app.Player = Backbone.Model.extend({ defaults: { name: '', point: 0, resources: {'brick':0, 'wheat':0, 'rock':0, 'wood':0, 'sheep':0}, color: 'red', purchasedItems: {'road': 0, 'settlement': 0, 'city': 0, 'developmentCard': 0} }, addPoint: function(){ var poin...
true
013889b91b6cdfa4e0c1ad0c40a747cbaec36042
JavaScript
jpedakal/Node.js-challenges
/test.js
UTF-8
308
3.234375
3
[]
no_license
const { EventEmitter } = require('events'); const Counter = function(i) { // Takes a starting number this.increment = function() { // The counter's increment method i++; // Increment the count we hold this.emit('incremented', i); // Emit an event named incremented } } Counter(2);
true
1e801d6e02cbf638b9a6b0811a867d8dd4cf4aa6
JavaScript
Roadspill/epi_w8d2_arrayPractice
/js/countup.js
UTF-8
800
3.234375
3
[]
no_license
$(document).ready(function() { $("form#counterCalc").submit(function(event){ event.preventDefault(); // Input Global Variables var countUpInput = parseInt($("input#countUpTo").val()); var countByInput = parseInt($("input#countUpBy").val()); var counted = []; if (countUpInput === "" || countB...
true
24fb440d14a672aaab6e6c4a37a881fbe1966ca1
JavaScript
RodGondin/Form-bootstrap-com-temas
/themes.js
UTF-8
424
2.578125
3
[]
no_license
$('#theme-selector').change(function(){ let valor = $(this).val() console.log(valor) const link = document.getElementById('tema') if (valor == 1) { link.href="./themes/bootstrap-darkly.css" }else if ( valor == 2 ){ link.href="./themes/bootstrap-solar.css" } else if ( valor == 3 )...
true
ea6db8cd6668a13c0eae630655d8b6ce266bf642
JavaScript
JordanBinder/LSCode
/JS101/problem_set/string_and_text_processing/exer_8.js
UTF-8
2,868
4.03125
4
[]
no_license
/* P -Understand the Problem E -Examples / Test cases D -Data Structure A -Algorithm C -Code */ /* P - Input: string Output: array of strings Explicit requirements: Implicit Requirements: Questions: What kind of loop/iteration might be good for this question (if any)? Can this be made easier/more readable by bre...
true
d610ca7dfa708ab3e16a19cabe805076885aaf2a
JavaScript
romassol/demo-task-1
/math.js
UTF-8
278
2.9375
3
[]
no_license
'use strict'; exports.isStar = true; exports.sum = sum; function sum() { if (arguments.length === 0) { return NaN; } let result = 0; for (let i = 0; i < arguments.length; i++) { result += parseInt(arguments[i], 10); } return result; }
true
f4784c4fad5c69afa8e9bfde74cdf8cee3c855a0
JavaScript
KevinBrack/Redux-Friends
/friends/src/components/AddFriendForm.js
UTF-8
1,260
2.734375
3
[]
no_license
import React from "react"; class AddFriendForm extends React.Component { constructor(props) { super(props); this.state = { name: "", age: "", email: "" }; } handleChange = event => { console.log("INPUT FORM EVENT: ", event); const target = event.target; const value = ta...
true
60285bc4c7687068978cefc5a79f329ebe148476
JavaScript
sha0812/front-end
/JavaScript/01_数据存储/数据存储-demo/05_深拷贝.js
UTF-8
268
3.15625
3
[]
no_license
var userName = '闷倒驴'; var user = { userName: '闷倒驴', sex: '女', body: { weight: '50kg', height: '160' } } // 深拷贝 var userCopy = JSON.parse(JSON.stringify(user)); user.sex = '男'; user.body.weight = '100斤'; console.log(user); console.log(userCopy);
true
4bcccd2f0767fb576c6502db6e99ec12332b85f0
JavaScript
smbachman/rain
/es6modules/testsm/rays.test.js
UTF-8
1,287
2.734375
3
[]
no_license
import {test} from './zora.js'; import * as Tuples from '../src/tuples.js'; import {translation, scaling} from '../src/transformations.js'; import {ray, position, transform} from '../src/rays.js'; const { point, vector } = Tuples; test('rays', t => { t.test('Creating and querying a ray', t => { const origin ...
true
d54d309ec44c35bdfe1e31f9a400b5fa66831af4
JavaScript
ygogia/angelhack-expedia-hackathon-backend
/controllers/user.js
UTF-8
5,653
2.625
3
[]
no_license
var Trip = require('../models/trip'); var User = require('../models/user'); exports.postUser = function(req,res){ User.findOne({'email':req.body.email},function(err,user){ if(err) res.send(err); if(user) { res.json({isSuccess:false,message:'User Already Exists'}); } if(!user){ var newUser = new User();...
true
bc7c4fba9a00e65c1b2304a2b3735912167a7dba
JavaScript
Harrison-Hughes/project_euler
/problem2.js
UTF-8
390
3.984375
4
[]
no_license
// sum of even numbers in fibonacci sequence with value < 4,000,000 (n) const problem2 = n => { let numToSum = [1, 2]; while (Math.max(...numToSum) < n) { nextNumber = numToSum.slice(-2).reduce(reducer); numToSum.push(nextNumber); } }; const reducer = (accumulator, currentValue) => accumulator + current...
true
89357cd577c1d4b80c3aba02cd33b097d447ccfc
JavaScript
nujud-aa/W07_D02_Express_HW
/first_server/server.js
UTF-8
780
3.671875
4
[]
no_license
//express is a function const express = require('express'); //app is an object of type express const app = express(); /* Setting the GET route with a request-assuring statement that will be shown once the page is visited. A response upon the request is sent with a content of 'Hello World'. */ app.get('/'...
true
4926d2b70d6ebd63e83bc37860a4423cb5d4b7f9
JavaScript
nayaksanjay99/coderz
/src/reducers/inputs.js
UTF-8
440
2.53125
3
[ "MIT" ]
permissive
import { ADD_INPUT } from "../constants/actionTypes"; export const initialState = { state: "", district: "", block: "", year: "" }; export default function productOptions(state = initialState, action) { switch (action.type) { case ADD_INPUT: return { state: action.state, district: ...
true
07d76375a852c73e1bc78dfdfef269f98ec1c9a6
JavaScript
ChapelR/dice-notation
/dice.js
UTF-8
2,798
2.8125
3
[ "MIT" ]
permissive
( function (root, factory) { /* istanbul ignore next */ if (typeof define === 'function') { define([], factory); } else if (typeof exports === 'object') { module.exports = factory(); } else { root.Dice = factory(); } } (this, function () { 'use strict'; var diceNotat...
true
ef86b443152de2608acdd466b27ccba144f28b87
JavaScript
kaio-matos/churrascometro
/script.js
UTF-8
1,043
3.640625
4
[]
no_license
function calcular(){ let people = parseInt(document.getElementById('people').value); let children = parseInt(document.getElementById('children').value); let duration = parseInt(document.getElementById('duration').value); let meat = ((people + children) * duration) / 5; let drink = ((people * childr...
true
d6472efad705978c5610d33022b155e587c9fc6a
JavaScript
antonioFilho-global/CursoWebDesign
/JavaScript/01script.js
UTF-8
452
4.09375
4
[]
no_license
//Comentário em JavaScript /* Comentário com Várias linhas */ var mensagem = "Olá Mundo!!!"; alert (mensagem); //operações matemáticas var a = 10; var b = 20; var c = "Teste"; var soma = a+b; var sub = a-b; var mult = a*b; var div = a/b; alert(10%2); alert(soma); alert(sub); alert(mult); alert(div); //Condicio...
true
292227e5b94403401a3589ccdbc642e7db630446
JavaScript
daviskoh/codechallenges
/javascript/java_recursion/count_abc/lib/count_abc.js
UTF-8
1,023
3.421875
3
[]
no_license
function countABCRecursive (string) { // base case if (string.length === 0) { return 0; } // recursive cases var firstThree = string.substring(0, 3); if (firstThree === 'abc' || firstThree === 'aba') { return 1 + countABCRecursive(string.substring(3)); } return countABC...
true
2c457f6aee28246abcdb423b55989d2c47e4eafb
JavaScript
DPNT-Sourcecode/FIZ-ojia01
/lib/solutions/CHK/checkout.js
UTF-8
6,371
2.953125
3
[ "Apache-2.0" ]
permissive
'use strict'; //noinspection JSUnusedLocalSymbols module.exports = function (skus) { let fE=0; let fN=0; let fR=0; let fOthers = 0; let sum = 0; let fS = 0; let fT = 0; let fX = 0; let fY = 0; let fZ = 0; let oP3 = 0; for(var i=0; i<skus.length; i++) { if (sk...
true
40583eaf97b1b628fbcd68f253131b66b3857657
JavaScript
mc-b/devops
/docker/bpm/rechnungZahlen/main.js
UTF-8
960
2.875
3
[ "Apache-2.0" ]
permissive
// import Libraries var http = require("http"); var util = require ('util'); var url = require('url'); var qs = require('querystring'); http.createServer( function ( request, response ) { if ( request.method == 'POST' ) { console.log( "Nr: " + request.data ); var body = ''; request.on( '...
true
927be7e7f6b5c533d5f81c9d487889c97db850f9
JavaScript
Cristovao-bit/formularios
/form_01/js/function.js
UTF-8
2,613
2.8125
3
[ "MIT" ]
permissive
$(function () { var atual_fs, prev_fs, next_fs; var formulario = $('form[name="formulario"]'); function next(elem) { atual_fs = $(elem).parent(); next_fs = $(elem).parent().next(); $('.progress li').eq($('fieldset').index(next_fs)).addClass('active'); atual_fs.hide(800); ...
true
aa8d1162472c977ec77c8fa3ce4e8553a91bdb2c
JavaScript
soniakaushal1990/basic_coding_concepts
/bst/findClosestValueInBST.js
UTF-8
809
3.125
3
[]
no_license
//Time Complexity Avg Case O(log N) || Space Complexity O(1) //Time Complexity Worst Case O(N) |\Space Complexity O(1) function findClosestValueInBst(tree,target){ return findClosestValueInBSTHelper(tree,target,Infinity); } function findClosestValueInBSTHelper(tree,target,closest){ let currentNode=...
true
ab753f818bec82d35f00aad241fc48eb8f19e0b6
JavaScript
willlma/observe
/src/modules/core/components/textBox.js
UTF-8
1,250
2.53125
3
[ "MIT" ]
permissive
// @flow import React, { Component } from 'react'; import { StyleSheet, TextInput, Keyboard } from 'react-native'; import { doubleMarginWidth, inputFontSize, marginWidth } from 'src/styles/variables'; import { white, transparent } from 'src/styles/colors'; type Props = { addSentence: Function } type State = { text: st...
true
9dc5a9b11838a2acff26588fa941452f7da98549
JavaScript
AntGrimm/blackjack
/public/main.js
UTF-8
6,023
3.5
4
[]
no_license
const cardRanks = [ { name: 'Ace', value: 11 }, { name: '2', value: 2 }, { name: '3', value: 3 }, { name: '4', value: 4 }, { name: '5', value: 5 }, { name: '6', value: 6 }, { name: '7', value: 7 }, { name: '8', value: 8 }, { name: '9', value: 9 }, { name: '10', value: 10 }, { name: 'Jack', value: ...
true
3af39ae1023e667c0590571332848cffef415b88
JavaScript
secSounder/myfirstnode
/kernel/getphone.js
UTF-8
2,079
3.125
3
[]
no_license
function getPhone(res) { let phones = { "allPhone": [], "luckyPhone": [], } /* for (let i = 0; 4 * i <= res.numArray.length; i++) { // let phoneNum = res.numArray.slice(res.splitLen * i, res.splitLen * i + 1).join(",") let phoneNum = res.numArray.slice(4 * i, 4 * i + 1).join...
true
23e3b7ad51b2eda9e7f7b09202ef2f5c6e55f6fe
JavaScript
orientalist/FBServices
/models/functions/OfficialAPIs.js
UTF-8
1,506
2.59375
3
[]
no_license
var request = require('request') var access_token='EAAgXHuY3iVsBAK55e89rxKYW6FbZCDLZA0v4lq14ZB7JbNt6coLvBZAbftXzrIUS27mfeSwXabEFLGIgwqplu2wAaxxSIqc3tj97H6x1DdvFd9bZCaoKQHlEdmxY2ezZCH1kIsRKK5lqWaZAgEUbTMeqO5Sxij7ZBS5sGu09ZBnEEVQZDZD' exports.Initialize = (_access_token) => { access_token = _access_token } exports....
true
a8813da38c7e783f95efb1e6ed195ccb7a89f84d
JavaScript
prettier/prettier
/tests/format/flow-repo/refinements/union.js
UTF-8
305
3.25
3
[ "MIT" ]
permissive
/* @flow */ type thing = number | bool function foo(x: thing) { if (x === true) { x[0]; // error on boolean } } function bar(x: thing) { if (x !== true && x !== false) { x[0]; // error on number } } function baz(x: ?thing) { if (x && x !== true) { x[0]; // error on number } }
true