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
e55dc27f606fded3ddf215c74a65ae5bf5586155
JavaScript
HarleySalas/wayfarestudios
/src/components/utils/validateContact.js
UTF-8
779
2.890625
3
[ "MIT" ]
permissive
export default function validateContact(values) { let errors = {}; //Name if (!values.name) { errors.name = "Required."; } else if (values.name.length < 2) { errors.name = "Required."; } //Email if (!values.mail) { errors.mail = "Required."; } else if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{...
true
5b26a8d208a21d3872f7eca3b0b1738ca8c7169c
JavaScript
Xiangning2020/leetcode_js
/leetcode_169.js
UTF-8
1,724
4.125
4
[]
no_license
// 169. 多数元素 // 哈希表:就是通过map去记录每个值出现的次数。 // 时间复杂度:O(n),空间复杂度:0(n)。 var majorityElement = function (nums) { let map = new Map(); let max = 0; let result = nums[0]; for (let i = 0; i < nums.length; i++) { if (map.has(nums[i])) { map.set(nums[i], map.get(nums[i]) + 1); if (map.get(nums[i]) > max) { ...
true
e1941e79d542073aeedd6cf953ef72bab6665d47
JavaScript
amyhuycu/ECS171_Group7
/utility.js
UTF-8
174
2.515625
3
[]
no_license
function read_result(){ const fs = require('fs'); let rawdata = fs.readFileSync('result.json'); let data = JSON.parse(rawdata); return data.result }
true
1f56ea2bb686c1aabffc0cd6ff90c5a9a7bb8374
JavaScript
NikaMana/Burger
/.history/js/slider_20190604173809.js
UTF-8
1,574
2.75
3
[]
no_license
$(document).ready(function() { let hamburger = (options => { let button = document.querySelector(options.button); let menu = document.querySelector(options.menu); let body = document.querySelector("body"); let itemsList = document.getElementById("nav__list_hamburger").children; itemsList = Array...
true
e71a7f441ac7d161cafc194b1dfb607cce0150ca
JavaScript
oliviam20/NodeJs-basics
/weather-app/weather/weather.js
UTF-8
788
2.96875
3
[]
no_license
const request = require('request'); var getWeather = (lat, lng, callback) => { request({ url:`https://api.darksky.net/forecast/c37ef8772392edd1fafcc111bf91c2bc/${lat},${lng}`, json: true }, (error, response, body) => { // error, response, body is 'request' convention if (!error && response.statusCode =...
true
6db43253bbad5e51bd449de2512312e6bee566b3
JavaScript
bfedyk/Dice-Game
/My Effort - full HTML-CSS/index0.js
UTF-8
2,747
4.1875
4
[]
no_license
function player1Roll() { var player1Num = Math.random() * 6; player1Num = Math.floor(player1Num) + 1; // Check random number and display appropriate image if (player1Num == 1){ document.querySelector(".player1-img").setAttribute("src", "images/dice1.png"); } else if (player1Num == 2) { document...
true
18743b169827f4a64f6cb61a448d2a0aa2a754da
JavaScript
Casburggraaf/Project-3
/static/js/dotmenu.js
UTF-8
988
3.4375
3
[]
no_license
var sections = document.querySelectorAll('.main'); //create dot navigation for(var i = 0; i < sections.length; i++) { var nav = document.querySelector('nav'); var dot = document.createElement('button'); nav.appendChild(dot); } var dots = document.querySelectorAll('nav button'); var buttons = document.querySelector...
true
679fd83b43e7f3dc30fe5850ee0615af74fbb76b
JavaScript
pthibodeau11/react-drills
/app-4/src/App.js
UTF-8
917
2.65625
3
[]
no_license
import React, { Component } from "react"; import logo from "./logo.svg"; import "./App.css"; class App extends Component { constructor() { super(); this.state = { username: "", password: "" }; this.login = this.login.bind(this); } saveUser(name) { this.setState({ username: name ...
true
74e67e1c86566bae4e8baa4823f26f9742f3e612
JavaScript
elc1798/softdev-hw-stuy-2016
/hw04/dotconn/svg-interactive.js
UTF-8
1,570
3.015625
3
[]
no_license
var pic = document.getElementById('vimage'); var clear_button = document.getElementById('clear'); var prevX = -1; var prevY = -1; var SVGNS = "http://www.w3.org/2000/svg"; var change_color = function change_color(e) { e.preventDefault(); this.setAttribute("fill", "green"); }; var draw_circle = function draw...
true
8a03da3806e0df2c910697cd2b38d8ee85056b1f
JavaScript
ethanjiang7/algorithm011-class02
/Week_08/493.reverse-pairs.js
UTF-8
1,005
3.4375
3
[]
no_license
/** * @param {number[]} nums * @return {number} */ var reversePairs = function(nums) { let n = nums.length; let c = new Array(n + 1).fill(0); let count = 0; let lowbit = (x) => { return x&(-x); } let getSum = (x) => { let sum = 0; while(x <= n){ sum += c[x]...
true
461d548e149db5229eb2588cb906a23eae258bc8
JavaScript
ghaffaru/js-mini-projects
/005/meal_maker.js
UTF-8
1,466
3.265625
3
[]
no_license
let menu = { _courses: { appetizers: [], mains: [], desserts: [] }, set appetizers(appetizers) { this._courses.appetizers = appetizers; }, get appetizers() { return this._courses.appetizers; }, set mains(mains) { this._courses.mains = mains; }, ...
true
17858c69b4b08a2c31686afd58247080b8bdd65e
JavaScript
ankitt8/web-worker-talk
/fibonacci-worker-thread/js/worker.js
UTF-8
374
3.34375
3
[]
no_license
var curNum = 0; onmessage = onMessage; function onMessage() { // you can do other stuff here too getNextFib(); } function getNextFib() { let curFib = fib(curNum); console.log('curNum', curNum, 'curFib', curFib) postMessage({ num: curNum, fib: curFib }); curNum++; getNextFib(); } function fib(n) { if (n < 2...
true
76e918098f80df041a0c78c47b7c9aad78f4ae11
JavaScript
Adam-Petersen/adamp-react-chess
/components/Game.js
UTF-8
1,296
2.59375
3
[]
no_license
import React from 'react'; import TwoPlayerBoard from './TwoPlayerBoard'; import OnePlayerBoard from './OnePlayerBoard'; import OnlineBoard from './OnlineBoard'; import GameModeSelect from './GameModeSelect'; class Game extends React.Component { constructor(props) { super(props); this.tileSize = 75; t...
true
c89aefc2ef94c4c521f1c6d8826b2ceb5d8042e1
JavaScript
waterwatermelon/React-learning-and-work
/react-router的不同路由解决方案/community-e-commerce/src/redux/reducers/address.js
UTF-8
468
2.8125
3
[]
no_license
import { ADD_ADDRESS,SET_ADDRESS_LIST,} from '../actions/actionType'; const initialState = { list:[] } export default function(state=initialState,action){ switch (action.type) { case ADD_ADDRESS: const nextState = [...state]; nextState.push(action.address); return nex...
true
1132e930854ec84c6a85bb0bcf5d64bda5c3aa2a
JavaScript
ayushkh420/Studentpeeps
/staticfiles/js/index.js
UTF-8
3,102
2.875
3
[]
no_license
// async function Names(){ // url="http://universities.hipolabs.com/search?country=india"; // var response=await fetch(url); // var data=await response.json(); // for(var i=0;i<data.length;i++){ // var UniversityName=data[i]['name']; // var OptionItem=document.createElement('optio...
true
8ff7f6d716cd958c2d3f6e4840868521027dbe33
JavaScript
mumer29/node-material
/02-node module system/02-modules.js
UTF-8
2,158
3.421875
3
[]
no_license
///////--------------------------------------------------------------------------------------------- // console.log(module)// module word itself a global // any function which is created behaves as a global scope. so we should avoid to write the same functions name write more than one time in different files. this ...
true
12df8553609bf0941a017d4aecf1f2c5cf59e48c
JavaScript
NandiniNayak/ajax-Rails
/app/assets/javascripts/application.js
UTF-8
2,465
3.171875
3
[]
no_license
// step1: update only tye li's with json data // var request = new XMLHttpRequest(); // get request from test/data request.open("GET", "test/data"); // check if it is in the ready state, which indicates server is sending data // request.onreadyStateChange was not changing readyState to 4, hence change it to onload con...
true
dedc8775be1950087d12b549cf6796307fa11915
JavaScript
tbarnes94/TMG-ATS-PROJECT
/Careers-Page/static/college_autocomplete.js
UTF-8
467
2.796875
3
[]
no_license
$(document).ready(function() { // var request = new XMLHttpRequest(); var dataList = document.getElementById('json-datalist'); $.getJSON( "../static/colleges.json").done(function( data ) { // console.log(data); // console.log(data[0]); data.forEach(function(college){ var option = document.createElement('...
true
e94b219bbccda5b0b50a630ef1d0aec147c629c8
JavaScript
abhishek-cool/node-sqlite3-caching
/routes/greenHouseRoutes.js
UTF-8
6,201
2.890625
3
[]
no_license
let express = require("express"); let cacheMiddleware = require("../caching"); let router = express.Router(); const sqlite3 = require("sqlite3").verbose(); let myData = []; function addData(value) { myData = value; } let allData = []; function addInAllData(value) { allData = value; } router.get("/allData", cacheM...
true
28211e6cbe38140cc2af61c8d0a301de13bf26a5
JavaScript
twvandewarker/runwme
/validation.js
UTF-8
402
3.234375
3
[]
no_license
function isBlank(field) { var contents = field.value; if (contents == "") { return true; } } function checkRequired() { var fields = document.forms[0]; var isFilled = true; var i; for (i = 0; i < 8; i++){ if (isBlank(fields[i])) { fields[i].insertAdjacentHTML("afterend", "<span style='color:red'> ...
true
a40e33389056822b58c0daf4492b87b687b3154b
JavaScript
johsoe/robeat-api
/Robeat/api/controllers/UserController.js
UTF-8
5,140
2.609375
3
[]
no_license
/** * UserController * * @module :: Controller * @description :: A set of functions called `actions`. * * Actions contain code telling Sails how to respond to a certain type of request. * (i.e. do stuff, then send some JSON, show an HTML page, or redirect to a...
true
c25e3350f913ef607c064336e36a6f07ead698ec
JavaScript
VladimirIvanin/InitSwiper
/source/InitSwiper/help.js
UTF-8
1,798
2.796875
3
[]
no_license
function generateUUID() { var d = new Date().getTime(); var uuid = 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) { var r = (d + Math.random()*16)%16 | 0; d = Math.floor(d/16); return (c=='x' ? r : (r&0x3|0x8)).toString(16); }); return uuid; }; function patchNumber (num) { var is...
true
d191dc377c9004c5931e1002911cc824a5b1125a
JavaScript
phamtien1709/PlaneShot
/js/ShipControllers/ShipController.js
UTF-8
1,278
2.734375
3
[]
no_license
class ShipController { constructor(x, y, spriteName, configs) { this.sprite = TP.playerGroup.create(x, y, 'assets', spriteName); this.sprite.body.collideWorldBounds = true; this.configs = configs; this.sprite.anchor = new Phaser.Point(0.5, 0.5); this.sprite.body.setCircle(this.sprite.width/2, 15, ...
true
ef947445cc8499af9948ee92c08527d263caeac3
JavaScript
mmou/dashboard
/events/static/js/events.js
UTF-8
357
2.59375
3
[]
no_license
// Generated by CoffeeScript 1.3.3 (function() { $(function() { var getEvent; getEvent = function() { $.get('/events', function(event) { $('#events .title').html(event.title); return $('#events .time').html(event.time); }); return setTimeout(getEvent, 15000); }; retu...
true
862093d95a142df20ca5f4611407c871af8ccbed
JavaScript
RichardMellerGibbs/fbpent2
/routes/users.js
UTF-8
15,304
2.703125
3
[]
no_license
// ROUTES FOR OUR API/SETUP // ============================================================================= var express = require('express'); var router = express.Router(); // get an instance of the express Router var mongoose = require('mongoose'); var models = require('../db/models/user.js'); var jwt ...
true
642668ee2d5c713fa75ba23dbcd974427d5520d9
JavaScript
mr-vara/eyeo
/lib/common.js
UTF-8
1,716
3.328125
3
[]
no_license
"use strict"; /** * A module which is used for common functions like delay, file read/write, printing logs etc., * @module common */ const fs = require("fs"); module.exports = { /** * Wait for give time. * @exports delay * @param {number} time - Time in ms. * @return {external:Promise} - A promise to...
true
6581eb45e618556dcbfb234738916ffa6d07fbba
JavaScript
mikolalysenko/quasicrystals
/quasicrystal.js
UTF-8
716
2.765625
3
[]
no_license
module.exports = function(waves, level) { var result = []; var dresult = []; result.push("var s=0.0"); dresult.push("var dx=0.0, dy=0.0, dz=0.0, t;"); for(var i=0; i<waves.length; ++i) { var w = waves[i]; var p = w[0]+"*x+"+w[1]+"*y+"+w[2]+"*z"; if(w[3]) { p += "+"+w[3]; } result.pus...
true
5c0531204ef7e53be1b5f01558127c5d184de34d
JavaScript
AntonAroche/react-practice-apps
/pokegame/src/Pokecard.js
UTF-8
955
2.875
3
[]
no_license
import React, { Component } from "react"; import "./Pokecard.css"; /** * Gets a pretty image source directly from Pokemon's assets. * Has to be padded with zeros to 3 places. * @param {Integer} id */ function generateSource(id) { let convertedId if (id < 10) { convertedId = `00${id}` } els...
true
d631292358c548388660f08aa0131ab450c64299
JavaScript
ruslanskrims/js_homework
/lesson11/2.js
UTF-8
1,074
4.15625
4
[]
no_license
/** * Задача 2. * * Создайте функцию createFibonacciGenerator(), * которая вернёт ещё одну функцию, * каждый вызов которой будет возвращать число из последовательности Фибоначчи. * * Условия: * - Задачу нужно решить с помощью замыкания. */ // Решение const createFibonacciGenerator = () => { let current = 0;...
true
d8c122a9c227c989fb9cf8b6699a315be842b1f1
JavaScript
kikeestrada/my-courses
/JS/course-js-2018-in-the-browser/clase3/3.8 crear elementos y fragmentos/main.js
UTF-8
1,092
3.296875
3
[]
no_license
const arrayTeachers = ['Alexis', 'Beto', 'Alvaro', 'Daniel', 'John']; const teacherListContainer = document.getElementById('teacherListContainer'); const teacherListFragment = document.createDocumentFragment(); const teacherListUl = document.createElement('ul'); // OJO teacherListContainer.appendChild(teacherListUl);...
true
70f445a35213f7576ec6852b90037389741c7fc9
JavaScript
amelink/amelink.github.io
/Javascript/Introducing Loops, Arrays and Objects js.js
UTF-8
8,326
4.4375
4
[]
no_license
Summary : I Loops II Arrays III Object I Loops boucle qui tourne plusieur fois ou sous certaines conditions A loop is use when you want to repeat code over and over a certain number of time. A loop is like a track. each time around the track is like one time through the loop endless loop = boocle infini DRY = Dont ...
true
b317eb7816f2f7b64c9aca23f0125d154edd6504
JavaScript
maicolXD12/Taller5
/taller/ejercicio14.js
UTF-8
989
3.140625
3
[]
no_license
class motor { constructor() { this.cambioActual = 0; this.rpm = 0; this.velocidad = 0 this.consumo = 0 } arrancar() { this.cambioActual = 1 this.rpm = 500 } subirCambio() { this.cambioActual += 1; } bajarCambio() { ...
true
ad89c75ff5ab46d698f8fa793d5927973e21ab1b
JavaScript
BrettS89/mixdo_api_2
/src/handlers/errorHandlers.js
UTF-8
449
2.515625
3
[]
no_license
exports.errorHandler = (res, e, endpoint) => { if (!e.status) { console.log(`${endpoint} error: `, e); return res.status(500).json({ message: e.message }); } console.log(`${endpoint} error: `, e.error); res.status(e.status).json({ message: e.error.message }); }; exports.checkExists = (data, dataName) =...
true
f5dca03e943d471d86c85474b0bbef34c33c8d97
JavaScript
apltola/Nodejs-chat-app
/server/utils/users.js
UTF-8
594
2.828125
3
[]
no_license
class Users { constructor() { this.users = []; } addUser(id, name, room) { const user = {id, name, room}; this.users = [...this.users, user]; return user; } removeUser(id) { const user = this.getUser(id); if (user) { this.users = this.users.filter(alkio => alkio.id !== id); ...
true
523f6bd8837cf2e022e03896f2b1fa4260ed9124
JavaScript
tarekul/UtilityServer
/index.js
UTF-8
4,117
2.890625
3
[]
no_license
const math = require('mathjs'); const request = require('request'); const express = require('express'); const app = express(); const port = 3000 app.get('/',(req,res)=>{ res.send('Hello World'); }) app.get('/math/add',(req,res) =>{ /* return this JSON below { input: { a: 2, b: 3 }, sumString: '2 + 3...
true
433c9fb10859258bf4908ad080da2a7fecfd4d63
JavaScript
Maddie02/Web-Development
/06.Javascript/prompts.js
UTF-8
206
3.59375
4
[]
no_license
var firstName = prompt("What's your first name?") var lastName = prompt("What's your last name?") var age = prompt("How old are you?") alert(firstName + lastName) alert("Your age is " + age + " years old")
true
4c23245d3272c0ceff3149f3b792e3ca4a331a66
JavaScript
moszis/CardGame
/web/js/Client/MobAI/MobAITargetSelection.js
UTF-8
4,376
3.1875
3
[]
no_license
//************************************************************************** //This function will calculate and return threat level of a card. //************************TO DO******************************************** //* - add threat level rules instead of static 1 //**************************************************...
true
7b19bb7975cda2edd21284a4a26cf335a37ec721
JavaScript
unbregg/js-concurrence
/src/trade/web-workers/payment.js
UTF-8
624
2.609375
3
[]
no_license
let portA; let portB; let count = 0; onmessage = function (e) { const {type, data} = e.data; switch (type) { case 'pay': { portA = e.ports[0]; portB = e.ports[1]; portA.postMessage(data); portB.postMessage(data); const success = function () { ...
true
715568a21609c0507aad9758451412700eb75688
JavaScript
enermax5555/36
/src/js/Application.js
UTF-8
975
2.71875
3
[ "Apache-2.0" ]
permissive
import EventEmitter from "eventemitter3"; import Card from "./Card"; import Notification from "./Notification"; export default class Application extends EventEmitter { static get events() { return { READY: "ready", }; } constructor() { super(); const pizzas = [ { type: Card....
true
5339113e198b87fead86ac0382051db9049b0d19
JavaScript
kumaranubhav1654/Webapp_djangoReact
/frontend/frontendapp/src/components/docs.js
UTF-8
802
2.515625
3
[ "MIT" ]
permissive
import React, { Component} from 'react'; class Docs extends Component { state = { docs: [] } loadDocs = () => { fetch('http://127.0.0.1:8000/api/docs/', { method: 'GET', headers: { 'Content-Type': 'application/json', Authorization: `Token ${this.props.token}` }, ...
true
8628600c815457bb34c01bd0fc77a21b36261fa4
JavaScript
ldd/advent-of-code-2019
/js/day15/repairer.js
UTF-8
5,525
3.0625
3
[]
no_license
const { randomInArray } = require("../utils"); const canvas = Array(100) .fill() .map(() => []); const startPosition = [50, 50]; let position = [...startPosition]; let machinePosition = null; const stack = []; let nodes = {}; const [WALL, SPACE, DROID, MACHINE, UNKNOWN] = ["#", ".", "D", "@", " "]; function draw...
true
148d4d5e2b41d9a10924c12e507c38ba6f121e07
JavaScript
caiyawen/hello-world
/mysql.js
UTF-8
2,395
2.6875
3
[]
no_license
var mysql = require('mysql'); var conn = mysql.createConnection({ host: 'localhost', user: 'nodejs', password: 'nodejs', database: 'nodejs', port: 3306 }); // conn.connect(); var pool = mysql.createPool({ host: 'localhost', user: 'nodejs', password: 'nodejs', database: 'nodejs', p...
true
6561140222dcd49d23c87fd04336b88708cb8655
JavaScript
steffen-liersch/jint
/Jint.Tests.Test262/test/built-ins/Promise/resolve-function-name.js
UTF-8
676
2.90625
3
[ "BSD-2-Clause", "BSD-3-Clause", "LicenseRef-scancode-ecma-no-patent" ]
permissive
// Copyright (C) 2015 André Bargull. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- es6id: 25.4.1.3.2 description: The `name` property of Promise Resolve functions info: | A promise resolve function is an anonymous built-in function. 17 ECMAScript Standard Built-...
true
161bd079f3c24f33acdb0098d5e47c8fcbdaa901
JavaScript
dianakoeswanto/team-profile-generator
/src/questionnaire.js
UTF-8
4,254
3.609375
4
[]
no_license
const inquirer = require('inquirer'); const Engineer = require('./entity/engineer'); const Intern = require('./entity/intern'); /** * Returns true if email is in a valid format, otherwise false. */ const isValidEmail = (email) => { const regex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@...
true
de591caa3be781910ca88b999100180b4b5b93b3
JavaScript
p4rc1v4l/javascript-challenge
/UFO-level-2/static/js/app.js
UTF-8
2,691
3.125
3
[]
no_license
// from data.js var ufoReports = data; var tbody = d3.select("#jsc-body-for-data"); var button = d3.select("#jsc-filter-button"); var form = d3.select("#jsc-form"); button.on("click", runEnter); form.on("submit", runEnter); ufoReports.map(report => { let tableRow = tbody.append('tr'); Object.values(report).f...
true
d4a827b1acf1d04c082f5b9d8ebfd2ece2477d29
JavaScript
eduardtejerocirera/eduardtejerocirera.github.io
/assets/dragon_ball_webgl/js/main.js
UTF-8
11,159
2.609375
3
[]
no_license
//variables globals var gl; var canvas; var mvMatrix; var pMatrix; var mainMusic; var rainMusic; var phraseArray; var MODELPATH = "/assets/dragon_ball_webgl/models/"; var SOUNDPATH = "/assets/dragon_ball_webgl/sounds/" // Incialitza el context WebGL function initGL(canvas)...
true
036dd8bd394645f5828a86876f5f47d7b632b1de
JavaScript
caminosajalberto/PracticasAW
/pr2/DAOs/daoUsuarios.js
UTF-8
4,441
2.953125
3
[]
no_license
class DaoUsuarios { /** * Constructor del DAO * @param {Pool} pool recibe un objeto pool para gestionar las conexiones */ constructor(pool) { this.pool = pool; } /** * Funcion que añade un nuevo usuario a la base de datos * @param {Usuario} usuario Usuario nuevo que va...
true
62bf523b0be74aea83a1ad271ff1bd87a4174404
JavaScript
pierratono/price250
/price250/src/pages/HomePage.js
UTF-8
3,173
2.59375
3
[]
no_license
import React, { useState, useEffect } from 'react'; import axios from 'axios'; import {Link} from 'react-router-dom' const data = [ 1,2,3 ] function HomePage() { const [countries, setCountries] = useState([]); const [products, setProducts] = useState([]); useEffect(() => { axios.get('http://...
true
90f71d00d97e8d4db161be894b01a1f83da253cb
JavaScript
Jakousa/tdd-mooc
/tdd-mooc-small-steps/src/database.mjs
UTF-8
913
3.25
3
[]
no_license
export class InMemoryDatabase { basePrice = []; holidays = []; withTestData() { this.setBasePrice("1jour", 35); this.setBasePrice("night", 19); this.addHoliday("2019-02-18", "winter"); this.addHoliday("2019-02-25", "winter"); this.addHoliday("2019-03-04", "winter"); return this; } se...
true
8729316f1d6614951e29ae3a2fd0e7aaf3bedad6
JavaScript
ekeoid/bamazon
/bamazonManager.js
UTF-8
7,403
2.765625
3
[]
no_license
require('dotenv').config(); const inquirer = require("inquirer"); const mysql = require("mysql"); const Table = require("cli-table"); var connection = mysql.createConnection({ host: process.env.DB_HOST, port: process.env.DB_PORT, user: process.env.DB_USER, password: process.env.DB_PASSWORD, databa...
true
cb0d6e00af440746f4c0df13ce5d95b05e14328c
JavaScript
kenyim729/telegram-jung2-bot
/test/helper/generateDynamodbMessagesSeed.js
UTF-8
1,416
2.546875
3
[ "MIT" ]
permissive
'use strict' const fs = require('fs') const path = require('path') const moment = require('moment') const util = require('util') const writeFilePromise = util.promisify(fs.writeFile) const accessPromise = util.promisify(fs.access) const isMinify = false const fullPath = path.resolve(__dirname, 'dynamodbMessagesSeed....
true
8ee04d13c6dfe133824260308bd76e1d3f3f07a9
JavaScript
VikasSuresh/gitBash
/app.js
UTF-8
2,066
2.625
3
[]
no_license
require('dotenv').config(); const axios = require('axios'); const fs = require('fs'); const execSync = require('child_process').execSync; const gitRead = async ()=>{ try { const { data } = await axios.get('https://api.github.com/users/VikasSuresh/repos',{ headers: { authorization: `token ${p...
true
4bfdd151c6b6abd3dc1ac5870d4b8e4a3c7a45f2
JavaScript
Ekrem-R/nodejs-example
/calculate.js
UTF-8
312
2.734375
3
[]
no_license
function addNumbers(a,b){ return a+b; } function subtractNumbers(a,b){ return a-b; } function productNumbers(a,b){ return a*b; } function divideNumbers(a,b){ return a/b; } module.exports={ add:addNumbers, subtract:subtractNumbers, product:productNumbers, divide:divideNumbers }
true
406f27fb3511cae223bd7eb806b2df25c5eae47f
JavaScript
internetfriendsforever/sigve-aspelund
/assets/focus.js
UTF-8
1,747
3.109375
3
[]
no_license
const scroller = document.querySelector('.scroller') const spacer = document.querySelector('.spacer') const elements = Array.from(document.querySelectorAll('[data-depth]')) const depths = elements.map(element => parseFloat(element.getAttribute('data-depth'), 10)) let request scroller.addEventListener('scroll', functi...
true
ae46073604b2b63146c59677d50d5dd34e42a1c5
JavaScript
dbconfession78/fitbit_to_sds
/test_scripts/write_aqi.js
UTF-8
1,732
2.515625
3
[]
no_license
const FormData = require('form-data'); const fetch = require('node-fetch'); const baseURL = 'https://staging.osipi.com/api/v1/Tenants/1f11c599-be17-4812-a72f-00921b7716df/Namespaces/EmergingTech/'; const aqiDataAPI = require('./aqi_data'); const dataFromAPI = aqiDataAPI.returnData(); let counter = 0; // Create form d...
true
701fd73303bcb9f7c586586ffe4bed2572d6fcbc
JavaScript
JavascriptDominicana/national-pokedex
/public/js/clases/Pokemon.js
UTF-8
686
2.734375
3
[]
no_license
/* CLASE POKEMON: */ angular .module('NationalPokedex') .factory('Pokemon', function() { function Pokemon(data) { var predeterminados = { imagen : 'http://imageshack.com/a/img440/3812/kzu.png', tipos : [], ataque : 0, defensa : 0, ataqueSP : 0, ...
true
85981f3e9b398435546848205812ece24a3cc065
JavaScript
annaszalkiewicz/palindrome-checker
/src/Animate.js
UTF-8
1,335
3
3
[]
no_license
import React, { Component } from 'react'; class Animate extends Component { constructor(props) { super(props); this.state = { palindromes: ['anna', 'madam', '10201', 'Was it a cat I saw?', 'Do geese see God?', 'Race fast, safe car', 'Able was I ere I saw Elba', 'Rats live on no evil star', 'A man a pl...
true
1b38621a25aa300130aa2bd1bb6115c6df1b6ca2
JavaScript
Dekasin/typical-arrays-problems
/src/index.js
UTF-8
1,687
3.484375
3
[ "MIT" ]
permissive
exports.min = function min (array) { let m; if (Array.isArray(array) && array.length > 0){ for (let i = 0; i<array.length; i++) { if (Number.isInteger(array[i])){ m = array[i]; break; } } if (m == undefined) { m = 0; }else{ for (let i ...
true
55416fd9b6dd1287756df32fe5e4f0417460c5c8
JavaScript
mayank07071991/doubt
/express.js
UTF-8
847
2.90625
3
[]
no_license
var express = require('express'); var port = 3000 || process.env.PORT; var app = express(); var randomWord = require('random-word'); var fs = require("fs"); var random = function() { var ran = ""; for (var i = 0; i < 100; i++) { ran += Math.floor((Math.random() * 100) + 10) + " - " + randomWord() + "\...
true
f4209493cdbfd8942dd52731b59309a3e36745a9
JavaScript
mYing09/webp1
/app/app.js
UTF-8
716
2.8125
3
[]
no_license
// 加载app.less require('../less/app.less'); let img = require('../img/duoyun.png'); console.log('img ==> ',img); window.onload = function(){ let person = ['kevin','mark','iven']; let ul = document.createElement('ul'); person.map(v => { let li = this.document.createElement('li'); li.textC...
true
a539f7f53411be16e468dd0a8b8a130da8be3e13
JavaScript
Sapendo/front-end-lab-8
/Online/homework_10/task1.js
UTF-8
583
3.65625
4
[]
no_license
function debounce(fn, time) { let clearId; return function () { clearTimeout(clearId); clearId = setTimeout(fn, time); } } let iterator = 0; function increaseIteratorBy1() { iterator++; printIteratorValue(); } function printIteratorValue() { console.log('Iterator value ', iterator); } let increase...
true
f3f3fed60d005e0681f69863f98bfc38b0d71c40
JavaScript
adamt1312/WEBTE2_zad7
/scripts/script3.js
UTF-8
4,513
2.859375
3
[]
no_license
document.getElementsByClassName("linkWrapper")[2].classList.add("selected"); document.getElementById("menu3").classList.add("selected_a"); // getting data from ip address axios.get("https://ipapi.co/json").then(response => { response.data["page"] = "stats"; try { // handling visit $.ajax({ ...
true
a35e588757b68c8635fec58ad70600f6ee15cf5b
JavaScript
aevernet-archive/pico8
/cart_watch.js
UTF-8
1,402
2.796875
3
[]
no_license
const fs = require('fs'); const { exec } = require("child_process"); const Cart = process.argv[2]; if(!Cart) throw 'Must enter a cart as a commandline arg'; exec(`C:/root/Tools/Software/pico8/pico8.exe -windowed 1 -run C:/root/Programming/pico8/${Cart}.p8`); const debounce = (fn, t=16)=>function(...args){clearTi...
true
7f62a284a3f463e0f457f38f8559823d882fe617
JavaScript
GamSaHam/movie-reviews-api
/seed.js
UTF-8
1,269
2.515625
3
[]
no_license
const { Genre } = require('./models/genre'); const { Review } = require('./models/review'); const mongoose = require('mongoose'); const config = require('config'); const data = [ { name: 'Comedy', reviews: [ { title: 'Airplane' }, { title: 'The Hangover' }, { title: 'Wedding Crashers' } ...
true
eb8cfc79d05c5fa93c9c91eff19c4987fff83661
JavaScript
Akshat-Pandey-007/pro-28-plucking-mangoes
/js/boy.js
UTF-8
1,081
2.53125
3
[]
no_license
class boy{ constructor(bodyA, pointB){ var options = { wqb bodyB:bodyB stiffness: 0.04, length: 10 } this.img1 = loadImage("sprites/boy.png"); this.pointB = pointB; this.sling = Constraint.create(options); World...
true
006bbecbaeaed17af19605eae54544fb64092be3
JavaScript
mendozalourdes/LessonsFromAbuelita
/src/Components/Home/Home.js
UTF-8
4,810
2.578125
3
[]
no_license
import React from "react"; import "./Home.css"; import apiCalls from "../../Utilities/apiCalls"; import { Route, Switch } from "react-router-dom"; import SingleWord from "../SingleWord/SingleWord"; import FormView from "../FormView/FormView"; import HomeView from "../HomeView/HomeView"; import Error from "../Error/Erro...
true
5b63dce17c637e6ad1b2fbc3f20104950e6d44c0
JavaScript
dcoppens-be/damiencoppens_5_26062021
/front-end/js/cart.js
UTF-8
11,718
2.765625
3
[]
no_license
// /* CONSTANTES */ // const maskNames = new RegExp('^[a-zçéè]{1,}(([ ]*|[-\']?)?[a-zçéè]{1,})*$','i'); const maskEmail = new RegExp('^[ ]*[a-z0-9_\.\-]+@{1}[a-z0-9_\.\-]{2,}\.[a-z]{2,4}[ ]*$'); const maskNumber = new RegExp('^[0-9]{1,6}$'); const maskFrechZipCode = new RegExp('^[0-9]{5}$'); // /* VARIABLES */ // /*...
true
4e0fb9ed5d42f13aef0fbc839d7c1749d31f5e62
JavaScript
naveennagan/naveeneditor
/kmp.js
UTF-8
2,140
3.453125
3
[]
no_license
var string = "abgljsdhfksdjbfgabg;lohsfsdfhabgkjadshfkjasdfabgkjskdhvkjsdfabglajhsflajfs"; var pattern = "aa"; function getLps(pattern){ var lp = []; if(!pattern.length){ return [] } var lp = []; lp[0] = 0; for(var i=1;i<pattern.length;i++){ var charToBeCompared = pattern.char...
true
0fe22141a024f3bec2ba2ba8ee96fb14b92dd4c5
JavaScript
Voya100/ReactNativeChess
/app/game/players/human-player.js
UTF-8
267
2.640625
3
[]
no_license
import { Player } from './player'; export class HumanPlayer extends Player{ constructor(color, game){ super(color, game); } // Sets players decision to null (human players choose actions with ui) chooseAction(){ this.setAction([null, null]) } }
true
da064e432be37d1a96b0ab40ffdcfa863f977b37
JavaScript
aldrut/ObjectCourse
/models/model.js
UTF-8
263
2.828125
3
[]
no_license
/** * class mère pour créer nos modeles * mutualiser propriété et méthode commune * */ export class Model{ constructor(jsonObject) { Object.assign(this,jsonObject); } test() { console.log("classe mere"); } }
true
d1d075ead0edf1a45a433bac352472b9f1dcefb7
JavaScript
beelzebielsk/tutorial-jumble
/node-basics/callbacks.js
UTF-8
9,921
4.46875
4
[]
no_license
//- Intro to Callbacks: ------------------------------------ // Alright. So, it seems that you're having trouble with visualizing // what happens with callbacks. Let's see if we can change that. // A function is like a recipe. It takes in ingredients as inputs, and // then does things to cook a meal when you "invoke ...
true
dcd37b19f52ba72a7c9f054d0a8fec8734b37108
JavaScript
HellDeveloper/EastRiverCommune
/Src/Scripts/jquery-Gallery.js
UTF-8
3,514
2.546875
3
[]
no_license
/* * <div class="gallery"> <ul class="pictures"></ul> <span class="previous icomoon">&#xf053;</span> <span class="next icomoon">&#xf054;</span> </div> */ (function ($) { $.fn.Gallery = function (option) { this.each(function (index, element) { var opt = { index: 0, onmove: nul...
true
678b15286610b189024ea4dede71cb5b945d2fe0
JavaScript
adam-d-wood/adamwood.co.uk
/dist/sphere.js
UTF-8
2,263
3.171875
3
[]
no_license
class Sphere extends Polyhedron { constructor(radius, centre, colour) { super(); this.radius = radius; this.centre = centre; this.colour = colour; this.thetaRes = 10; this.phiRes = 20; this.vertices = this.initVertices(); this.edges = this.initEdges();...
true
fb97bb3ab9d671815e4c217265470042c7320e26
JavaScript
zensuyeom/www
/mobile/js/index.js
UTF-8
1,433
2.515625
3
[]
no_license
//faq var position=0; var movesize=22; var timeonoff; function faqMove(){ position-=movesize; $('.slide').stop().animate({top:position},'slow',function(){ if(position==-110){ $('.slide').css('top',0); position=0; } }) } timeonoff=setInterval(faqMove, 3000); $('.slid...
true
d0dd311bc339c5e45641677cd5b911781f2b6c12
JavaScript
MERTULAS/JS_Ray_Casting
/game.js
UTF-8
3,166
2.921875
3
[ "MIT" ]
permissive
const body = document.querySelector("body"); const canvas = document.createElement("canvas"); body.appendChild(canvas); var ctx = canvas.getContext("2d"); canvas.width = window.innerWidth; canvas.height = window.innerHeight; canvas.setAttribute("id", "canvas1"); const wallPoints = [ [200, 300, 200, 700], [200,...
true
af65bbb7c77a3437d17c91b951170a5ae4f37d3e
JavaScript
seanpe11/MCO2-STDISCM
/public/js/clientGame.js
UTF-8
12,043
3.203125
3
[]
no_license
// var socket = io() var character = document.querySelector(".character"); var player_character = document.getElementById("player_character"); var enemy_characters = [] // dom elements enemies var enemy_labels = [] var map = document.getElementById("map"); var circle = document.getElementById("circle"); var headline =...
true
4180d9799e992993652e5b671b78094123907fc3
JavaScript
LINNO1/my-express-tool
/lllExpress/lib/cookieServer.js
UTF-8
2,531
2.828125
3
[]
no_license
/* cookie 的名字和值必填 其他的选择性 */ /*------------------cookie值设置------------------------------*/ var cookieSerilize = function(name, val, options) { //若cookie的名字不存在,返回 if (!name) { throw new Error("coolie must have name"); } //cookie的名字和值用URL编码 var enc = encodeURIComponent; //把字符串作为 UR...
true
0e25ffb8423ba1f7c7b8ec02efaae143a986ebc3
JavaScript
johnsmith1500/API-externa-Clima-Tempo-
/www/components/tempo.js
UTF-8
875
2.53125
3
[ "MIT" ]
permissive
// This is a JavaScript file $(document).on("click","#buscar", function(){ $(location).attr("href","listar.html"); }); $(document).on("click","#buscar",function(){ $.ajax({ type:"get",//como you enviar url:"http://apiadvisor.climatempo.com.br/api/v1/forecast/region/"+$("#regiao").val()+"?token=e4500575083...
true
32e801eca78a79cba78a7628423c7a0579a80235
JavaScript
rafaelrinaldi/fla2swf
/fla2swf.jsfl
UTF-8
573
2.859375
3
[ "MIT" ]
permissive
/* Publishes all open FLA files. @author Rafael Rinaldi (rafaelrinaldi.com) @since July 31, 2012 */ var documents = fl.documents; var document; if(documents.length == 0) { alert("Nothing to be published"); } else { publish(); } function publish() { alert("Getting ready to publish " + documents.length + " file" ...
true
37aecf53c0d034795c29fa4dcffe1c4c89582fc1
JavaScript
valderman/lambdascript
/lib/runtime.js
UTF-8
5,971
3.484375
3
[]
no_license
// Generate lambdas for accepting arguments into a constructor. function _as(n, a) { if(n != 0) { return function(x) { a.push(x); return _as(n-1, a); }; } return a; } // Trampoline; when TCE is used, all functions are entered through the // trampoline. function _t(f, as, thisptr) { var r ...
true
1f1c1f8046d5dd3109c4da405b757e3e0d3d32aa
JavaScript
nikhpete/es6Tutorial
/src/LetAndConst/main.js
UTF-8
401
3.546875
4
[]
no_license
// var a = 'hello'; // let b = 'hi'; function testVar() { var a = 30; let b = 30; if (true) { var a = 50; let b = 50; console.log('a local ' + a); console.log('b local ' + b); } console.log('a global ' + a); console.log('b global ' + b); } testVar(); const colors = []; colors.push('black'...
true
8f38269b5c077226262ed201b9d408918aea8505
JavaScript
RubensGS/Fundamentos-JavaScript
/Node/this.js
UTF-8
433
2.953125
3
[]
no_license
console.log(this === global); console.log(this === module); console.log(this === module.exports); console.log(this === exports); function logThis() { console.log('Dentro de uma função...'); console.log(this === exports); console.log(this === module.exports); console.log(this === global); } logThis();...
true
303688d3bb393e925dd9b3cdb5e7b3ab68a1fd20
JavaScript
royalgarter/mafia
/lib/ActionManager.js
UTF-8
3,835
3.40625
3
[ "Apache-2.0" ]
permissive
/** * Class: ActionManager * The class that prioritises all night actions and then executes them. * * You should execute night actions through here, and not: * * --- Code * const Google = Game.players.get("Google"); * Google.role.action(Google.selectedAction); * --- * * That piece of code exdcutes a playe...
true
9938402ce89bb2ede2b3fddc60eab3507d7b2698
JavaScript
InCarNaTeDuDe/test
/test.js
UTF-8
954
3.5
4
[]
no_license
var fs = require('fs'); function hasNumber(str) { return /\d/.test(str); } function stringGenerator(length) { var result = ''; var characters = 'ABCDEFGHIJKLMNPQRSTUVWXYZ234579'; var charactersLength = characters.length; for (var i = 0; i < length; i++) { result += characters.charAt(Math....
true
6f3383bf49320a28f74b643146ea13a771de7532
JavaScript
Alicja0310/30.04
/main.js
UTF-8
688
3.625
4
[]
no_license
function pobieranie(val){ console.log(val) } function połącz(){ const inp1 = document.getElementById('inp1').value const inp2 = document.getElementById('inp2').value const inp3 = document.getElementById('inp3').value if(inp1.value !== Number || inp2.value !== Number || inp3.value !== Number) { ...
true
82edc02d681735133b1815cbf21936f452c53507
JavaScript
Naman21-web/Car-Game
/JS/index.js
UTF-8
6,141
3.6875
4
[]
no_license
const score = document.querySelector('.score');//Select the class score const startScreen = document.querySelector('.startScreen'); const gameArea = document.querySelector('.gameArea'); startScreen.addEventListener('click', start);//Click to start the game//start function defined later let player = {speed: 5, score: ...
true
ecaab714507bf7a5b2fb48a788ded15ec449b535
JavaScript
Anhad12/NEWTON-S-CRADLE
/sketch.js
UTF-8
1,094
2.953125
3
[]
no_license
const Engine = Matter.Engine; const World = Matter.World; const Bodies = Matter.Bodies; const Body = Matter.Body; const Constraint = Matter.Constraint; var b1,b2,b3,b4,b5; var ground; var c1,c2,c3,c4,c5; function setup() { createCanvas(800, 700); engine = Engine.create(); world = engine.world; //Create the Bo...
true
fa94dc8531a053dd0cc404b5612387aa72a4c113
JavaScript
nicolaszys/github.io
/monjeu/game.js
UTF-8
7,218
3.453125
3
[]
no_license
var $player1Load = document.querySelector(".animations1 .loadImage"); var $player1Shot = document.querySelector(".animations1 .shotImage"); var $player1Shield = document.querySelector(".animations1 .shieldImage"); var $player2Load = document.querySelector(".animations2 .loadImage"); var $player2Shot = document.querySel...
true
e75e7d6466dcbb7aba4db74310ac84c9dfcf711e
JavaScript
Jbomba/GDW_WS1920_Bomba_Zimmer_Nguyen
/Unterordner der Gruppenmitglieder/PhilippZimmer/Uebung/grundlagen_javascript.js
UTF-8
2,272
3.625
4
[]
no_license
//ausgabe const name = "Philipp Zimmer"; console.log(name); // App Bewertung const maxHöhe = 100; var anzahl = 5; var bewertung = 50; var ergebnis = 0; console.log(maxHöhe, anzahl, bewertung); //Bewertung ++anzahl; let neuBewertung = 75; ergebnis = bewertung + (neuBewertung / anzahl); console.log(ergebnis); const t...
true
748023ad1b18b8e735d1629eb3b4352d8f8a4a55
JavaScript
mir3z/chip8-emu
/src/chip8.js
UTF-8
3,749
2.71875
3
[ "MIT" ]
permissive
/** * Chip8 Emulator. * This object acts as global namespace and thin proxy to the most important CPU methods. * @namespace */ var chip8; (/** @lends chip8 */ function (chip8) { 'use strict'; var SCREEN_WIDTH = 64, SCREEN_HEIGHT = 32; /** * Initializes emulator and its default modules. ...
true
17e2494368a58b1288f8b9a457cf3cd69ab55bdf
JavaScript
andrewellio/NWEN-304-EMJ-Group-
/api/controllers/movieController.js
UTF-8
5,119
2.59375
3
[]
no_license
const Movie = require ('../models/Movie.js'); const User = require ('../models/User.js'); const router = require('../routes/routes.js'); const jwt = require('jsonwebtoken'); //Register a user exports.register = async(req, res) => { User.register(new User({name: req.body.name , email: req.body.email, username: req.bo...
true
47f0ecedd14b42839d94e26a31f899d902ecc15f
JavaScript
SebastianHatnean/PhaserProjectDemo
/resources/tutorials/UdemyGames/Phaser/state2.js
UTF-8
2,208
2.71875
3
[ "MIT" ]
permissive
var barrel, bullets, velocity = 2000, nextFire = 0, fireRate = 50, enemy, bullet, enemyGroup; demo.state2 = function(){}; demo.state2.prototype = { preload: function(){ game.load.image('base', 'assets/sprites/canonbase.png'); game.load.image('barrel', 'assets/sprites/canonbarrel.png'); game.load.image('bullet', ...
true
d1935bdfb8c7cfb034faf84af3288542c2ff5f37
JavaScript
rapolusakura/MoB-2.0
/askAvailabilities.js
UTF-8
1,086
2.53125
3
[]
no_license
const Bikers = require('./models/bikers') var db = require('./db.js'); const MessagingResponse = require('twilio').twiml.MessagingResponse; const accountSid = process.env.TWILIO_SID; const authToken = process.env.TWILIO_AUTH_TOKEN; const client = require('twilio')(accountSid, authToken); const TWILIO_TEST_NUM = 'whats...
true
fbf4db219dc93d64e1859570e4fcd769d5bf6f53
JavaScript
ibie1139/first-app-nodejs-mosh
/app.js
UTF-8
1,873
3.15625
3
[]
no_license
const path = require('path'); const os = require('os'); const fs = require('fs'); const EventEmitter = require('events'); // a class, camel case const http = require('http'); var pathObj = path.parse(__filename); console.log(pathObj); var totalMemory = os.totalmem(); var freeMemory = os.freemem(); console.log(`Total ...
true
6c68c27e47a0736de8c81011c3449cd82c81fabb
JavaScript
joelopresti/timestamp-microservice
/index.js
UTF-8
1,251
2.828125
3
[]
no_license
import express from 'express'; import moment from 'moment'; const app = express(); const PORT = 3000; const dateParse = (req, res) => { let date = req.params.date; // Check if format is a natural date if (isNaN(date)) { if (moment(date, 'MMMM DD YYYY').isValid()) { let unix = Math.round((ne...
true
fc70bbb86de7746b6bb89b3a9e6b0638ceccaa35
JavaScript
gitllama/Electron-Examples
/12_MapEditor/src/logic/wfmap.js
UTF-8
16,720
2.515625
3
[ "MIT" ]
permissive
import * as d3 from 'd3'; const margin = {"top": 20, "left":20,"right":3,"bottom":20} // props.wfmode // mono / color / bin //------------------------------ function legendCreate(code, canvas){ let json = typeof (code) == "string" ? JSON.parse(code)["legend"] : code["legend"];//JSON.parse(JSON.stringi...
true
45fac5fbb99f9d4618d0e88f11829f5a59525b88
JavaScript
xyfir/xyfir-buttons
/lib/shared/buttons/build-from-gist.js
UTF-8
712
3.203125
3
[ "MIT" ]
permissive
/** * Validates a Github Gist's data and attempts to build a button script. * @param {object} gist - The object returned from Github. * https://developer.github.com/v3/gists/#get-a-single-gist * @returns {object} A button script. */ export default function(gist) { if (!gist.id) throw 'Invalid script repository l...
true
968c840a870469a2227870dbc66e06c1d8eeb4f4
JavaScript
chenweihan/more-page-Framework
/swift/mobile/js/base/util.js
UTF-8
5,977
2.96875
3
[]
no_license
/** * Created with Vim7.3 Ubuntu10.04 * @fileOverview : util.js 工具类 * @author : Chen weihan <csq-3@163.com> * @since : 2013年11月07日 星期四 17时36分35秒 * @filename : base/util.js * @version : v1.0 * @description : */ ;(function(w){ var util = {}; util.cloneObj = function(objA,objB) { for(var i in obj...
true
9acc1e6a87e5ec8cd83ce1a48febb6493ba9ec03
JavaScript
Fronix/adventofcode-2020
/day2/index.js
UTF-8
1,398
3.609375
4
[ "Unlicense" ]
permissive
const inputs = require('./inputs'); const validPasswordsPart1 = () => { let validPasswords = 0; for (const input of inputs) { if (typeof input === 'string') { const range = input.match(/(\d+-\d+)/g)[0].split('-'); const minNumOcc = parseInt(range[0], 10); const maxNumOcc = parseInt(range[1],...
true
388856bd109926d542ddbf085a9fc7dea022f21a
JavaScript
vamc-stash/Dev-Challenges
/chat-app/react-client/src/redux/actions/channel.js
UTF-8
2,427
2.5625
3
[]
no_license
import * as ActionTypes from '../constants/ActionTypes' import { BASE_URL } from '../../shared/constants' import { errorObject } from '../utilities/helper' export const fetchChannel = (channel) => (dispatch) => { dispatch(requestInfo(ActionTypes.FETCH_CHANNEL_LOADING)) const bearer = 'Bearer ' + localStorage....
true