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
eb22e8fabfa68de007c7d498f6446d65efb8b78d
JavaScript
2090475/JSCringe
/code/Building.js
UTF-8
2,409
2.671875
3
[]
no_license
import * as THREE from '../libraries/three.js-master/build/three.module.js'; import {GLTFLoader} from "../libraries/three.js-master/examples/jsm/loaders/GLTFLoader.js"; export let model_dir = [ './resources/models/Buildings/Building_1.glb', './resources/models/Buildings/Building_2.glb', './resources/model...
true
a4ccbe55ce7eecc1298ce69f9760bad485b0c6cb
JavaScript
myrNG/Simplyon
/Semaine20/ajax/app.js
UTF-8
1,900
3.234375
3
[]
no_license
var requete; var apercu = document.getElementById('apercu'); // Requete Ajax function loadJSON() { requete = new XMLHttpRequest(); // au chargement on affiche le texte reçu ds la console et sur la page requete.onload = onJSON; requete.onerror = onError; reque...
true
ca571ed5d6f759e0ce54c771deb68f5fa876cd5f
JavaScript
huangtonyj/CodingNotebook
/test/problems/permutations.test.js
UTF-8
2,219
3.15625
3
[]
no_license
const permutations = require('../../problems/permutations'); describe('permutations()', () => { test('Test Case #1', () => { const perms = permutations([]); expect(perms.length).toEqual(0); }); test('Test Case #2', () => { const perms = permutations([1]); expect(perms.length).toEqual(1); ex...
true
bb6053f481de231279c3fca8857444d662edfdee
JavaScript
prashantsuman07/Manthan-ELF-16-OCT-19-Prashant-Suman
/HTmL/js/json/json.js
UTF-8
138
2.765625
3
[]
no_license
let b={ name:"abcd", id:21, age:21, gender:'m' } let c=JSON.stringify(b) console.log(c) let d=JSON.parse(c) console.log(d)
true
6e165c6bb2ee69d294dedcebe104fba9e8c2ea1b
JavaScript
zhangxianustc/nodejs
/project/test/youDntKnowJs/upGoing/pro_01.js
UTF-8
110
3.0625
3
[]
no_license
//user Number convert other types to number var a = "42"; var b = Number(a); console.log(a); console.log(b);
true
c69cfe7617cf0bd87f151d151cd2349d95f305c7
JavaScript
play-project/play-node-notification
/app.js
UTF-8
928
2.59375
3
[]
no_license
/** * PLAY Notification * * Copyright(c) 2012 Christophe Hamerling <chamerling@linagora.com> * MIT Licensed */ var express = require('express'); var app = express(); var count = 0; var port = process.env.PORT || 3000; var path = process.env.SUBCRIBER || '/subscriber' // JSON //app.use(express.bodyParser()); // ...
true
10e36ba7715acfd835a9b278a3b67bca37d82399
JavaScript
vale314/TicTacToeOnline
/client/src/components/pages/demoGame/demo.js
UTF-8
3,842
2.953125
3
[ "Apache-2.0" ]
permissive
import React from "react"; import "./style.css"; function Square(props) { return ( <button className={"square " + (props.isWinning ? "square--winning" : null)} onClick={props.onClick} > {props.value} </button> ); } class Board extends React.Component...
true
657371750435313e6ae3a6249cdfbef012ebc3e6
JavaScript
FreekAlberti/js-simon
/js/script.js
UTF-8
1,551
3.515625
4
[]
no_license
//Un alert espone 5 numeri casuali diversi. //Dopo 30 secondi l’utente deve inserire, un prompt alla volta, i numeri che ha visto precedentemente. //Una volta inseriti i 5 numeri, il software dice quanti e quali numeri sono stati ricordati. $(document).ready(function() { listaComputer = listaNumComputer(); setTime...
true
8da285b2182b213adf13040894bd6a8568c87ed6
JavaScript
lisaw97/The-Benevolent
/frontend/components/transaction_form/transaction_form.jsx
UTF-8
3,697
2.859375
3
[]
no_license
import React from 'react'; class TransactionForm extends React.Component { constructor(props) { super(props); this.state = { shares: 0, buy: true, submit: false, time: "" } this.setBuy = this.setBuy.bind(this); this.handleSubm...
true
a98bef6e4e8a0516ab9ba96437fc6b000b7a4765
JavaScript
vaibhavguptaIITD/My-blog
/javascriptTest/ans/arrayFunctions.js
UTF-8
504
3.796875
4
[]
no_license
//Function to delete item in an array. The function will modify the original array. function deleteItem(array, item) { var indexOfItem = array.indexOf(item); if(indexOfItem != -1) { array.splice(indexOfItem, 1); } } //Function to add item in an array. The function will modify the original array. function addItem...
true
4012ad22871019fc85c62120281d6c6db677090a
JavaScript
reZach/seniorthesis
/public/javascripts/angularjs/services/graph.js
UTF-8
9,495
3.015625
3
[]
no_license
// Service that handles graph logic angular.module("myapp").factory("graphService", ["activityService", "pieSliceColorService", function(activityService, pieSliceColorService){ var obj = { // Holds all data data: { chart: {}, details: [], date: { ...
true
7bbfe0bfc78d742242fa519ae803e93f723e8e36
JavaScript
am1k/ladies_ver1.0
/js/filter-age.js
UTF-8
3,228
2.671875
3
[]
no_license
/* ----------- filter-age -------- */ $(document).ready(function(){ $("#age-slider").slider({ min: 10, max: 100, values: [10,100], range: true, stop: function(event, ui) { jQuery("input#minCost").val(jQuery("#age-slider").slider("value...
true
ce200637c2a36666c3193de6c859384c96c86a74
JavaScript
Schad0001/aries-data
/lib/util/tunnel.js
UTF-8
4,467
2.546875
3
[]
no_license
import dns from 'dns'; import childProcess from 'child_process'; import createLogger from './logger'; const spawn = childProcess.spawn; const log = createLogger(__filename); // Define standard tunnel types export const FORTINET = 'forticlientsslvpn'; export const IPSEC = 'ipsec'; export const OPENVPN = 'openvpn'; /*...
true
274a8b5621e7d0713fe15d3fb4ce01e9d710bab7
JavaScript
arkanaman/arkanaman.github.io
/js/index.js
UTF-8
1,245
2.78125
3
[]
no_license
var inputTel = document.querySelector(".main__form__tel"); var inputBtn = document.querySelector(".main__form__btn"); var number = 19; inputTel.addEventListener("input", function () { var r = this.value.replace(/\D/g, ""); r = r.replace(/^.{2}/, ''); if (r.length > 8) { r = r.replace(/^(\d{3})(\d{3...
true
3c353095b365ec6a22554b61397707c306bfc80e
JavaScript
Hassona75/iti.webpack
/src/index.js
UTF-8
920
2.671875
3
[]
no_license
import './assets/styles/style.scss' import {Math} from './math' import buttonRenderFn from './components/button.component' import big from './assets/images/big.jpg'; import small from './assets/images/small.jpg'; console.log('big: ',big); console.log('small: ',small); //const modules = require('./math'); const no = n...
true
4bd151721f9a8257cf8c50c2bab7bf67a8a97d76
JavaScript
pablogassman/function-laboratory
/test/connectionFunctionSpec.js
UTF-8
18,130
2.546875
3
[]
no_license
'use strict' describe('Function connections', () => { describe('Simple', () => { onWorkspace('should connect expected parameters value', workspace => { const even = workspace.newBlock('even') const zero = workspace.newBlock('math_number') connect(even, zero) assertConnection(even, zer...
true
170d0fe2e8b480d3c1473bca7886f4959b18e368
JavaScript
jahow/rendering-analyzer
/src/utils.js
UTF-8
1,487
3.5625
4
[]
no_license
// inputs are [0,1] values // output is a {r, g, b} object with [0-255] values function HSVtoRGB(hue, value, saturation) { // HSV to RGB conversion, as seen here: http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c var r, g, b, i, f, p, q, t; i = Math.floor(hue * 6); f = hue * 6 - i; p = value *...
true
0ab8d0666a2c56de1e9de7e15430f0e6403c5452
JavaScript
hotjp/app
/resources/js/comm/validateUtil.js
UTF-8
3,765
2.703125
3
[]
no_license
jQuery.extend(jQuery.validator.messages, { required: "必填字段", remote: "请修正该字段", email: "请输入正确格式的电子邮件", url: "请输入合法的网址", date: "请输入合法的日期", dateISO: "请输入合法的日期 (ISO).", number: "请输入合法的数字", digits: "只能输入整数", creditcard: "请输入合法的信用卡号", equalTo: "请再次输入相同的值", accept: "请输入拥有合法后缀名的字符串",...
true
c63831722f18fa0ea8bdf88ff7009da185377dea
JavaScript
ahao430/leetcode
/1351.统计有序矩阵中的负数.js
UTF-8
571
3.34375
3
[]
no_license
/* * @lc app=leetcode.cn id=1351 lang=javascript * * [1351] 统计有序矩阵中的负数 */ // @lc code=start /** * @param {number[][]} grid * @return {number} */ var countNegatives = function(grid) { if (grid.length === 0) return 0; if (grid[0].length === 0) return 0; const lr = grid.length const lc = grid[0].length ...
true
0fc86d28f286811bd34770431edbb29ad5d4d0e6
JavaScript
dmlwn31/movie_api
/js/search.js
UTF-8
1,780
2.796875
3
[]
no_license
$(function () { let searchValue = document.location.href.split("=")[1]; let decodeValue = decodeURI(searchValue); console.log(decodeValue); $.ajax({ type: "POST", url: "/movie_api/data/api.php", data: { search_value: decodeValue, }, success: function (data) { let obj = JSON.pars...
true
702806fd5f3edfbaf4f748ac3aa392e456da08b6
JavaScript
JAlblas/todo
/src/view.js
UTF-8
3,821
2.828125
3
[]
no_license
import { ProjectManager } from "./project"; import { TodoManager } from "./todo"; import { Storage } from './storage'; // Module pattern const View = (() => { let containerDiv = document.querySelector("#container"); const renderProjects = () => { containerDiv.innerHTML = ""; ProjectManager.set...
true
9acab5507a7a9407ec386590ad23890a801866af
JavaScript
synoraeusebio/JS100NewSmallProblems
/Reading_Documentation_2/ten.js
UTF-8
573
4.28125
4
[]
no_license
/* JS100 - JavaScript Basics > Reading Documention 2 10. Style Guide Question: TypeError Run the following code. let tweet = 'Woohoo! :-)'; if (tweet.length() > 140) { console.log('Tweet is too long!'); } You'll see that it raises an error: TypeError: tweet.length is not a function Check the documentation...
true
8d7c3f726d68db12c9b75f1cbeec30522978eb95
JavaScript
naruto112/socket-frontend
/src/App.js
UTF-8
975
2.609375
3
[]
no_license
import "./App.css"; import React, { useEffect } from "react"; import io from "socket.io-client"; const App = () => { const socket = io.connect("http://localhost:3333"); const handleSubmit = (e) => { e.preventDefault(); const data = { author: "Renato", message: "Olá mundo", }; socket.e...
true
81477c932de144608511ed169587f5dbf0bcfd4e
JavaScript
staticinstance/white-labeled-react-component
/src/white-labeled-react-component.js
UTF-8
856
2.5625
3
[]
no_license
import React, { Component } from 'react'; class WhiteLabeledReactComponent extends Component { constructor(props){ super(props); if(!props.components){ return; } props.components.forEach((path) => this[this.getComponentName(path)] = null) } getComponentName(path){ return path.replace(/...
true
bdbe3a384f6c6e879e71ec47e9892ce1b784637f
JavaScript
warang580/datamix
/tests/paths.test.js
UTF-8
1,367
2.640625
3
[ "MIT" ]
permissive
const { paths } = require("../src/datamix"); describe("paths", () => { it("returns empty objects as an empty array", function () { expect(paths({})).toStrictEqual([]); }); it("returns an entry for empty objects", function () { expect(paths({o: {}})).toStrictEqual(['o']); }); it("returns an entry fo...
true
fbb166416a4f6e4ed683331e46bf592ac671fa1e
JavaScript
gaograce/electron-image-memory-leak-example
/freePort.js
UTF-8
986
2.8125
3
[]
no_license
const resolve = require('dns').resolve const resolveObject = require('url').resolveObject var net = require('net'); function getFreePortAsync(fn) { var server = net.createServer(); var calledFn = false; server.on('error', function(err) { server.close(); if (!calledFn) { calledFn = true; fn...
true
33a15a48bbcdf313e3f315cfb687b81f9d41ac1b
JavaScript
Christian3883/fullstackopen_frontend
/src/App.js
UTF-8
3,388
2.96875
3
[]
no_license
import React, { useState, useEffect } from 'react' import Agenda from './components/Agenda' import personService from './services/persons' import Notification from './components/Notification' const App = () => { const [persons, setPersons] = useState([]) const [newName, setNewName] = useState('') const [newNumbe...
true
a459be0e17385d76048a2ad2db0b0e6b1c7c54f7
JavaScript
ParkerM2/GamesList
/Services/register-service.js
UTF-8
2,844
3.015625
3
[]
no_license
//dependencies var DBConnection = require('./../config/DBConnection'); var bcrypt = require('bcrypt') var axios = require('axios'); // function for the creating of a new user // using bcrypt to give a hashed password // using express-validator to confirm both passwords match on the form // and pushing all this info to...
true
cb389e5eb62463b2a81d1838a8aaabc788ae1365
JavaScript
sukima/PasswordWidget
/lib/defaults.js
UTF-8
403
2.734375
3
[]
no_license
// defaults - Simple object defaults // Code modified from Underscore function defaults(obj) { var values = Array.prototype.slice.call(arguments, 1); values.forEach(function(source) { if (source) { for (var prop in source) { if (obj[prop] === void 0) obj[prop] = source[prop]; } } }); ...
true
cae3b561606134d234cebac87a8a45f1f044bbcd
JavaScript
iandemed/first-families-api
/db/seed.js
UTF-8
742
2.578125
3
[]
no_license
/* Seed our database with the first six presidents and their partners */ const Presidents = require('../models/President') const presidentData = require('./presidents.json') const FirstSpouses = require('../models/FirstSpouse') const spouseData = require('./firstSpouses.json') Presidents.deleteMany({}).then( Pr...
true
e927d668c13f99c96bb44b872ccd48e55656ddc0
JavaScript
omarjcm/ssp
/codigo/versiones/v4.7/SSP_v4.7/build/web/bautismo/acta/ingresar/bautismo.js
ISO-8859-1
4,252
3.15625
3
[]
no_license
window.onload = setObjects; function setObjects( ){ var reg_eclesiastico = document.getElementById("reg_eclesiastico"); reg_eclesiastico.style.visibility = "visible"; document.Bautizo.num_sacramento.focus(); } function vacio(q){ for ( i = 0; i < q.length; i++ ){ if ( q.charAt(i) != " " ){ return true }...
true
93b26593434b2a1e0268d0ff1ea973f545a1387c
JavaScript
LukaEHB/todo-nodejs
/_solutions/part5/server.js
UTF-8
1,286
2.59375
3
[]
no_license
const fs = require('fs'); const express = require('express'); const dotenv = require('dotenv'); const {v1:uuid} = require('uuid'); dotenv.config(); const app = express(); const PORT = process.env.PORT || 3000; app.use(express.json()); app.use(express.static(__dirname+'/public')); app.get('/getItems',(req,res)=>{ f...
true
cde7b489d1825a410a8caeeb6ad825de8525ede9
JavaScript
israr-shaikh/react-tutorial
/src/Hooks/useEffectOnce.js
UTF-8
381
2.671875
3
[]
no_license
import React, { useState, useEffect } from "react"; function UseEffectOnce() { const [count, setCount] = useState(10); useEffect(() => { console.log(count); setInterval(()=>{setCount(count+1)},1000) },[]) return ( <div className="App"> <div style={{ color: "white" }}>this is my Count {c...
true
ffdeb164def500373e85dc1eb40895bed06ba186
JavaScript
zhoujingchun/react-dianping
/React-demo/mock/server.js
UTF-8
3,577
2.703125
3
[]
no_license
// 按照官方示例 const Koa = require('koa'); // 注意 require('koa-router') 返回的是函数: const router = require('koa-router')(); const app = new Koa(); const cors = require('koa2-cors'); //const text=require('./test'); const bodyParser=require('koa-bodyparser') app.use(cors()); app.use(bodyParser()) // 添加路由 // 首页 —— 广告(超值特惠) c...
true
4639cda07901d3737422ee9b0dd269ea6f1775d5
JavaScript
daryanovak/piskel-project
/src/layers/addNewLayer.mjs
UTF-8
1,792
2.859375
3
[]
no_license
import { globalState } from '../piskelState.mjs' import {renderCanvas} from '../eventHandlers.mjs' import { generateCanvasState } from '../helpers/generateCanvasState.mjs'; export function addNewLayer() { let layerId = globalState.getCurrentFrame().getNextLayerId(); createLayerDOM(layerId); let frameData...
true
62b872909db0185de9d452102ae5cfe714bc17cc
JavaScript
eploja/Entorno-Cliente
/jquery/formulario_completito/js/main.js
UTF-8
2,949
2.5625
3
[]
no_license
/** * Archivo principal * * @author Francisco Javier Frías Serrano */ $(function() { let rellenarCampos = function() { $("#nombre").val("Paco"); $("#edad").val("30"); $('[name="sexos"]').prop("checked", true); $("#idioma").val("espannol"); $("#DNI").val("12345678Z");...
true
e2be15199aee8f391fc7ae1523095fc744aa4885
JavaScript
youseedk/dna
/fractal-theme/assets/js/src/code-preview.js
UTF-8
1,302
3.03125
3
[ "ISC" ]
permissive
function addCopyButton(parent) { const buttonText = 'Copy code to Clipboard'; const button = document.createElement('button'); button.textContent = buttonText; button.classList.add('element-preview__button'); button.setAttribute('aria-label', 'copy-button'); const copyField = document.createElemen...
true
bf8a88165e30d42de665dfac38483b0669a4a784
JavaScript
Jorden-Tang/React-Scroll-Price
/client/src/auth/auth.js
UTF-8
1,537
2.59375
3
[]
no_license
class Auth{ constructor(){ this.authenticated = false; this.adminAuth = false; } login(){ this.authenticated = true; } adminLogin(state){ this.adminAuth = true; } logout(){ localStorage.clear(); this.authenticated = false; } adm...
true
8ac4cf4a462d946f737dec3e2a6a548d528e0d74
JavaScript
NikiStanchev/SoftUni
/JavaScript Advanced/AdvancedFunctions/02_ArgumentInfo.js
UTF-8
837
3.625
4
[ "MIT" ]
permissive
function solve() { let types = {}; for(let i = 0; i < arguments.length; i++){ let argumentValue = arguments[i]; let argumentType = typeof argumentValue; if(!types.hasOwnProperty(argumentType)){ types[argumentType] = 0; } types[argumentType]++; consol...
true
0b24016404b1c933618c6d3bd7da20926dfb33ca
JavaScript
er-umang-sharma/javascript
/4. Advanced JS Objects and Function/script.js
UTF-8
2,533
4.3125
4
[]
no_license
/** * Challenge 7: * * Build a fun quiz game in the console. * 1. Build a function constructor called Question to describe a question. A question should include: * a. Question itself. * b. The answers from which the player can choose the correct one from. * c. Correct answer * * 2. Create a co...
true
5dd36773a15b5ea1a67448f80a189e7188d56635
JavaScript
wyj580231/s-lint
/packages/@jd/stylelint-config-selling/rules/function.js
UTF-8
2,878
2.90625
3
[]
no_license
/** * @rulesName 函数 * @rulesDesc 对函数(如scale、translate、url等)的使用进行约束,是否需要空白、换行,属性值允许和禁止的列表等 */ "use strict"; module.exports = { // 指定允许的函数列表,关闭 "function-allowed-list": null, // 禁止在calc函数中使用无效表达式 "function-calc-no-invalid": [ true, { message: '禁止在calc函数中使用无效表达式' } ], // 禁止在calc函数中使用无...
true
0c5973330ad6086034d0807e236a5c15d38bc7d8
JavaScript
Ichinaro/app-joy
/src/frontend/actions/index.js
UTF-8
1,680
2.65625
3
[]
no_license
import axios from "axios"; export const loginRequest = (payload) => ({ type: "LOGIN_REQUEST", payload, //El payload recive la Props [event.target.name]: event.target.value de los input }); export const logoutRequest = (payload) => ({ type: "LOGOUT_REQUEST", payload, //El payload recive la Props con un objeto ...
true
956414c2801608cb81d606e49be4709f28fe5c2b
JavaScript
Graficas-2019/a3-solar-system-emilianoabascal
/Solar_System.js
UTF-8
11,126
2.734375
3
[ "MIT" ]
permissive
//Emiliano Abascal Gurria A01023234 var renderer = null, scene = null, camera = null, SolarSystem = null, cube = null, sphereGroup = null, sphere = null, orbitControls = null, timeForMercury = null,timeForVenus = null, timeForEarth = null, timeForMars = null, timeForJupiter = null, timeForSaturn = null, timeForUranus =...
true
a47dce48168eb8acf75d490929f9f79937cd5008
JavaScript
amykslover/retiser
/client/src/utils/helpers.js
UTF-8
1,938
2.75
3
[]
no_license
//This is the file where AJAX calls from the front end to the back end will live //Send login data to //Send user data to correct endpoint import axios from "axios"; // Helper Functions const helpers = { saveUser: function(userData) { return axios.post("/api/users/login", userData) .then(function(res...
true
3aa40e204d97e145196be1bd11c3a12f5f89dbc8
JavaScript
zclyne/The-Web-Developer-Bootcamp
/javascript/Select and Manipulate/select_and_manipulate.js
UTF-8
545
3.8125
4
[ "MIT" ]
permissive
var h1 = document.querySelector("h1"); // select h1 on the page, it returns an object that represents "My title" on the page and saves it in the variable h1 h1.style.color = "pink"; // manipulate // one more example, change the background color every second between blue and white var body = document.querySelector("bod...
true
92f3017ec651e0e42ca6acc591126b63309c1915
JavaScript
ordsec/data-structures-algorithms-js
/04-recursion/01-factorial.js
UTF-8
789
4.28125
4
[]
no_license
function facIterative(num) { let fac = 1; // starting from num, multiply for (let i = num; i > 0; i--) { fac *= i; } return fac; } console.log(facIterative(10)); function facRecursive(num) { // base case: // 1! is 1, 2! is 2, so // * if the input is 1 or 2, the function will return here /...
true
7552f1f058bf2bb3e0150255662cc6d3deca00c5
JavaScript
Nicoletti-Seb/GOT
/scripts/index.js
UTF-8
4,351
3.265625
3
[]
no_license
/** @author Sébastien Nicoletti */ document.addEventListener("DOMContentLoaded", function(event) { //Associate event with html elements document.querySelector("#refresh-episodes").onclick = update; // update the page update(); }); var dataLikeElement = null; /** Function "init" Generate the html code to ...
true
9780e0c8a5ba05db3f986287d8e83f5f45b11a14
JavaScript
Wregret/nodejs
/pj1.js
UTF-8
5,451
2.9375
3
[]
no_license
const express = require('express'); const mysql = require('mysql'); const session = require('express-session') const app = express(); const port = 4000; const CALCULATION_SUCCESS = "The action was successful"; const INVALID_NUMBER = "The numbers you entered are not valid"; const INVALID_ACCESS = "You are not currently...
true
83a3f19764a5a1e0c47a910a634aa5e0c606a104
JavaScript
donisgtr/happy
/src/server.js
UTF-8
658
2.53125
3
[ "MIT" ]
permissive
//Importantando a dependencia const express = require('express'); const path = require('path'); /* isso já e do Node */ const pages = require('./pages.js'); //Iniciando o Express const server = express(); server /* utilizando arquivos estaticos */ .use(express.static('public')) /* configurar template ...
true
80b0de3198deb70d8a6b754c1f3028fc650219a9
JavaScript
de1mat/react-useeffect-showcase
/src/EffectsDemoEffectPrevData.js
UTF-8
666
2.96875
3
[]
no_license
import React, { useState, useEffect, useRef } from "react"; function EffectsDemoEffectPrevData() { const [count, setCount] = useState(0); const prevCountRef = useRef(); useEffect(() => { console.log("useEffect", `state ${count}`, `ref ${prevCountRef.current}`); prevCountRef.current = count; }, [count]...
true
06a9026f703b616fc94e23f1a4ab82dffa75707d
JavaScript
heldrida/questionnarieTest
/app/actions/index.js
UTF-8
1,102
2.5625
3
[]
no_license
import data from '../data/questions.js'; export const FETCH_QUESTIONS = 'FETCH_QUESTIONS'; export const SET_ACTIVE_QUESTION = 'SET_ACTIVE_QUESTION'; export const SET_QUESTION_ANSWER = 'SET_QUESTION_ANSWER'; export function fetchQuestions() { // Fake the http get request let promise = new Promise(function (resolve,...
true
30da807625baff2fbab52dd389a99e0ec4959f65
JavaScript
goodybag/cater-api-server
/public/js/app/stamps/requests/base.js
UTF-8
1,927
2.5625
3
[]
no_license
/** * Base * * Provides easy access to our internal requests utility * for other request stamps to utilize */ if ( typeof module === "object" && module && typeof module.exports === "object" ){ var isNode = true, define = function (factory) { module.exports = factory(require, exports, module); }; } define...
true
8928e426f16e840e6f10e62a1738318fdfc6f576
JavaScript
themostprime/censorless
/Source/content_script.js
UTF-8
1,105
3.109375
3
[ "WTFPL" ]
permissive
walk(document.body); function walk(node) { // OP stole this function from here: // http://is.gd/mwZp7E var child, next; switch (node.nodeType) { case 1: // Element case 9: // Document case 11: // Document fragment child = node.firstChild; while (child) { next = child.nextSib...
true
32c66bde567ac14b92b0af51999668ddb1b8b3be
JavaScript
kidboi666/modern-javascript-summary
/basic-javascript/4)alert-prompt-confirm.js
UTF-8
258
3.703125
4
[]
no_license
// <- 간단한 페이지 만들기 --> // 사용자에게 이름을 물어보고, 입력받은 이름을 그대로 출력해주는 페이지를 만들어 보세요. let name = prompt('당신의 이름은 무엇입니까?','당신의 이름'); alert(name);
true
bea0f531243ce671f8627f017111e45800c7b547
JavaScript
AdaoBJr/RockApps
/src/redux/reducers/cart.js
UTF-8
1,268
2.53125
3
[]
no_license
import { ADD_CART, ADD_DATA_CARD, ADD_TOTAL_CART, SET_COMPLETE_BUY, } from '../actions'; export const CART = { cart: [], updateSum: true, totalCart: 0, buyCompleted: null, dataCard: { name: '', number: '', expiry: '', cvc: '', focus: '', }, }; const cartReducer = (state = CART, { type, payload }) =>...
true
cf1ee49cc6a1b57efd5fbc41b756fb3d1e1daf73
JavaScript
aniucd/WebInterface
/media/myjs/graph_utils.js
UTF-8
874
2.578125
3
[]
no_license
graph_utils = { //================================= // AndyChart //================================= AndyChart: function(Data) { var chart, data, options; google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawGraph); function drawGraph() { data = google.visual...
true
ee81668ef8e4b5931aaad4f9673252ab59d9e3b7
JavaScript
DeadLenny/JavaScript-Projects
/Strings-Reverse-Order-and-Random-Order/js/index.js
UTF-8
742
4.15625
4
[ "MIT" ]
permissive
var name=prompt("What is your name?"); rev(); document.write('<br/>'); first(); document.write('<br/>'); ran(); function rev(){ rev= name.split(""); rev=rev.reverse(""); rev=rev.join(""); document.write("Name in reverse: "+rev); } function first(){ res = name.charAt(0); rej = name.charAt(name.length-1); do...
true
d77bf3e94b0a08be12d72e13b86f8df575eef687
JavaScript
trcielomuyot/noderestify
/features/step_definitions/steps.js
UTF-8
5,800
2.703125
3
[]
no_license
'use strict'; module.exports = function() { this.World = require("../support/world.js").World; var _url; var module = this; var world = this.World; var url = 'http://localhost:8888'; var users; var id; var _statusCode, _status, _reply_body, _method; // Global this.Given('that the API server is running', fun...
true
9c3561b96cb53c2d0769f0ac30b1ea0bafc993ec
JavaScript
Rinish94/DSA_leetcode
/Interview_DSA/Interview_combined/1.js
UTF-8
3,409
3.25
3
[]
no_license
{/* <div> <button>1</button> <button>4</button> <div> <button>2</button> <button>5</button> </div> <div> <button>3</button> </div> </div> button { color:"red" } div > div > button : nth-oftype(1){ color :"green" } <p>fllkffff<bold>lokesh</bold></p> */} // let...
true
87f55f482db6bf0db52a939ba21affb7e6edb0d7
JavaScript
olwg199/timetracker-frontend
/src/actions/goals-actions.js
UTF-8
1,791
2.609375
3
[]
no_license
import GoalService from "services/GoalService"; import { addGoal, changeGoal, setGoals, setGoalsLoading, removeGoal } from "actions"; export const fetchGoals = () => { return async (dispatch) => { try { dispatch(setGoalsLoading(true)); const response = await GoalService.getGoals(); ...
true
bbf09ad1931b9512144eb2ad91661819eb3b6b7f
JavaScript
JakeDawkins/reason-examples
/lib/js/src/data-structures/stack.js
UTF-8
809
2.5625
3
[]
no_license
// Generated by BUCKLESCRIPT VERSION 2.1.0, PLEASE EDIT WITH CARE 'use strict'; var List = require("bs-platform/lib/js/list.js"); var Pervasives = require("bs-platform/lib/js/pervasives.js"); var size = List.length; function empty(stack) { return +(List.length(stack) === 0); } function push(stack, value) { ...
true
c34d8f1ff5e2db4840b526424eabea6f4cb3d0d7
JavaScript
lizharris90210/bamazon
/bamazonCustomer.js
UTF-8
2,275
3.15625
3
[]
no_license
var mysql = require("mysql"); var inquirer = require("inquirer"); var connection = mysql.createConnection({ host: "localhost", port: 3306, user: "root", password: "password", database: "bamazon_db" }); // Error connection.connect(function(err) { if (err) throw err; start(); }); // Prompt for ID of prod...
true
e5bca2d7b359a3f79f36e2a055ee7a70408e5877
JavaScript
Magichastie/CndMtg
/parsers.js
UTF-8
11,093
2.609375
3
[]
no_license
var DEBUG = false; module.exports = { facetoface: facetoface, comichunter: comichunter, wizardtower: facetoface, gamekeeper: gamekeeper, magicstronghold: magicstronghold, gamersspot: magicstronghold, tome2: tome2 } var request = require('request'); function Product(url, vendor, price, qua...
true
6d2b8337174e9808b513f4d9a2974b18ef43efd2
JavaScript
PraKumSuk/Study_NodeJs
/node3_express_api_intro/index.js
UTF-8
4,972
3.28125
3
[]
no_license
const express = require('express'); const app = express(); // Joi package for json validations const Joi = require('joi'); //Used for POST json body req or response //Calling app.use method to help json //body processing, this actually returns a middleware //to process req and res body json app.use(express.json()); ...
true
10f2c89dc72af125e3d979690b7b75d7f6f62e03
JavaScript
totemarcal/core-components-RN
/components/TextInputExample.js
UTF-8
1,173
3
3
[]
no_license
import React from 'react'; import { View, TextInput } from 'react-native'; export const UselessTextInput = () => { const [value, onChangeText] = React.useState('Useless Placeholder'); return ( <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> <TextInput style={{ he...
true
19a264830009688cd0235b8c3a75b4e565ca6573
JavaScript
Ekmand/tannerderp.tk
/Games/p5/basketball/button.js
UTF-8
1,808
2.734375
3
[ "MIT" ]
permissive
var Button = function(x, y, width, height, radius, color, text, textSize, textColor, react) { this.x = x; this.y = y; this.width = width; this.height = height; this.radius = radius; this.color = color; this.text = text; this.textSize = textSize; this.textColor = textColor; this.react = react || function() { ...
true
7bcc0679759adfb746dbea6688bfb671cd43ac4a
JavaScript
leolenis2018/programacionAvanzada_Completo
/EntregaPrimerMomento_Avanzada/Ejercicio_1.js
UTF-8
747
3.171875
3
[]
no_license
//FUNCION TRADICIONAL function calcularDistancia( coordenadax1, coordenadax2, coordenaday1, coordenaday2 ) { console.log( `La distancia del planeta Yavin4 a Naboo es de: ${Math.sqrt( Math.pow(coordenadax2 - coordenadax1, 2) + Math.pow(coordenaday2 - coordenaday1, 2) )...
true
364acb5d7c6c145d409cdd858a12896205dfc2d3
JavaScript
HU-SD-SV2PRFED-studenten-2021/prfed_2021-v2b-2
/src/main/resources/static/script/namecheck.js
UTF-8
995
2.90625
3
[]
no_license
window.onload = function () { const loginBtn = document.getElementById('loginBtn') loginBtn.onclick const jwt = window.sessionStorage.getItem('myJWT') if (jwt !== null) { const resultJWT = parseJwt(jwt.substr(jwt.indexOf(' ') + 1)) loginBtn.innerText = `Welcome back, ${resultJWT.sub}!` ...
true
a34bf5041724610d1f001d2b1068953950ac4453
JavaScript
katherinesnow/webpack-basic-learn
/tapable/asyncTapable.js
UTF-8
1,688
3.625
4
[]
no_license
// const { AsyncParallelHook } = require("tapable") class AsyncParallelHook { constructor(args) { this.args = args this.tasks = [] } tapAsync(name ,task) { this.tasks.push(task) } callAsync(...args) { // 先取出最后传入的回调参数 let finalCallback = args.pop() //...
true
702a9b7072720de0b0442b825fc2677bb6c5a914
JavaScript
singhmadhurendra295/ES5-Node-Express-Base
/lib/email-provider.js
UTF-8
879
2.515625
3
[]
no_license
const emailConfig = require('../config/default'); const { EMAIL } = require('./constant'); const nodemailer = require('nodemailer'); class EmailProvider { constructor() { this.credential = emailConfig.SMTP; this.transporter = nodemailer.createTransport(this.credential); } transportEmail(mailOptions){ ...
true
e97cc98d1785fbdfa302c5f9ffb3a3e117a8013f
JavaScript
technakal/express-flashcards
/public/js/app.js
UTF-8
249
2.921875
3
[]
no_license
const showHint = () => { hint.style.display = 'block'; hintButton.style.display = 'none'; } const hint = document.querySelector('#hint'); const hintButton = document.querySelector('#hintButton'); hintButton.addEventListener('click', showHint);
true
2269a3cd4001f28a88bc21955f0143abe3329c8a
JavaScript
NikDark/search-movie-engine
/code/api/src/static/js/open_modal.js
UTF-8
2,357
2.734375
3
[ "MIT" ]
permissive
let modal = document.querySelector("#modal"); let modalEdit = document.querySelector("#modal-edit"); let modalOverlay = document.querySelector("#modal-overlay"); let closeButton = document.querySelector("#close-button"); let closeButtonEdit = document.querySelector("#close-button-edit"); let openButton = document.query...
true
5762f23a4558b7cbbebd4b1cddc36b74d418c091
JavaScript
csnenuyyq/task8
/lib/main.js
UTF-8
2,084
3.125
3
[]
no_license
function getMessage(){ return ['||:::', ':::||', '::|:|', '::||:', ':|::|', ':|:|:', ':||::', '|:::|', '|::|:', '|:|::' ]; } function changeText(string){ var count = 0; var arr = Array.from(string); var textMes = getMessage(); var text = '|'; for(var i in arr){ text...
true
63b0c4653b600c17f35167900babf8baf9a3f19c
JavaScript
j5bot/collectist
/web/js/env/app-config.js
UTF-8
1,929
2.65625
3
[]
no_license
/** * env/app-config.js * * Define the application configuration module, which loads the * application's configuration JSON file, extends the app object * and updates elements in the page head (title and a new stylesheet) * also bootstraps the addthis module */ define([ 'jquery', 'env/site-alias', 'app/module...
true
91c94f46239f1c102afc8fdabddac7f2ea4d5e26
JavaScript
Bjam091/tinyapp
/helpers.js
UTF-8
272
2.859375
3
[]
no_license
//gets the user infromation based on their email being compared to the database const getUserByEmail = function(email, users) { for (let uID in users) { if (users[uID].email === email) { return users[uID]; } } return null } module.exports = getUserByEmail;
true
be064b7f970180386367b6b883793d2d79fd679d
JavaScript
AlexandreDinizDePaula/react-hooks
/src/components/MoviesList.js
UTF-8
612
2.53125
3
[]
no_license
import React,{useState, useEffect} from "react"; import {MoviesService} from "../services/MoviesService" import {Link} from "react-router-dom" export const MoviesList = () => { const [movies, setMovies] = useState({data: {results:[]}}) const requestMovies = async () => { const moviesResult = await MoviesSe...
true
14b0a34ea169d4177687f95d768bf4ca97c7fdf3
JavaScript
8785496/shortener
/view/js/script.js
UTF-8
1,025
3.0625
3
[]
no_license
function showContent() { if (httpRequest.readyState === 4) { if (httpRequest.status === 200) { document.getElementById('result').innerHTML = httpRequest.responseText; } else { alert('There was a problem with the request.'); } } } function makeRequest(url, urlLong) { if (wi...
true
80c2b3c9193248c0cf826f696b656691afb02ef1
JavaScript
waveTan/nuls-sdk-js
/src/test.js
UTF-8
2,541
2.625
3
[]
no_license
//import axios from 'axios' const nuls = require('./index'); const utils = require('./utils/utils'); //创建地址 /*let passWord = ''; const newAddress = nuls.newAddress(passWord); console.log(newAddress);*/ //key:2de32308846652eeeaf68e23ef586aecb82f0459d4b520dddf13c7542c2b8f83 //pub:02a4859a56aa2d4277b1f8a9243a764d9adf8ad...
true
48c40b3659b9e81a12367fd3f66e0f93b93a8888
JavaScript
nss-day-cohort-14/modern-js-quiz-whitneycormack
/src/fillDOM.js
UTF-8
1,243
2.8125
3
[]
no_license
"use strict"; let Robot = require("./Robot"); let viewChange = require("./viewChange"); let typeSelects = $(".robot-options"); let fightRobot1 = $("#fightRobot1"); let fightRobot2 = $("#fightRobot2"); let fillSelectOptions = () => { for (let i = 0; i < Robot.botArray.length; i++) { let newTypeOption = $("<opt...
true
5a4e0e24f7b74600ce79737478c1fea7c2b34fd8
JavaScript
UberAemos/user-management-page
/frontend/src/api/UserService.js
UTF-8
588
2.5625
3
[]
no_license
import axios from "axios"; class UserService { getUsers(pageNumber) { return axios.get("http://localhost:8080/api", { params: { pageNumber: pageNumber } }); } addUser(user) { return axios.post("http://localhost:8080/api/user", user); } deleteUser(userId, pageNumber) { return axios.del...
true
9067e76a4bbd184cdbe22045e24d83ad5688fb41
JavaScript
code-of-design/gps-logggger-html5
/scripts/geolocation.js
UTF-8
8,438
3.109375
3
[]
no_license
// GPS LOGGER v1.0 // https://github.com/code-of-design/gps-logggger-html5 (function($){ "use strict"; // 現在位置 var latitude = 0.0; // 緯度. var longitude = 0.0; // 経度. var latitude_storage = []; // 緯度ストレージ. var longitude_storage = []; // 経度ストレージ. var CURRENT_POSITION_INTERVAL = 5000; // 現在地取得インターバル. // 記...
true
c6818f52f2b991995754b7167fa349701f1e7dd6
JavaScript
nceof/imageboard
/source/engine/makaba/vote/parseVoteResponse.js
UTF-8
517
2.921875
3
[ "MIT" ]
permissive
/** * Parses "vote" API response. * @param {object} response * @return {boolean} Returns `true` if the vote has been accepted. Returns `false` if the user has already voted for this thread or comment. */ export default function parseVoteResponse(response) { if (response.Error) { // "Вы уже двачевали этот пост."...
true
17fe47d59d528940a3ec44d924548920c94df06d
JavaScript
arooj-fatima-brainx/Assignment-3
/myscript.js
UTF-8
4,389
3.09375
3
[]
no_license
var rowId=0; function getInput() { if (event.keyCode === 13) { createTableRow(); } } var mytext = document.getElementById("myInput"); function ConfirmDelete() { var x = confirm("Are you sure you want to delete?"); if (x) ret...
true
b3ac925ced666c19cd28353373f35a93386b091f
JavaScript
lawsonfeltman/hotorcold
/js/app.js
UTF-8
1,859
3.4375
3
[]
no_license
$(document).ready(function(){ var assignSecretNumber = function () { return Math.floor((Math.random() * 100) + 1); }; var createNewGame = function () { $('span#count').html(0); $('h2#feedback').html("Make Your Guess!"); $('ul#guessList').html(""); $('#userGuess').val(""); }; var playGuessingGame = f...
true
6e27d91117c5bb76b2b63ec62f01c790082338b9
JavaScript
sandrosc/EuklidReact
/src/NumberInput.js
UTF-8
703
2.890625
3
[]
no_license
import React from 'react'; class NumberInput extends React.Component { handleChange = (e) => { const {value} = e.target; let numberValue = parseInt(value, 10); if (isNaN(numberValue)) return; const max = Math.pow(2,32) - 1; if (numberValue > max) numberValue = max; this.props.onChange(numberV...
true
f400ae0991eedccbb865e08a1ce77ad19e9dcd51
JavaScript
GoDodgers/ToyProblemsPlusTests
/problems/AlphabetInventory.js
UTF-8
1,081
4.09375
4
[]
no_license
/* Alphabet Inventory Given an alphabet and a string of text, write a method that tallies the count of each letter defined in said alphabet (case insensitive), then return the result of this tally. Examples Input Output alphabet: "aBc" text: "aabbccdd" "a:2,b:2,c:2" alphabet: "x" text: "Racer X is...
true
380cd15be8f1906b6714e1250c0610ea0a6aa395
JavaScript
porpus/chromezip
/JavaScript/Unzip.js
UTF-8
7,647
2.765625
3
[]
no_license
var CENTRAL_DIRECTORY_KEY = [6,5,75,80]; var CENTRAL_DIRECTORY_FILE_KEY = [2,1,75,80]; var LOCAL_FILE_KEY = [4,3,75,80]; var DATA_KEY = [8,7,75,80]; var unzip = function(){ upload(processData); return false; }; var upload = function(callback) { var zip = document.getElementById("zip"); // the fil...
true
9da4d8f07e4ef6cb416e64859c190d0323b5ec9e
JavaScript
samuelcolvin/em2
/js/src/Editor/EditLink.js
UTF-8
3,050
2.671875
3
[ "MIT" ]
permissive
import React from 'react' import { Input, Button, ButtonGroup, Label, FormGroup, FormFeedback, Modal, ModalHeader, ModalBody, ModalFooter, } from 'reactstrap' import isUrl from 'is-url' export const EditLink = ({link, close, finished}) => { const [link_title, setTitle] = React.useState('') cons...
true
7df390d16680a03395455b853b014841c6f347f6
JavaScript
carsonhuang520/leet-code
/leetcode-17.js
UTF-8
1,481
3.875
4
[]
no_license
var letterCombinations = function (digits) { if (digits.length === 0) { return [] } const res = [] const map = { 2: ['a', 'b', 'c'], 3: ['d', 'e', 'f'], 4: ['g', 'h', 'i'], 5: ['j', 'k', 'l'], 6: ['m', 'n', 'o'], 7: ['p', 'q', 'r', 's'], 8: ['t', 'u', 'v'], 9: ['w', 'x', 'y',...
true
2b5bfdc20d12aecc26cc29d3afe0b8ebc7e1a2da
JavaScript
GulajavaMinistudio/CSUDM20202
/src/oopjs/classjs3/appjs_class3.js
UTF-8
4,397
3.75
4
[ "MIT" ]
permissive
/* eslint-disable max-classes-per-file */ // CLASS JS latihan menggunakan class di JavaScript class Color { constructor(red, green, blue, name) { this.red = red; this.green = green; this.blue = blue; this.colorName = name; this.calcHSL(); } greetWarna() { r...
true
c6ff3b9f2a863f4d71f74996376beefce59ec562
JavaScript
marynotari/open-source-cinema
/open-source-cinema-master MARY/osc_setting_street_view_OBX/sketch.js
UTF-8
7,440
2.515625
3
[]
no_license
// see https://developers.google.com/maps/documentation/javascript/streetview for street view docs //Saving Stuff var selectedElement; var numberOfElements = 0; var dragging = false; var allElements = []; var name_field; var scene_field; var sceneNum = 1; var people; var texture; //go to http://docs.mlab.com/ sign up...
true
eaee8b32978da8c406f10858dcd5d00355c57aaf
JavaScript
davidbt07/nodejs-mysql-app
/src/routes/links.js
UTF-8
2,474
2.96875
3
[]
no_license
//Rutas para almacenar enlaces, eliminarnos o actualizarlos const express = require('express'); const router = express.Router(); const pool = require('../database');//Este pool hace referencia a la conexion de la base de datos const{ isLoggedIn } = require('../lib/auth'); //Manejar ruta add router.get('/add', isLogg...
true
9f44a0c7624c659782098e403ec50997637873fc
JavaScript
AadiPoojary/C_37
/js/form.js
UTF-8
1,230
3.265625
3
[]
no_license
class Form{ constructor(){ this.input = createInput("Name"); this.button = createButton("Play"); this.greeting = createElement('h3'); this.greeting1 = createElement('h3'); } hide(){ this.greeting.hide(); this.greeting1.hide(); this.input.hi...
true
9fc9fb50d737adb5a7b205582a5580932adb24ab
JavaScript
pengli520/canvas
/src/js/video/videoToImg.js
UTF-8
2,182
2.609375
3
[]
no_license
/* * @Author: your name * @Date: 2021-01-15 09:07:40 * @LastEditTime: 2021-01-19 16:55:04 * @LastEditors: Please set LastEditors * @Description: 视频处理成图片 * @FilePath: \canvas\src\js\videoToImg.js */ import { createEl, addBody, initCanvas } from '../dom/dom.js' // 画图 video.status 为true, 代表事件操作, 为false:ontimeupdat...
true
66cfe6d44e1384a4c0ed0e9d732f52be589770f8
JavaScript
SwirlNetworks/discus
/src/super.js
UTF-8
1,499
2.609375
3
[ "MIT" ]
permissive
var Discus = require('./discus'); // Find the next object up the prototype chain that has a // different implementation of the method. function findSuper(methodName, childObject) { var object = childObject; while (object[methodName] === childObject[methodName]) { object = object.constructor.__super__; if (!obje...
true
d5a37454ddca19255ad3a2e5f0d2cba14b029b98
JavaScript
porkpiie/QA-cinema
/src/Components/SeatMap.component.js
UTF-8
6,798
2.53125
3
[]
no_license
import React, { Component } from 'react'; import Button from '../Components/Button.component'; export default class SeatMap extends React.Component { constructor() { super(); this.state = { seat: [ 'A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'B1', 'B2', 'B3', 'B...
true
28c5ff2772e869a288a7c221edeff6227c02afd2
JavaScript
Aakashdeveloper/aug_ui_mrng
/javascript/7Mathopt.js
UTF-8
1,087
2.625
3
[]
no_license
Math.random() 0.26961111165149143 Math.random() 0.5793662017953694 Math.random()*10 0.36865335023357426 Math.random()*10 1.3756331712330683 Math.random()*100 52.02488100870577 Math.random()*1000 579.418526930362 Math.random()*1000 44.25584632194357 Math.floor(10.1) 10 Math.floor(10.4) 10 Math.floor(10.9) 10 Math.cei...
true
c5f7f16e16e47d52655512c52508254dd1850344
JavaScript
weblemur/project_euler
/009_special_pythagorean_triplet.js
UTF-8
838
3.546875
4
[]
no_license
function findSumTriple(n) { // solution based on Euclid's formula var i, j, l, sum = 0, check = true, a = 0, b = 0, c = 0; for (i=1; check; i++) { // breaks if inner loop has run twice in a row // which occurrs when all leftover triples generated are too large if (i === j) break; ...
true
e9ee9afdd43d233cf17fb028b6cbfd7c4280a89b
JavaScript
18712868566/2018
/6章面向对象的程序设计/obj.js
UTF-8
3,651
4.40625
4
[]
no_license
var person = new Object(); person.name = 'lixuefeng'; person.age = 26; person.job = 'web'; person.sayName = function() { console.log(this.name) } person.sayName(); // 对象字面量的形式创建对象 var person1 = { name: 'heqing', age: 25, job: 'photo', sayName: function() { console.log(this.name) }...
true
99d81db3cf9e3ee3fc4179c8afbf49665a4b7cd9
JavaScript
VladislavPenchev/JavaScript
/JavaScript_Advanced/11.OBJECT_COMPOSITION/Projects/From_First_Video/03.ListProcessor.js
UTF-8
457
3.65625
4
[ "MIT" ]
permissive
const list = function () { let commands = []; const add = (command) => commands.push(command); const remove = (command) => { commands = commands.filter(c => c !== command); }; const print = () => console.log(commands.join(', ')); return { add, remove, print}; }(); ['add hello', 'add ag...
true