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
61211e370793a777f5cc4ae2840da30e9d253ad2
JavaScript
NicholasNapolitano/Progetto-Finale-InfoVis-A.A.2018-2019
/js/MCUgraph.js
UTF-8
16,309
2.546875
3
[]
no_license
d3.json("data/MCUNodes.json").then(function (nodi) { d3.json("data/MCUEdges.json").then(function (archi) { //Riepimento strutture dati var nodi_id_eroe = []; var nodi_id_film = []; var nodi_eroe = []; var nodi_film = []; var edge_graph = []; var nodi_poteri = []; var nodi_date = []; var nodi_fase = ...
true
f7a3c9a6bc3985c9871c02eef8a38ec8a6274d62
JavaScript
krish-nair/restApiNodeJs
/routes/posts.js
UTF-8
498
2.515625
3
[]
no_license
const express = require("express"); const Post = require("../models/postData"); const router = express.Router(); router.get("/", (req, res) => { res.send("You are on posts page"); }); router.post("/", async (req, res) => { const post = new Post({ title: req.body.title, description: req.body.description, ...
true
23ea4f915913d464eec5a1c8548179596ae6c9cb
JavaScript
Shikhar15606/ToDoReact
/src/components/Mainbox.js
UTF-8
2,073
2.65625
3
[]
no_license
import React,{ Component } from 'react'; import './box.css'; import List from './Listitems'; class main extends Component{ constructor(props){ super(props); this.state={ arr:[], currentItem:{ data:'', key:'' } } this...
true
47ebd9fb511bb12e0faa7e3898bfa0f913c2e6ea
JavaScript
bhprtk/stock--tracker
/main.js
UTF-8
2,609
3.140625
3
[]
no_license
$(document).ready(init); function init(){ $('.search').submit(lookup); $('.stocks').on("click", ".card", store); $('.render-stocks').on("click", ".details", remove); displayQuotes(); } function displayQuotes() { var stocks = Storage.get(); stocks.forEach(function(stock){ var searchKey = stock.split("-...
true
51e5ecd21b8407549a30e09cca272ee1af69a7a7
JavaScript
Dimitar-Velchev/JavaScript-Fundamentals
/Functions - Lab/2.addAndSubtract.js
UTF-8
322
3.671875
4
[]
no_license
function addAndSubtract(firstNum, secondNum, thirdNum) { let sum = sumTwoNums(firstNum, secondNum); let result = subtractNum(sum, thirdNum); console.log(result); function sumTwoNums(a, b) { return a + b; } function subtractNum(a, b) { return a - b; } } addAndSubtract(23, 6, 10);...
true
9f8955430ee68fdfd884fee45510e6ba4bc5cc3e
JavaScript
yuda-lyu/wsemi
/src/isblob.mjs
UTF-8
517
3
3
[ "MIT" ]
permissive
/** * 前端判斷是否為Blob,NodeJS沒有Blob * * Unit Test: {@link https://github.com/yuda-lyu/wsemi/blob/master/test/isblob.test.mjs Github} * @memberOf wsemi * @param {*} v 輸入任意資料 * @returns {Boolean} 回傳判斷布林值 * @example * need test in browser * * let bb = new Blob([new Uint8Array([66, 97, 115])]) * console.log(isblob(bb...
true
2c625428aa93aad9ef65493d878974950b1ad41a
JavaScript
Balwin123/remove
/js/script.js
UTF-8
838
2.9375
3
[]
no_license
const hello= document.querySelector('.hello'); const add= document.querySelector('#add'); const remove= document.querySelector('#remove'); const toggle= document.querySelector('#toggle'); const check= document.querySelector('#check'); const addAll= document.querySelector('#addAll'); const removeAll= document.querySele...
true
63dc3bde269bc89a29f8f1d9079677df947c543e
JavaScript
TimothyGu/encrypted-data-element
/index.js
UTF-8
2,624
2.78125
3
[ "MIT" ]
permissive
class EncryptedDataElement extends HTMLElement { constructor() { super(); this._observer = null; this._inert = false; } _observerCallback(mutations) { for (const { addedNodes } of mutations) { for (const added of addedNodes) { if (added.localName === 'script' && added.type === 'ciph...
true
d4e1326550585e87562c4ccc731f74ec95b27968
JavaScript
hcs847/employee-cms
/lib/inquirerQuestions.js
UTF-8
3,210
3
3
[ "ISC" ]
permissive
const pool = require("../db/database"); const { sqlSelectEmp, sqlDep } = require("../db/queries"); const choices = [ "View All Departments", "View All Roles", "View All Employees", "Add A Department", "Add A Role", "Add An Employee", "Update An Employee Role", "Remove an employee", "Exit The Applicat...
true
bff53333d35ea9afa9860404001cd9fcbefe353b
JavaScript
alijemel/School4YouApp
/school4you_2.0/src/main/newFrontend/src/api/TodoDataService.js
UTF-8
1,308
2.515625
3
[]
no_license
import axios from 'axios' import AuthenticationService from '../Components/todo/AuthenticationService' import {API_URL, URL_APP} from './Constants' class TodoDataService { retrieveAllTodos(username) { let user = 'user' let password = 'password' //encoding auth header USINT BTOA JS ...
true
8c3c29418998c39d84acb5c947ef901f2abec3dc
JavaScript
bradleywb/venobox-demo
/js/modal-magic.js
UTF-8
758
2.65625
3
[]
no_license
(function ($){ 'use strict'; var Modal = function (element, options){ var _ = this; var defaults = {}; _.element = element; _.id = element.id; _.settings = $.extend({}, defaults, options, true); return _; }; Modal.prototype.init = function (){ var _ = this; _.modal = $(_.element).venobox(_.sett...
true
ad718b099a3a918e60e096bf1f247eb0c5b0a830
JavaScript
williansibertino/App-Orcamentos-ReactNative
/App.VersaoAntiga.js
UTF-8
6,768
2.546875
3
[]
no_license
import * as React from 'react'; import { Text, View, StyleSheet, ScrollView } from 'react-native'; import Constants from 'expo-constants'; import { Button, TextInput } from 'react-native-paper'; export default class App extends React.Component { // Variaveis Estaticas state = { // Primeiro Bloco quantCol...
true
1de5caf663dad2c67f7a3717e2dd07bffb9baa8f
JavaScript
1847123212/cdbus_gui
/html/plot_zoom.js
UTF-8
8,308
2.515625
3
[ "MIT" ]
permissive
/* * Software License Agreement (MIT License) * * Author: Duke Fong <d@d-l.io> */ let shift_key = false; let ctrl_key = false; window.addEventListener('keydown', function(e) { if (e.keyCode == 16) shift_key = true; if (e.keyCode == 17) ctrl_key = true; }); window.addEventListener('keyup', ...
true
267215fb67106b9def0b6bd4800087297bf27fac
JavaScript
kcamia/pset-3
/src/change.js
UTF-8
1,222
3.5625
4
[]
no_license
const readlineSync = require("readline-sync"); const MIN = 0.01; const MAX = 0.99; const QUARTER = 25; const DIME = 10; const NICKEL = 5; const PENNY = 1; let input = Number(readlineSync.question("\nEnter a dollar amount: ")); let amount = input * 100; let remainderQuarter = amount % QUARTER; let minusRemainderQuar...
true
e282b69eccbdac6978d5e41faae5c146f77c342e
JavaScript
mozbatman/ciceksepeti-bitirme
/src/reducers/ProductReducer.js
UTF-8
5,301
2.578125
3
[]
no_license
import * as productActionTypes from "../actions/ProductActionTypes"; const initialState = { getProducts: false, products: null, getProductsError: null, getProduct: false, product: null, getProductError: null, createProduct: false, createdProduct: null, createProductError: null, ...
true
a012d5b023e447a3cba113d2d8fdc99b04b6dc8d
JavaScript
AdrianYordanov/Software-University
/JS-Fundamentals-September-2016/03. Data-Expressions-Statements-Exercises/Exercises/Rounding/Rounding.js
UTF-8
264
3.15625
3
[]
no_license
"use strict"; function rounding(array) { let [number, precision] = array.map(Number); let temp = Math.pow(10, precision); let result = Math.round(number * temp) / temp; console.log(result); } rounding(['3.1415926535897932384626433832795', '2']);
true
47e692134672d553b4a02020a750939df8bfe0b3
JavaScript
mercaditu/ERPWeb
/public/assets/global/plugins/components/components.js
UTF-8
804
2.625
3
[ "MIT" ]
permissive
$(document).ready(function(){ $.get('./getconfig',function(response){ var components = $.parseJSON(response); showcomponents(components); }); }); function showcomponents(components){ divComponents = document.getElementById("components"); var compCount = 0; var divRow; var li; var ul; components.K...
true
40efc96a10030225fb4722a481567ce89f6cd054
JavaScript
LeDinhQuoc24/C0120G1_Le_Dinh_Quoc
/C0120G1/Module1/6-Hàm/Bài đọc/Demo hàm/script.js
UTF-8
245
3.640625
4
[]
no_license
function square(number){ let result=number*number; return result; } function calculate() { let input=document.getElementById("input").value; let result=square(input); document.getElementById("result").innerHTML=result; }
true
755b06ab0349220682d00b7df715ba416e3d63b2
JavaScript
shujer/javascript-impl
/call/apply.js
UTF-8
476
2.875
3
[]
no_license
var _globalThis = this; Function.prototype.myApply = function (ctx, args) { let context = ctx || _globalThis; if (typeof context !== "function" && typeof context !== "object") { context = Object(context); } const fnKey = Symbol("fn"); context[fnKey] = this; const result = context[fnKey](...args); del...
true
3adbe4c239f314e71dda35e80b61aac15be2a695
JavaScript
TOMO-YOSHI/coding-exercise
/CodeSignal/areFollowingPatterns.js
UTF-8
1,034
3.265625
3
[]
no_license
function areFollowingPatterns(strings, patterns) { const hash = {} for (let i = 0; i < strings.length; i++) { if (!hash[patterns[i]]) { hash[patterns[i]] = strings[i] } else { if (hash[patterns[i]] !== strings[i]) return false } } const checkerArr = [] ...
true
14c2673865cd7553be69e17e213208d59a5bf1e1
JavaScript
Alioth1017/gods-pen-server
/app/extend/context.js
UTF-8
648
2.703125
3
[ "MIT" ]
permissive
class ERROR extends Error { constructor ({ code, status, msg, error }) { super(msg) this.code = code || 500 this.status = status || 200 this.msg = msg || '服务器异常,请稍后重试' this.error = error } } module.exports = { /** * 获取一个错误对象 * @param {string} code code码 * @param {string} status 状态值 ...
true
45ef5ca04cd17eec510c501e4204660bdcd394f1
JavaScript
bleelabs/elixir_react_render
/priv/client.js
UTF-8
1,027
2.765625
3
[ "MIT" ]
permissive
const React = require('react') const ReactDOM = require('react-dom') /** * Hydrates react components that had HTML created from server. * Looks for divs with 'data-rendered' attributes. Gets component * name from the 'data-component' attribute and props from the * 'data-props' attribute. * @param {Function} compo...
true
0a4e0de528dbdbb5ef12b0285600e952f5f1fd0c
JavaScript
MeadowGreen/Unit_2_Project
/case2/hg_report.js
UTF-8
1,833
2.890625
3
[]
no_license
"use strict"; /* New Perspectives on HTML5 and CSS3, 7th Edition Tutorial 10 Case Problem 2 Author: Meadow Green Date: 2-3-20 Filename: hg_report.js */ //adds the title of the game and the other attributes var gameReport = "<h1>" + itemTitle + "</h1><h2>By:" + itemManufacturer + "</h2><img s...
true
80ebcb21cc4c2f378387e59ab7390a06bf57ab8f
JavaScript
chris510/Coding-Problems
/javascript/leetcode/easy/704_binary_search.js
UTF-8
2,177
4.8125
5
[]
no_license
// Given a sorted (in ascending order) integer array nums of n elements and a target value, write a function to search target in nums. If target exists, then return its index, otherwise return -1. // Example 1: // Input: nums = [-1,0,3,5,9,12], target = 9 // Output: 4 // Explanation: 9 exists in nums and its index i...
true
f180cbac775c7352b70935c0f90e67829e141efd
JavaScript
89leon/js
/es6/defaultFunctionArguments.js
UTF-8
385
2.828125
3
[]
no_license
function makeAjaxRequest(url,method = 'GET') { return method; //logic to make the request } makeAjaxRequest('google.com'); makeAjaxRequest('google.com', 'POST'); // function User(id){ this.id = id; } function generateID(){ return Math.random() * 99999; } function createAdminUser(user = new User(generateID...
true
8c1e6e9ebaf62bd78ed2e772fa2bf1bbf1a7e48c
JavaScript
diegofaria/vendi
/core/usecases/save_transaction.js
UTF-8
826
2.703125
3
[]
no_license
function SaveTransaction(transactionGateway, saveTransactionPresenter){ this.transactionGateway = transactionGateway this.saveTransactionPresenter = saveTransactionPresenter this.requiredFields = ['who', 'howMany', 'howMuch'] } SaveTransaction.prototype.execute = function(transaction){ for (var i = 0; ...
true
3c880a7e2e6e99866a9dd66a42d606740b99dba9
JavaScript
billmeta/ordering
/orderingapp-endpoints/orderingapp-endpoints-web/target/orderingapp-endpoints-web-1.0-SNAPSHOT/app/app.routes.js
UTF-8
4,766
2.65625
3
[]
no_license
// - routing for our top-level, shell page // - We could put this code into app.js but we've separated it into separate JS files to make it cleaner // - Javascript immediate execution - define function and immediately execute it // - Use angular's ui.router module's $urlRouterProvider / $stateProvider to // # App Rou...
true
324d268815f02c573b63c4459f308f45888badec
JavaScript
jignesh-techvasu/mbtiles-server
/server.js
UTF-8
1,660
2.59375
3
[ "MIT" ]
permissive
var express = require('express'), app = express(), MBTiles = require('mbtiles'), p = require('path'); // path to the mbtiles; default is the server.js directory var tilesDir = __dirname + '/mbtiles'; // Set return header function getContentType(t) { var header = {}; // CORS header['Access-...
true
cf1b9befd554124117da524388225c59bba22af8
JavaScript
D3m0nC0d3r/JavaScript-zero-to-hero
/Day_2/assignment.js
UTF-8
467
4.34375
4
[]
no_license
// Create a array with 10 numbers and print only the even numbers with a loop from that array let nums = [77,48,56,21,39,67,13,24,5,48]; for(let i=0; i<10; i++){ if(nums[i]%2==0){ console.log(`even nums: ${nums[i]}`); } } // Create a array with five city names and print it in reverse orde...
true
7775797dac873a8f33d54b19380e75a11ee49d8e
JavaScript
aprofetb/jquery.stateButton
/jquery.stateButton.js
UTF-8
3,977
2.8125
3
[ "MIT" ]
permissive
/*! * jQuery.stateButton: jQuery State Button v1.0.0.20180223 * https://github.com/aprofetb/jquery.stateButton * * @requires jQuery v1.2 or above */ (function($) { "use strict"; $.fn.stateButton = function(options) { function getSettings($button) { return $button.data('stateButton.se...
true
94d63321fd3871d673cce391fc882f11f78e85d0
JavaScript
cheng-long123/bigevent
/assets/js/index.js
UTF-8
1,988
2.65625
3
[]
no_license
// 入口函数 $(function () { //注册退出的点击事件 $('.layui-nav-item #quit').on('click', function () { layer.confirm('确定要退出吗', { btn: ['确定', '取消'] //按钮 }, function () { localStorage.removeItem('token'); location.href = '/login.html' layer.msg('退出成功'); ...
true
e6b9d97e31349f46c46b315e0ca15d8a1c83345a
JavaScript
vinothharirao/ProjectEuler
/017.js
UTF-8
1,327
4.59375
5
[]
no_license
//f all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letters would be used? var noOfLetters = 0; //convert all numbers to letters and find out length.Sum it up. for(var i=1;i<=999;i++) { noOfLetters += numberToText(i).length; } //for onethousand add 11. console.log(noOfLetter...
true
970bc300d9fe49c1a099d3512515d5adf0bf8730
JavaScript
wangping1408/webApp-demo
/work/day20(适配)/server/index.js
UTF-8
492
2.59375
3
[]
no_license
const http = require('http') const jade = require('jade') const hostname = '127.0.0.1' const port = 3000 //{title:"damu"} 通过node来访问数据库 获取到数据库中的数据 let html = jade.renderFile('index.jade',{title:"damu"}); const server = http.createServer((req, res) => { res.statusCode = 200 res.setHeader('Content-Type', 'text...
true
7e3ccb5247d7cb200e3b41f9fa795afd5ab670ce
JavaScript
PhiHung99/A0720i1-NguyenPhiHung
/Module 1/B8B9_CauTrucDieuKien/Bai_Tap/LuyenTapCauTrucDieuKien1/B3_checknumber/number.js
UTF-8
167
2.78125
3
[]
no_license
let check = parseInt(prompt('Nhập vào số cần kiểm tra:')) if (check > 0){ alert('Đây là số lớn hơn 0') } else alert('Đây là số bé hơn 0');
true
991aca94e5cac8837264dffa14f4d9670cbfc1aa
JavaScript
locnt9889/inhanh-service
/models/personModel.js
UTF-8
907
2.546875
3
[]
no_license
/** * Created by locnt9889 on 12/25/2014. */ var moment = require('moment'); var constant = require('../public/constant'); function Person(fullname,email,active,datecreate){ this.fullname = ""; this.email = ""; this.datecreate = moment().format(constant.formatTime); this.active = true; if(fulln...
true
4eb39ed0bd91a2871507f936caf05f213ed46cfa
JavaScript
MagicFox/MiniAppFrame
/common/model/ApiResult.js
UTF-8
1,261
2.609375
3
[]
no_license
/** * 不同服务器返回不同参数的处理 */ class ApiResult{ constructor(){ this._init(); } _init(){ this.projectName = ''; this.exceptionMsg = ''; this.response = {}; } initData(options, projectName,exceptionMsg) { this.projectName = projectName || ''; this.exceptionMsg = exceptionMsg; this.resp...
true
9246d0954f1d6a4bf9ce7eec017a950ccf6db294
JavaScript
kllrjatt/react-components
/app.js
UTF-8
876
2.953125
3
[]
no_license
class ShoppingListItem extends React.Component { constructor(props) { super(props); this.state = { done: false }; } onClick() { if (this.state.done) { this.setState({ done: false }); } else { this.setState({ done: true }); } } render() { ...
true
45eb8ef521a41d071c2095c74285105c4d648c80
JavaScript
neonorigami/zenbunny
/src/EventHandler.js
UTF-8
630
2.5625
3
[]
no_license
var EventHandler = function(channel, handler){ this.channel = channel; this.handler = handler; } EventHandler.Channels = { } EventHandler.addToChannel = function(channel, handler){ if(!EventHandler.Channels[channel]){ EventHandler.Channels[channel] = []; } EventHandler.Channels[channel].p...
true
3558ec3f80301b100dbe160f3b3cc01db70dd755
JavaScript
xgcyjd2016/webProject
/js/main/login.js
UTF-8
2,659
2.671875
3
[]
no_license
//Get the DOM node let stu = document.querySelector('#loginInputstudentID') let pas = document.querySelector('#loginInputPassword') let checkbox = document.querySelector('#loginChecked') //Regular expression let pasCheck = /\S/ let stuCheck = /^\d{8}$/ //Manually triggering an event let blurfuc = new Event('blu...
true
f9abe6edebd9857cb883f9077e1f68f2ae9b9513
JavaScript
sebatmohamed/quotesOnDev
/themes/quotes/js/api.js
UTF-8
1,906
2.578125
3
[]
no_license
(function($){ $('#quote-button').on('click', function(event) { event.preventDefault() let usedNum = []; $.ajax({ method: 'GET', url: qod_data.root_url + '/wp-json/quotes/v1/post' }).done(function(data){ const randNum = Math.floor(Math.random(...
true
9194fa6c1e9b71c07c753e6ea030a29951139644
JavaScript
balaram59-work/RxJS-Playground
/real-time/custom.js
UTF-8
7,830
2.671875
3
[ "MIT" ]
permissive
;(function(){ 'use strict'; var fromEvent = Rx.Observable.fromEvent; var updatesOverTime = []; var width = 960, height = 600, margins = { top: 20, bottom: 50, left: 70, right: 20 }; var svgElement = d3.select('svg') .attr('width', width ) .attr('height', height + 200 ); var xRan...
true
dda220dc606d3316912b38c448ca19e14e81c379
JavaScript
Samuraib0y/timerTz
/timer/src/Timer Application/Timer App.jsx
UTF-8
1,420
2.5625
3
[]
no_license
import React, {useState} from "react"; import TimerDisplay from "./Display/TimerDisplay"; import TimerButtons from "./TimerButtons/TimerButtons"; import t from './TimerApp.module.css' const TimerApp = () => { const [time, setTime] = useState({h:0, m:0, s:0, ms:0}) const [interv, setInterv] = useState(); ...
true
4ab00e376c6208bef2004f2117b6553a9f8218b5
JavaScript
vuejsprojects/play
/public/src/images.js
UTF-8
759
2.734375
3
[]
no_license
import { IMAGES } from './settings.js'; const loadImage = function (img) { return new Promise(resolve => { const image = new Image(); image.setAttribute('id', img.id) image.addEventListener('load', () => { resolve(image); }); image.src = img.src; }); } co...
true
0a1074669619f57d78e7ab4323afa22c3f3469e5
JavaScript
Sollunad/StudiCircle
/Server/Student/passwordCheck.js
UTF-8
1,213
2.8125
3
[]
no_license
const constant = require('./constants'); const crypto = require('crypto'); module.exports = { passwordIsCompliant: function (password) { if (password.length < constant.PASS_MIN_LENGTH || password.length > constant.PASS_MAX_LENGTH) { return false; } const regex = /^[(\w+\d+äüöÄÖ...
true
baa94c43876b8b27cc3905bfadc2a933b7267d91
JavaScript
sung0513/food_order_2020
/src/App.js
UTF-8
1,081
2.703125
3
[]
no_license
import React from "react"; function Food( name, pictrue) { return ( <div> <h2>주문 리스트 확인</h2> <img src={pictrue} alt={name} /> </div> ) } //component의 재사용성 const foodIlike = [ { id:1, name:"치킨", image: "http://www.momstouch.co.kr/data/shopimages/xboard/menu/2017082552772...
true
710adee810230ea7b739187d98b104c455ab85f7
JavaScript
vallauri-ict/tpsi-playground-raccaPaolo
/4_036_GPS/index.js
UTF-8
1,124
2.8125
3
[]
no_license
"use strict" $(document).ready(function(){ let _wrapper = $("#wrapper")[0]; // js let _coordinate = $("#coordinate") if(!navigator.geolocation) { alert("il dispositivo in uso non è HTML5 e non supporta la geolocation") return } let gpsOptions = { enableHighAccuracy: false, timeout: 5000, maxi...
true
ff4219d4315965854de7042c7b46a62d31bad6fb
JavaScript
robertbarron/circle-loader
/js/behavior.js
UTF-8
565
3.125
3
[]
no_license
(function () { var counter = 100, MAX_INTERVAL = 5000; var waitForIt = function () { counter+=100; if (counter >= MAX_INTERVAL) { document.getElementById('appcircle').innerHTML=""; document.getElementById('timer').innerHTML= '<div id="content-loaded">Loaded Content!</div>'; } else { text...
true
e1582792f139a5633182a7f2f1a2bbfcef1839db
JavaScript
Belovedad/info2180-lab4
/maze.js
UTF-8
1,184
3.203125
3
[]
no_license
// JavaScript Document window.onload = starter; var nohit = true; function starter(){ document.getElementById("start").addEventListener("click",main); } function main(){ var bs = document.querySelectorAll(".boundary"); for(var x= 0; x < bs.length; x++){ bs[x].addEventListener("mouseover", fail); } document.getE...
true
0ca1510d7d012944134f7a1c017ae275d761a5bb
JavaScript
LucianoRamos06/curso_js
/exercicios-js/funcao/callback1.js
UTF-8
238
3.46875
3
[]
no_license
const fabricantes = ['Mercedes', 'BMW', 'Gol'] function imprimir(nome, indice) { console.log(`${indice + 1}. ${nome}`) } fabricantes.forEach(imprimir) fabricantes.forEach((valor, indice, vetor) => console.log(valor, indice, vetor))
true
f8d6244c4fc6560a1956daebb029f41c2825c1c0
JavaScript
kamilanagorska/projektowanie-serwisow-www-nagorska-185ic
/Laboratorium4/scripts/main.js
UTF-8
9,045
3.046875
3
[]
no_license
/*czcionka*/ WebFont.load({ google: { families: ['Orbitron'] } }); /*nasz canvas*/ const canvas = document.getElementById('canvas1'); /*tworzy obiekt CanvasRenderignContext2D reprezentujący dwuwymiarowy kontekst renderowania*/ const ctx = canvas.getContext('2d'); /*wymiary canvas*/ canvas.width = 600; ...
true
7b599776fc547e2a7a1c34645b8a9acdba969cee
JavaScript
MykelAlexander088/discord.js
/examples/status.js
UTF-8
803
3.109375
3
[ "Apache-2.0" ]
permissive
/* * A bot that doesn't interact with Discord, but instead shows how to listen * to the "ready" and "disconnected" events, that are triggered when the bot * starts up or shuts down, respectively. */ var Discord = require( "../" ); var myBot = new Discord.Client(); myBot.login( "hello@example.com", "password1" ); ...
true
2c82c2d690e1deeb67502389124c972f54ccf5f3
JavaScript
WinkingWu/shop_html
/js/product.js
UTF-8
523
2.9375
3
[]
no_license
//获取产品的数据,再传到产品详情的本地存储 $(function () { function Setproduct () { var imgsrc = "" ; var proname = "" ; var price = "" ; $(".pro_list li").click(function(){ imgsrc = $(this).find("img").attr("src");console.log(imgsrc); proname = $(this).find("span").text();console.log(proname); price = $(this).find("b")....
true
22cca03c444196a8f20fa1abcfe6932d43c0995a
JavaScript
VikTs/Poll
/src/component/redux/question-reducer.js
UTF-8
3,448
2.953125
3
[]
no_license
import { Input, Select, Radio, Checkbox } from '../AnswerInputForms/AnswerInputForms' const VALIDATE_ALL_INPUT = 'VALIDATE-ALL-INPUT'; const SET_AGREE = 'SET-AGREE'; let initialState = { pollQuestions: [ { question: `The rigid, outermost shell of a terrestrial-type planet, or natural sa...
true
4fee78a1fb11cf2fa2ec27ef835f3cfcc96180ef
JavaScript
Aeee90/node
/webpack_test/model/user.js
UTF-8
322
2.78125
3
[]
no_license
export default class { constructor(id, username, email){ this.id = id; this.username = username; this.email = email; } getUsername(){ return this.username; } getName(){ return this.name; } getEmail(){ return this.eamil; } ...
true
4aa4c66fca1708cff7b7e9528a41a0c38bf51ded
JavaScript
zaidalasfar97/test
/app.js
UTF-8
4,972
3.046875
3
[]
no_license
'use strict'; var operationHour = ['6am', '7am', '8am', '9am', '10am', '11am', '12pm', '1pm', '2pm', '3pm', '4pm', '5pm', '6pm', '7pm', '8pm']; function randomNumber(min, max) { return Math.floor(Math.random() * (max - min + 1) + min); } var shops = []; function CookiesShop(name, minCustmoer, maxCustmoer, avgCu...
true
95b864046bb1efa4183207c91b4d39c0c9df1a3c
JavaScript
ikenticus/blogcode
/js/tasks/codecademy1a.js
UTF-8
1,313
2.953125
3
[]
no_license
let _ = require('lodash'); let request = require('request'); const url = 'https://gist.githubusercontent.com/zach-karat/dd26fe2387c1f687f655abcca1d688d7/raw/b38f34e31ecd9fd4c3a870722ef321d7d16ef54e/gistfile1.txt' let dict = {}; request.get(url, (err, res, body) => { _.forEach(body.split('\n'), (b) => { if (!dic...
true
e7276c95c601bf2448099c333fedb6abf993eda0
JavaScript
prateekjoshi2013/fullstackopen2019-part4
/utils/list_helper.js
UTF-8
926
2.890625
3
[]
no_license
const _=require('lodash') const dummy = (blogs) => { return 1; } const totalLikes=(blogs)=>{ const total=blogs.map(blog=> blog.likes).reduce((sum,curr)=>sum+curr) return total } const favoriteBlog=(blogs)=>{ return blogs.reduce((max,curr)=>max.likes<curr.likes?curr:max) } const mo...
true
b67d61d186964bf4412fcb0a7e1faf3ce524bb35
JavaScript
adrien-cuisse/totocar
/backoffice/src/Component/common/Pagination.jsx
UTF-8
849
2.640625
3
[ "Apache-2.0" ]
permissive
import React from 'react'; import { Link } from 'react-router-dom'; /** * Pagination links * * @param {int} current - the current page * @param {int} count - the number of pages * @param {string} url - the url to paginate for */ const Pagination = ({ current, count, url }) => { const renderLinks = () => { ...
true
b1ca9ff37b1b17d0564b987b4f63dc8328a113be
JavaScript
hisptz/scorecard-app
/packages/shared/src/components/ScorecardView/components/ScorecardTable/Components/TableCellAnalysis/Components/TableAnalysis/Components/helper/get-table-rows-or-columns-array.helper.js
UTF-8
4,190
2.546875
3
[ "BSD-3-Clause" ]
permissive
import { range, each, map, reduce, slice, join, flatten, last } from "lodash"; export function getTableRowsOrColumnsArray(dataItemsArray, dimension) { let flatDataItemsArray = []; each(range(dataItemsArray.length), (dataItemArrayIndex) => { if (flatDataItemsArray.length === 0) { if (dimension === "row") ...
true
cef8c5aea78834b89b0c7449ec7596bd2158a467
JavaScript
perryyo/este
/hooks/useKeyArrows.js
UTF-8
2,220
2.765625
3
[ "MIT" ]
permissive
// @flow import { useMemo, useState, useEffect } from 'react'; // TODO: Reimplement the rest of the withRovingTabIndex. // This approach seems to be the most unobtrusive. // https://developer.mozilla.org/en-US/docs/Web/Accessibility/Keyboard-navigable_JavaScript_widgets function setTabIndexes(focusables, focused) { ...
true
6c6f1c44201b087d39eabb3bfdca17502c170904
JavaScript
NityanandaBarbosa/Estudo-Js
/js/Seção3/string.js
UTF-8
583
3.59375
4
[]
no_license
const nome = "Nityananda" console.log("Letra : " + nome.charAt(0)) //mostra o caractere de uma posição console.log("Letra : " + nome.charAt(12)) //Quando o carectere escolhido está fora do range a saida é nada console.log("Letra (" +nome.charAt(1) +") no código UTF-16 : " + nome.charCodeAt(1)) console.log(nome.indexOf...
true
d506606dbd3686b8dc2b7d577959974e84407568
JavaScript
mbajoshuac/sauce-kitchen
/models/usersModel.js
UTF-8
2,168
2.578125
3
[]
no_license
const { Schema, model } = require('mongoose') const jwt = require('jsonwebtoken') const validator = require('validator') var bcrypt = require('bcryptjs'); const userSchema = new Schema({ firstName: { type: String, trim: true, required: [true, " Firstname is Required"], minlength: [3...
true
d4266571cd370099660ff28b373d8475bdae0a59
JavaScript
cyhgrammar/WebKeshe
/keshe/wage/static/js/CheckAll.js
UTF-8
938
2.8125
3
[ "MIT" ]
permissive
//全选或全不选 function selectAll() { var items = document.getElementsByName("checkItem"); var checkAll = document.getElementById("checkAll"); var checkOther = document.getElementById("checkOther"); checkOther.checked = false; ...
true
6f795c8b80596bf5b09a1126e65ed0daf7e7649d
JavaScript
dziarybadev/interview-questions
/index.js
UTF-8
4,251
3.6875
4
[]
no_license
// 1 console.log('abc' - 3); // NaN console.log('abc' - 'ab'); // NaN console.log('abc' + 'ed'); // 'abced' console.log('12' + 3); // '123' console.log('12' - 3); // 9 // 2 console.log(2 == '2'); // true console.log(12 === '12'); // false console.log(null == undefined); // true console.log(NaN === NaN); // false cons...
true
a8b2c0d64ef2746f61c7f44fe015ded3bab54185
JavaScript
totallylegitgames/TLB
/tlb.js
UTF-8
5,113
2.703125
3
[]
no_license
const Discord = require('discord.js'); const bot = new Discord.Client(); new Discord.RichEmbed(); const newUsers = new Discord.Collection(); const config = require("./config.json") //const guildMember = message.member; bot.on('ready', () => { bot.user.setActivity('Being Legit~') }) bot.on('ready', () =...
true
961e71dab9aa623a43c250a8d3d948a7ac82bd31
JavaScript
samuelbarrett/sudoku
/SudokuBoard.js
UTF-8
2,391
3.515625
4
[]
no_license
// Samuel Barrett, 2021/08/28 // // Defines a game board for Sudoku. Allows for examination of columns, rows and boxes using Set objects. // - board is expected to be a 2D array of size 9 by 9. "use strict" class SudokuBoard { constructor(board) { if(arguments.length == 1) { this._board = board } else { ...
true
d84da95592e9e1deb8bdc7d7dd94df2aff47e071
JavaScript
j113203/j113203.github.io
/js/ui/datetime.js
UTF-8
2,002
2.671875
3
[]
no_license
function datetime(e){ this.e = e; $('<ui id="datetime" class=""><div><div><p id="time"></p><p id="date"></p></div><rss></rss></div></ui>').appendTo("body") this.update = function(){ var a = new Date(); this.updateTime(); $(this.e+">div>div>p#date").text([ "Sunday" , "Monday" , "Tuesday" , "Wednesday" , "Thursd...
true
2e7758e5b112fc5fed3f037ab1b8f1eae5aa7ae4
JavaScript
David-Luque/starter-app
/start-app-client/src/components/tasks/EditTask.js
UTF-8
1,446
2.578125
3
[]
no_license
import React, { Component } from 'react'; import TaskService from "../Services/tasks-service"; class editTask extends Component { state = { title: this.props.taskInfo.title, description: this.props.taskInfo.description, isCompleted: this.props.taskInfo.isCompleted }; service = new ...
true
0c91788892d7a85dc0b11fbaee64b0744c233721
JavaScript
chyingp/blog
/demo/2017.04.25-react/02-react-redux/App.js
UTF-8
540
2.71875
3
[]
no_license
import React from 'react'; import { queryItems } from './actions'; class App extends React.Component { constructor (props) { super(props); this.state = this.props.store.getState(); } componentDidMount () { let { store } = this.props; store.subscribe(() => this.setState(store.getState())); let items...
true
4c0c08e9635494c427fe616237ea5e2dd40e9dfd
JavaScript
zhouwenbin/canvas-1
/animation/js/light.js
UTF-8
283
3
3
[]
no_license
function Light(x,y,z,brightness){ this.x=(x===undefined)?-100:x; this.y=(y===undefined)?-100:y; this.z=(z===undefined)?-100:z; this.brightness=(brightness===undefined)?1:brightness; } Light.prototype.setBrightness=function(b){ this.brightness=Math.min(Math.max(b,0),1); };
true
9d5f27266b9e8afc860c77f2f8ece70cbf9274d6
JavaScript
ashouy/react-examples2
/src/components/example2/userForm/UserForm.js
UTF-8
1,797
2.71875
3
[]
no_license
import React, { Fragment, useRef, useState } from "react"; import Button from "../UI/Button"; import Card from "../UI/Card"; import ErrorModal from "../UI/ErrorModal"; import classes from "./UserForm.module.css"; const UserForm = (props) => { const usernameRef = useRef(); const ageRef = useRef(); const [error, ...
true
606257c7a0ac524cddc7926c025900dbd8ce28d8
JavaScript
erikn775/tax_calculator
/src/components/TaxCalulator.js
UTF-8
1,352
2.5625
3
[]
no_license
import React, {useState, useEffect} from 'react'; import {Form, Button} from 'react-bootstrap'; import { connect } from 'react-redux'; import { addIncome } from '../actions/TaxActions' import DisplayTaxes from './DisplayTaxes'; class TaxCalculator extends React.Component { state = { income: 0, ta...
true
6cc3fb1acb13fe5f1e2e402a2455a088bb8bba28
JavaScript
gaabriel165/infinity-run
/infinity-run/personagem.js
UTF-8
2,594
3.0625
3
[]
no_license
var numSprites = 6; var spriteAtual = 1; var velocidade = 0; var xPersonagem = 100; var yPersonagem = 285; var xTamanhoPersonagem = 110; var yTamanhoPersonagem = 130; var podePular = false; var podeCair = false; var velocidadePulo = 3; var velocidadeQue...
true
409cb470f2d628afe51cd4a5f7b5768e31a28336
JavaScript
mkarinca/space-zombies
/js/player.js
UTF-8
525
2.546875
3
[]
no_license
class Player { constructor(id, name, avatar, weapon) { this.id = id; this.name = name; this.avatar = avatar; this.weapon = weapon; } generate = () => { return { id: this.id, name: this.name, avatar: `<img src="${this.avatar}" />`, health: 100, locat...
true
fe42005946e39ff2b028cffa5ad39243938c7dd7
JavaScript
foretold-app/foretold
/packages/guesstimator/src/samplers/Simulator.spec.js
UTF-8
1,072
2.671875
3
[ "MIT" ]
permissive
import { neededSamples } from './Simulator'; const n = 5000; describe('Simulator', () => { describe('#neededSamples', () => { const examples = [ [{ text: '3', inputs: {} }, 1], [{ text: 'foofunction([4,5,3])', inputs: { AK: [3], BA: [5] } }, 5000], [{ text: '3*AK*BA', inputs: { AK: [3, 4], BA...
true
e41519f4c267741772befd9da45239f939aeb20b
JavaScript
manarshaar/gsg-4
/script.js
UTF-8
3,478
3.15625
3
[]
no_license
let tasks = []; localStorage.setItem("tasks", JSON.stringify(tasks)); for (let i = 0; i < tasks.length; i++) { let tr = document.createElement("tr"); let td0 = document.createElement("td"); td0.className ='ntask'; let t = document.createTextNode(tasks[i]); td0.appendChild(t); tr.appendChild(td0);...
true
6df525c7876a971c10ac4fb8c91010117c56d3ed
JavaScript
EmberOfAsh/bc
/src/main/webapp/components/vue-components/src/components/photo-wrap-1/src/wrap1.js
UTF-8
4,197
2.796875
3
[ "MIT" ]
permissive
class Wrap1 { constructor() { this.documentHeight = $(document).height(); this.documentWidth = $(document).width(); } load(photo, callback) { let $wrap = this; let documentHeight = this.documentHeight, documentWidth = this.documentWidth; $('<img />').on('load', funct...
true
c8e5539112a28d977817a8df73217c24d4077294
JavaScript
harkibit/Aprum-frontend
/src/reducers/languageReducer.js
UTF-8
520
2.578125
3
[]
no_license
import { LANGUAGES_LOADED, LANGUAGES_LOADING } from "../actions/types"; const initialState = { isLoading: false, languages: [], }; const languageReducer = (state = initialState, action) => { switch (action.type) { case LANGUAGES_LOADING: return { ...state, isLoading: true, }; ...
true
748897e55b1166cc2479aa97082687c52c74fd80
JavaScript
RWOverdijk/stapes
/plugins/util/stapes-util.js
UTF-8
5,111
3.0625
3
[ "MIT" ]
permissive
(function() { var util = { "bind" : function(fn, ctx) { if (util.isObject(fn)) { // Bind all functions in this object to this object util.each(fn, function(fun, name) { if (util.typeOf(fun) === "function") { fn[name] = u...
true
486b55d9d5171c1028c597a7f5d03bd8b0165608
JavaScript
aminembarki/bidichecker
/src/highlightabletext.js
UTF-8
5,262
2.515625
3
[ "Apache-2.0" ]
permissive
// Copyright 2009 Google Inc. All Rights Reserved. // // 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 applicabl...
true
92d7bc4f3fe2e97404e056518868432c42bcddca
JavaScript
RonyL13/car-rental-project
/middleware/authMiddleware.js
UTF-8
2,066
2.640625
3
[]
no_license
const jwt = require('jsonwebtoken'); const customerModel = require('../models/customer') const Customer = customerModel.Customer; const authenticate = (req, res, next) => { const token = req.cookies.jwt; // Check if json web token exists and is verified if (token) { jwt.verify(token, 'rental proj...
true
40c64b8dd0833efe199e2bc299d0ce017b9c8d94
JavaScript
wanderlustlee/StrutsHiberateNBA
/WebContent/js/signin.js
UTF-8
4,836
3.375
3
[ "MIT" ]
permissive
// JavaScript Document /*鼠标在昵称文本框中时*/ function nickNameFocus(){ var nickName=document.getElementById("nickName"); var nickNameId=document.getElementById("nickName_prompt"); //email.className="register_input register_input_Focus"; nickNameId.innerHTML=""; //promptId.className="register_prompt"; } /*鼠标离开昵称文本框时*/...
true
37e8f097ffae9675b62d5362b5ddcfb7792cc49f
JavaScript
parmeet1402/hashtag-manager
/controllers.js
UTF-8
2,066
2.640625
3
[]
no_license
const functions = require("./functions"); const constants = require("./constants"); const helpers = require("./helpers"); const prompt = require("prompt-sync")({ sigint: true }); const handleGenerateHashtags = allHashtags => { const DEFAULT_NUMBER_OF_HASHTAGS = 30; const DEFAULT_POPULARITY_RATIO = "1:1:1"; cons...
true
e2936f49344701ca391c4d1d31a1fa639d6dd04d
JavaScript
keif/root-kata
/src/utility/driver.js
UTF-8
1,748
2.828125
3
[ "MIT" ]
permissive
import Driver from "../Driver"; import Trip from "../Trip"; const MIN_SPEED_MPH = 5; const MAX_SPEED_MPH = 100; const createDriverHash = fileData => { if (!fileData || fileData.length == 0) return {}; const data = fileData.split("\n"); return data.reduce(setDriverHash, {}); }; const getDriversRecordsOu...
true
22f36c54d719585be19e30ab80bef4df93bcead8
JavaScript
gregshap/D3-Chart-Directives
/Example/GroupedBarsApp.js
UTF-8
2,520
2.59375
3
[]
no_license
var Dash2App = angular.module('Dash2App', ['dash2.charts.groupedbar','dash2.charts.stackedbar','dash2.charts.stack2','dash2.charts.multiline']); Dash2App.controller('Dash2Ctrl',function Dash2Ctrl($scope,$http) { //Reformat from the web api format with items and junk, into arrays //This doesn't nee...
true
e120be8c9b1954854e1a9e173bf0c7104918631d
JavaScript
YihooIsMe/vue-book-myself
/html/内置指令/project/index.js
UTF-8
3,880
2.734375
3
[]
no_license
var app=new Vue({ el:"#app", data:{ list:[ { id:1, name:"iPhone 7", price:5000, count:1 }, { id:2, name:"iPad Pro", price:1000, count:1 }, ...
true
e4b166c0fca14f45a2d127310e99d33f517f3ef1
JavaScript
noikiy/server-php
/wapdev/js/myOrder.js
UTF-8
1,869
2.515625
3
[]
no_license
// JavaScript Document $(window).load(function(e){ $(".myOrder_header ul").css("width",374); $(".myOrder_header ul li").eq(0).css("border-bottom-color","#f44336"); //$(".o_list_cs").css("width",$(window).width()-135); }); /*$(window).ready(function(e) { //计算商品件数和总额 $(".order_list").each(function(index, ...
true
41b690f0233d1d709e13cadec104e107c1032a76
JavaScript
lunguster/Diana-Cupcake
/public/js/animateComanda.js
UTF-8
911
2.703125
3
[ "MIT" ]
permissive
/*$(function(){ var width =900; var animationSpeed = 1500; var pause =5000; var currentSlide= 1; var $slider= $('#slider1'); var $slideContainer= $slider.find('.slides1'); var $slides= $slideContainer.find('.slide1'); var interval; function startSlider(){ interval = setInt...
true
925208c21ddfc4172d4c908496b586f2f309bb40
JavaScript
kevinmsavsani/Werewolf
/src/components/Home/index.js
UTF-8
1,294
2.59375
3
[]
no_license
import React from 'react'; import "./style.css"; function Home() { return ( <div className="home"> <h1>Werewolf</h1> <hr /> <h2>Gameplay</h2> <hr /> <p>Each person is given a card, describing their role. </p> ...
true
63e8777cae801860529c600e00ff24a5c64988e3
JavaScript
ywc2016/behaviour_oneTimeNeed
/web/js/table.js
UTF-8
1,483
2.78125
3
[]
no_license
// JavaScript Document function selectChangeColor(obj) { if(obj.checked) { obj.parentNode.parentNode.className="selectBgColor"; } else { obj.parentNode.parentNode.className="noBgColor"; } } function changeAllColor(eachName, allId) { var obj = document.getElementById(allId); var objs = document.getElementsB...
true
a832b9199f44ec826d8f40d6eb9f05104b8cf85f
JavaScript
tassiaaccioly/javascript-learning
/javascript-01.js
UTF-8
1,014
4.21875
4
[]
no_license
//Given str1, see if words are included in the string const str1 = 'Web Dev is Amazing!'; console.log(str1.includes('development')); console.log(str1.includes('Development')); console.log(str1.includes('web')); console.log(str1.includes('ing')); console.log(str1.includes('Web')); //Print str2 and str3 together ...
true
7236e8ead8a1eddde12717f54595edeacb33fa35
JavaScript
akshatgarg12/GoldenRatio-Hack
/src/components/Sections/faces.jsx
UTF-8
1,281
2.96875
3
[]
no_license
import React,{useState} from 'react'; export default function FacesSection(){ const [clicked, onClick] = useState(false); function ClickHandler(){ onClick(true); } return <div> <h1 className="example-heading">The Geometry of <span>Faces</span></h1> <div className="example-div face-example"> ...
true
d36839519fada5c27d069d45f3439eb18a9a3352
JavaScript
annapurna-ramesh/react
/src/components/Authentication/request.js
UTF-8
1,208
2.515625
3
[]
no_license
import axios from 'axios'; function login(username,password) { console.log(username,password) axios({ method: 'post', url:'http://localhost:8000/auth/login/', data: { username: username, password: password }, contentType:'application/json', }).then(function (response) { return alert("Sign in su...
true
8dc408e0a84de9dbeed7c05ad80483fc487a5478
JavaScript
rue-elwahishi/warmUp
/warmUp17.js
UTF-8
1,679
4.03125
4
[]
no_license
// There is a special keyboard with all keys in a single row. // ​ // Given a string keyboard of length 26 indicating the layout of the keyboard (indexed from 0 to 25), initially your finger is at index 0. To type a character, you have to move your finger to the index of the desired character. The time taken to move yo...
true
18c47a340e7e1434666a995eb4b54cdfd55105e4
JavaScript
zjl1111127/Coding
/公司面试题/面试题/获取一个字母数组混合的字符串中最大的数字.js
UTF-8
416
3.125
3
[]
no_license
function solution(arr) { let max=-1; let tmp=0; for(let i = 0;i<arr.length;i++) { if(arr[i]>='0'&&arr[i]<='9') { let cur = parseInt(arr[i]); tmp*=10; tmp+=cur; if(max<tmp) max=tmp; } else ...
true
49fbb9e9709ac6b839e20874eb1c36c7d5ad17ab
JavaScript
arnoldpalar/dkatalis-parkinglot
/src/javascript/app/index.js
UTF-8
674
2.703125
3
[]
no_license
'use strict' const ParkingLot = require('./parking-lot'); const args = process.argv.slice(2); const commands = { create_parking_lot: nofSlots => { new ParkingLot(nofSlots, 2, 10, 10, './data.json'); }, park: carNumber => { new ParkingLot(6, 2, 10, 10, './data.json').park(carNumber); ...
true
f949196c2b9ae952f505b7104af3f460b0f9a299
JavaScript
napauladrs/conceitos-js
/funcoes.js
UTF-8
203
3.609375
4
[]
no_license
function soma(n1, n2) { return n1 + n2; } var resultado = soma(2,4) console.log(resultado) resultado = soma(2,3) console.log(resultado) document.getElementById("resultado").innerHTML = soma(4,7);
true
6c2b4ca076a6fe3a896c1745e63c758c2e0d017c
JavaScript
sparkfengbo/foxhuntd.github.io
/brush/shader.js
UTF-8
3,935
2.703125
3
[]
no_license
'use strict' var Shader = (function () { function Shader(vertexSource,fragmentSource) { this.vertexSource = vertexSource; this.fragmentSource = fragmentSource; this.uniformsMap = {}; this.attributeMap = {}; this.textures = {}; this.units = {}; t...
true
ccc17b5392894705cde26335b5342d19778a6d1c
JavaScript
OmPals/employee-bonus
/controllers/EmployeeController.js
UTF-8
959
2.65625
3
[]
no_license
const Employee = require('../models/Employee') const CreateEmployee = async function (req, res, next) { try { let emp = await Employee.create(req.body); res.status(201).json(emp) } catch(ex) { next(ex); } } const RemoveEmployee = async function(req, res, next) { ...
true
4ffe7ec1f4829a9ebae9fac1a7c330d9db7aa6e0
JavaScript
YinWincher/city-picker
/src/utils/isType.js
UTF-8
430
2.546875
3
[]
no_license
function isType(type){ return function(val){ return Object.prototype.toString.call(val) === `[object ${type}]`; }; } export const isArray = isType("Array"); export const isNull = isType("Null"); export const isUndefined = isType("Undefined"); export const isString = isType("Function"); export const isFu...
true