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
7150d05df1974f25930449a73cdaeeffb17fd6c5
JavaScript
JSouza27/trybe-projects
/Back-end development/project-27-cookmaster/middlewares/validation.js
UTF-8
1,395
2.8125
3
[]
no_license
const userModel = require('../models/userModel'); const message = { email: 'O email deve ter o formato email@mail.com', password: 'A senha deve ter pelo menos 6 caracteres', confirmPass: 'As senhas tem que ser iguais', firstName: 'O primeiro nome deve ter, no mínimo, 3 caracteres, sendo eles apenas letras', ...
true
6ea52a6402ce6ed51a467880e9265ec8dbc85ea2
JavaScript
austincunningham/fh-sync-server-client
/public/sync-client.js
UTF-8
1,479
2.609375
3
[]
no_license
/** * Created by acunningham on 12/06/17. */ var datasetId = "test1"; var valuePosted; function postIt(valuePosted){ console.log("What gets posted ? " + valuePosted.value); $fh.sync.doCreate(datasetId, valuePosted.value, function(res){ console.log("doCreate res :"+res) }, function(er...
true
5413af90ab5afa99f37dbc0275d915b7a8d5f48b
JavaScript
niuben/pure-funs
/lib/screen.js
UTF-8
1,321
3.015625
3
[]
no_license
 /* 返回鼠标在页面上的坐标 */ export function getPos() { var args = arguments; var e=args[0]; var pos = { x: 0, y: 0}; if (e.pageX || e.pageY) { pos.x = e.pageX; pos.y = e.pageY; } else { pos.x = e.clientX + document.body.scrollLeft - document.body.clientLeft, ...
true
876676e0603cb0e1ad2902918f29c9e91c9333ce
JavaScript
americanforest/reddit_responsiveness
/js/redditjson.js
UTF-8
2,947
2.96875
3
[]
no_license
$(function() { $('#domainform').on('submit', function(event) { //Upon submission of the domainform form event.preventDefault(); //Prevent reverting to default var currentime = parseFloat(Math.round((new Date()).getTime() / 1000)); //Current time in UNIX UTC as a float ...
true
cc2e183c67e5a71b8350e4a31ecccff61a1dd3e5
JavaScript
Sinoptik93/frontend-project-lvl1
/src/games/even.js
UTF-8
554
3.21875
3
[]
no_license
import gameEngine from '../index.js'; import getRandom from '../utils.js'; // CONFIGURATION // // Random integer counts. const min = 1; const max = 100; // Game "Even" const gameDescription = 'Answer "yes" if the number is even, otherwise answer "no".'; const generateData = () => { const question = getRandom(min, ...
true
2b8c7a2601c725529a444d46b97976aa4f11d65b
JavaScript
mwnachman/tag-widget
/src/helpers/helpers.js
UTF-8
401
2.765625
3
[]
no_license
export const createExistingTags = (tags) => { let storeTags = []; for (var i = 0; i < tags.length; i++) { storeTags.push({ "label": tags[i].label, "color": tags[i].color, "selected": false }) }; return storeTags; }; export const getTag = (state, label) => { for (var i = 0; i < state...
true
6492791227e4c5f5053dcb58f6f9f390348dff68
JavaScript
Bensigo/javascript-frontend-coding-interview
/array.js
UTF-8
364
3.65625
4
[]
no_license
/** * create a chucked array from count * e.g [1,2,3,4,5,6,7] of count 3 * return [[1,2,3], [4,6,6], [7]] */ function chuckedArray(arr, count){ const chuckedArr = []; let i = 0; while (i < arr.length){ chuckedArr.push(arr.slice(i, i + count)); i += count; } return chuckedArr; } ...
true
eabe87519f189733ef6a6601be1b89639fc6e11c
JavaScript
duxins/ppm-chrome-extension
/ppm.js
UTF-8
2,630
2.578125
3
[]
no_license
//天猫商城 var Tmall = (function(){ function init(cfg){ var skuMap = cfg.valItemInfo.skuMap; $( ".tb-prop" ).delegate( "li", "click", function() { var result; var data = []; $('.tb-selected').each(function(){ var value = $(this).data('value'); if (typeof(value) == 'string' && value.indexOf('-') ...
true
316802aa1f52c949c9c913a8c3ecff8db00a6853
JavaScript
HisShoes/UKElectionResultsSite
/controllers/electionController.js
UTF-8
2,377
2.828125
3
[]
no_license
var Election = require("../models/elections") //returns election data based on a request string passed in exports.getElectionData = function (req, res) { var searchRequest = parseElectionRequest(req.params.requestString); Election.find(searchRequest, { '_id': 0, 'topParties._id': 0, '__v':0}, function(err, el...
true
3c168e1006d8605edb7aa2a08e7a58bda3eeb9d1
JavaScript
TetrioX/2019-2020-PnOCW-team-1
/Out_of_order_Files/UnusedScript/methodOfNewton.js
UTF-8
3,908
2.75
3
[]
no_license
const { argv } = require('yargs') // command line arguments .count('verbose') .alias('v', 'verbose') const assert = require('assert') // asserting pre-conditions let nerdamer = require('nerdamer'); // cannot be const, nerdamer object is updated below require('nerdamer/Algebra.js'); re...
true
32dd084819f81994fc037f603fa4616babcc3430
JavaScript
liaoqinwei-study/react-study
/redux-study/src/redux/reducer-1.js
UTF-8
615
2.515625
3
[]
no_license
import {ADD_NUMBER, SUB_NUMBER, CHANGE_BANNER, CHANGE_RECOMMEND} from './constants' let initialStore = { counter: 0, banner: [], recommend: [] } let reducer = (state = initialStore, action) => { switch (action.type) { case ADD_NUMBER: return {...state, counter: state.counter + action.counter}; c...
true
2ba2fea9d0956f12167578d42e69e56b211900a2
JavaScript
MikeMalyar/war_of_space
/static/js/play.js
UTF-8
31,649
2.625
3
[]
no_license
let canvas = document.getElementById("myCanvas"); let ctx = canvas.getContext("2d"); let interval = 100; var ships = []; var shells = []; var static_objects = []; var moveable_objects = []; var weapons = []; var images = null; var map = null; var player = 0; var time = 0; var game_id = 0; var max_frags = 0; var curr_...
true
a427df6afcfb6759f4b4f1600e130dfee0524500
JavaScript
Ghaidaamoh/data-structures-and-algorithms
/challenge13/queue13.test.js
UTF-8
1,433
3.265625
3
[ "MIT" ]
permissive
'use strict'; const Stack=require('./stack-13') class Queue{ validate_brackets(val) { let string1 = new Stack(); for (let i = 0; i < val.length; i++) { let x = val[i]; if (x == '(' || x == '[' || x == '{') { string1.push(x); continue; ...
true
f698141f5d50fe0095b3ebbbd73516261125ed82
JavaScript
twipixel/study-js
/book/prototype/chap24/pointerxy.js
UTF-8
837
2.609375
3
[]
no_license
//----------------------------------------------------- // 마우스를 클릭한 X, Y 좌표 출력 //----------------------------------------------------- Event.observe(window, 'load', function() { Event.observe('likeSport', 'click', Show.positionXY); }); var Show = { positionXY: function(event) { var positionX = Event.poi...
true
6c761450795d13c1d82b1ea5f245da83364dbd43
JavaScript
Sofronijev/react-pomodoro-clock
/src/App.js
UTF-8
4,830
2.796875
3
[]
no_license
import React, { useState, useEffect, useRef } from 'react'; import TimerControl from './components/TimerControl' import Timer from './components/Timer' import ControlButtons from './components/ControlButtons' import sound from './sound/bell.mp3' import useInterval from './hooks/useInterval' function App() { const [b...
true
22178ed24fd966b7cf7e1aa36abd2e0dd0a292d7
JavaScript
BlackStone8960/CICCC_web_development_course
/Aug_2021/JavaScript_Exam/task1.js
UTF-8
1,320
4.09375
4
[]
no_license
// Result will be generated by inputting an argument in command line const factorialize = (num) => { let factorializedNum = 1; for (let i = 1; i <= num; i++) { factorializedNum *= i; } return factorializedNum; }; const countCombination = (str) => { let charObj = {}; let result = factoriali...
true
d085d5d2b6feb726b3c74e8847a06a653c697c46
JavaScript
jenkinsci/blueocean-plugin
/blueocean-core-js/src/js/security.js
UTF-8
1,042
2.546875
3
[ "MIT" ]
permissive
/** * Created by cmeyers on 9/16/16. */ import { AppConfig } from './config'; import { User } from './User'; /** * Returns a key of permissions functions that each return boolean to indicate authorization. * Usage: * permit(pipeline).create(); * * @param subject * @returns {{read: (function()), create: (...
true
f69a42b903a7bbc25daa1f627081f37dbfc9b3c5
JavaScript
sunwanxin213/TeaJs
/Src/Input/Media.js
UTF-8
3,703
2.796875
3
[]
no_license
/* 媒体设备 */ void function (TeaJs) { "use strict"; function MediaDevice(name, tagName, autoPlay, callInit) { /// <summary>媒体设备构造函数</summary> /// <param name="name" type="String">设备名称</param> /// <param name="tagName" type="String">标签名称</param> /// <param name="autoPlay" type=...
true
493c62a45063414cabd26c005c1c18f5652b6a30
JavaScript
brev/resume-generator-linkedin-api
/templates/pdf/skills.js
UTF-8
580
2.53125
3
[]
no_license
var cfg = require('./config'); exports.render = function(doc, data) { doc.moveUp(1); doc. fillColor(cfg.color.orange). font(cfg.font.boldface). fontSize(cfg.font.h3). text('Current Tech', cfg.column.two.start); var skills = []; for(i=0; i<data.skills.values.length; i++) { cur = data.skills...
true
4c5050665395e3c0f7f497cc8f4a9fdf69c710c1
JavaScript
BigDDawg/jsdevfeedr
/js/app.js
UTF-8
8,571
3.09375
3
[]
no_license
/* If you use your own feeds, they must have APIs with the following minimum requirements: - Each article must provide an image source for the circular thumbnail at the left of the article. - Must provide either a category, tag, or custom taxonomy to display below the title (of course title of article is also r...
true
2d223fd94ef75c92936f1920f33325d53e55f19e
JavaScript
vivekimsit/es6-data-structures
/test/pq.spec.js
UTF-8
1,391
2.703125
3
[ "MIT" ]
permissive
import {strictEqual as equal} from 'assert'; import {throws} from 'assert'; import {PQ} from '../src'; suite('Max PQ', () => { let q; beforeEach(function() { q = PQ.maxPQ(); }); test('without iterator', () => { equal(q.size(), 0); q.insert(3); q.insert(2); q.insert(5); equal(q.size(), 3); }...
true
ebd9f0b8451ebba6bb5827c5571be2285a7603fd
JavaScript
Karlar14/blogasaurus
/index.js
UTF-8
303
2.953125
3
[]
no_license
const onLoad = () => { console.log("I'm working !!"); const h1 = document.querySelector('h1'); h1.style.cursor = 'pointer'; h1.style.addEventListener( 'click', (event)=> { console.log (event); h1.style.color = 'purple'; }); } window.addEventListener("load" , onLoad);
true
28401dad7598fc57a064eac3592ef7bb2d4509a0
JavaScript
srgyCheese/fractals
/juia-set/canvas.js
UTF-8
1,613
3.4375
3
[]
no_license
import {Complex} from 'complex.js' window.Complex = Complex const canvas = document.getElementById("example") canvas.height = 1000 canvas.width = 1000 const centerX = canvas.width / 2 const centerY = canvas.height / 2 const ctx = canvas.getContext('2d') function drawCircle(x, y, radius = 1) { ctx.beginPath()...
true
a3758dc15a084b96251748c9a64de681617459c8
JavaScript
KamilMinikeev/Kuba
/js/main.js
UTF-8
2,004
2.515625
3
[]
no_license
$(function () { //slider $('.gallery__slider').slick({ prevArrow: '<button type="button" class="slick-prev"><img src="img/gallery/arrow-right.svg" alt=""></button>', nextArrow: '<button type="button" class="slick-next"><img src="img/gallery/arrow-left.svg" alt=""></button>', }); //...
true
94af822cecccae1f75cb073f814f6f7c10a41833
JavaScript
BenRichter/8tracks-BlacklistR
/8tracks_blacklistR/js/options.js
UTF-8
1,364
2.84375
3
[]
no_license
// var settings = new Store("settings", { // "sample_setting": "This is how you use Store.js to remember values" // }); var blacklist; var $list = $('ul'); //TODO: sort alphabetically loadList(); //init function loadList(){ chrome.storage.sync.get(['list'], function(result){ blacklist = result.list...
true
c1a04cf17ddcb57c86589b1fe9d61b205e44da62
JavaScript
ifxli/StudentProfilesTest
/src/components/StudentListItem.js
UTF-8
1,576
2.546875
3
[]
no_license
import { TagEditor } from './'; function StudentListItem(props) { var avg = 0; if (props.student.grades) { var sum = 0; for(var i = 0; i < props.student.grades.length; i++){ sum += parseInt(props.student.grades[i], 0); } avg = sum / props.student.grades.length; } return ( <li classNa...
true
a9cc0f64311ebf0ca39ffda0525029dc4ff16cc7
JavaScript
kether82/site---MP
/public/JS/listing.js
UTF-8
5,206
2.515625
3
[]
no_license
$(document).ready(function () { $("#edit-info").on('click', function () { $(".edit-container").show(); $(".page-darken").show(); $("#iName").val(""); $("#iDescription").val(""); }); $("#exit-edit").on('click', function () { $(".edit-container").hide(); $("...
true
ef6b78bb3d3c2a0f4ee337673ec4808e41db1df0
JavaScript
rehmpke/adulted
/assets/js/script/boldFont.js
UTF-8
357
3.03125
3
[]
no_license
// Replace all occurences of "--" (double hyphens) with "—" (long-em dash) (function() { var headingArray = document.querySelectorAll('h3.hero-slider__slider--slide-heading'); headingArray.forEach(function(element) { element.innerHTML = element.innerHTML.replace(/\*\*POWER\*\*/g, '<span class="typography__power...
true
6162766df9b6df3c3b4d0437b14a5ad52dc9bea4
JavaScript
xuebi2017/draw-board
/main.js
UTF-8
5,521
3.140625
3
[]
no_license
var canvas = document.getElementsByClassName('canvas')[0] var context = canvas.getContext('2d') //自动设置canvas大小 autoSetCanvasSize() //设置canvas背景颜色 setCanvasColor() //特性检测 if('ontouchstart' in document) { //监听触摸事件 listenToTouch() }else { //监听鼠标事件 listenToMouse() } //改变画笔颜色 changeBrushColor...
true
ac0f7619ed0c950b8394a48141907848a6f756f4
JavaScript
jdalefoskey/homeworkthree
/script.js
UTF-8
692
3.921875
4
[]
no_license
let generateBtn = document.querySelector("#generate"); //first click function to gather user criteria generateBtn.addEventListener("click", function(){ //set password length/complexity let complexity = prompt("How Many Character would you like?"); //possible password values let values = "ABCDEFGHIJKLMNOPQRSTUVWZYZ...
true
6ef8937363695a8c0dd853059f79f2e77d1796f6
JavaScript
stanchev89/JavaScript-exams-and-practice
/JS Fundamentals/examPreparation/bonusScoringSystem.js
UTF-8
639
3.453125
3
[]
no_license
function bonusScoringSystem(input) { let studentsCount = Number(input.shift()); let lecturesCount = Number(input.shift()); let bonus = Number(input.shift()); let maxBonus = 0; let maxAttend = 0; for (const data of input) { let curStudentAttend = Number(data); let curBonus = (curStudentAttend / lectu...
true
7192406976e9c280e6b20a02c2f3203b8b9c0186
JavaScript
Stugi/nodejs
/hw1/hw1.js
UTF-8
663
3
3
[]
no_license
let weights = [3,15,52,12,5]; console.log(anniguliruyEto(weights)); function anniguliruyEto(array){ if(array.length <=1){ return (array[0])?array[0]:0; } while(true){ let max1 = array[0], max2 = array[1], ind1 = 0, ind2 = 1; for(let i = 2; i<array.length; i++){ if(array[i]>max1){ if (max1...
true
56c169add6ac4f254a49030513f61cfbcc475d90
JavaScript
gumara-dev/thunderbird
/open_email_in_separate_window/popup.js
UTF-8
569
2.6875
3
[]
no_license
function loadMessage(tabId) { browser.messageDisplay.getDisplayedMessage(tabId).then( function(val) { document.getElementById('author').innerHTML = val.author; document.getElementById('subject').innerHTML = val.subject; document.getElementById('date').innerHTML = val.date; } ); }; async f...
true
3e46b0f82bcc6d800bec2d8680e22530483ad8d9
JavaScript
akilesh223/hungrybellies_v3
/fooddeliveryapp/src/Restaurant.js
UTF-8
7,325
2.609375
3
[]
no_license
import React, { Component } from 'react'; import Product from './Product'; import { Link } from 'react-router-dom'; import Products from './Products'; import { NavItem, NavLink } from 'reactstrap'; import Checkout from './Checkout'; import { Button } from 'reactstrap'; let items = [] // const products = [ // { ...
true
c714e3394c8c3ab29e1af1887c504d1013953203
JavaScript
emmarskillings/TinyApp
/TinyApp/express_server.js
UTF-8
7,328
2.796875
3
[]
no_license
var express = require("express"); var app = express(); var PORT = 8080; var bcrypt = require('bcryptjs'); var bodyParser = require("body-parser"); var cookieSession = require('cookie-session') app.use(cookieSession({ key: "user", secret: "SECret" })); app.use(bodyParser.urlencoded({ extended: true })); app.set...
true
fd69305c225d1f7ebaf883b31a55b68e429afed5
JavaScript
AAI-USZ/FixJS
/input/100+/after/db444614b27b05ece392c6d13092cb2dcbe78252_0_2.js
UTF-8
571
2.515625
3
[ "MIT" ]
permissive
function (reset) { var degreeCSS = "rotate(" + this.degrees + "deg)"; this.degrees += 2; this.$rotator.css({ "-webkit-transform": degreeCSS, "-moz-transform": degreeCSS, "-o-transform": degreeCSS }); if(this.degrees > 180) { this.$rotator.addClass('move'); ...
true
9fe488e28b4ab2a8937c32b711c0dd77b66aec8a
JavaScript
meganlee18/WDI-code-alongs
/code_alongs/01_javascript/control_flow/ex2.js
UTF-8
330
3.671875
4
[]
no_license
console.log ('loops'); for (var count = 10; count <= 20; count = count + 1) { console.log(count); } var count = 10; while (count <= 20) { console.log (count); count++ } //output 1 to 20 //for condition- //starting point //when do you stop //how to get there //for (condition) { // } //while (condition) ...
true
6d5ced4465cf679c949dd2e84219d033c658e009
JavaScript
julioMoudatsos/bandtec1
/sitecopia/proj/api-projeto-site/API-projeto-site/public/js/script.js
UTF-8
209
3.078125
3
[]
no_license
const btn = document.querySelector(".btn"); const spa = document.querySelector(".spa"); function mudacor() { spa.classList.add("cor"); console.log("teste") } btn.addEventListener("click", mudacor);
true
fd749f713e03c9312e0de4828ea69710d15dbe68
JavaScript
ohsnaplol/moment
/client/src/pages/Profile/Profile.jsx
UTF-8
4,849
2.546875
3
[ "Apache-2.0" ]
permissive
import React, { Component } from 'react' import API from "../../utils/API" import { withRouter } from 'react-router'; import NetworkTag from '../../components/NetworkTag' // import "./style.css"; class Profile extends Component { constructor(props) { super(props) this.state = { viewerIsFollowing: unde...
true
1e8dd2875583a61c06afb5902bf495768baf737d
JavaScript
atrotter0/pdf-click-adventure
/choices.js
UTF-8
1,504
3.046875
3
[]
no_license
//choices outline var choice = { code: '', title: '', text: '', toSection: '' }; //choices var choice1 = { code: 'C11', title: 'Fight Back', text: 'Agree with Rholsk. You will help fight off the attackers as best you can.', toSection: 'S2' }; var choice2 = { code: 'C12', title: 'Flee', text: 'Ag...
true
f5306804eef32936ab3a39bf5be5da9f2f5ce269
JavaScript
garciadiazjaime/website-builder
/routes/index.js
UTF-8
1,641
2.515625
3
[]
no_license
var express = require('express'); var router = express.Router(); var React = require('react'); // var ReactRouter = require('react-router'); // var routes = require('../build/routes.js'); /* GET home page. */ router.get('*', function(req, res) { // ReactRouter.run(routes, req.path, function(Root, state) { // ...
true
292ce03bb4c3069a8bbbfd4607906dd0640eb6d1
JavaScript
s0h1s2/RollDice
/public/resources/js/main.js
UTF-8
3,472
3.203125
3
[]
no_license
"use strict"; // html varibles // player 1 const player1 = document.querySelector(".player-1"); const player1Name = document.querySelector(".player-1__name"); const player1HoldPoint = document.querySelector(".player-1__holdPoint--value"); const player1CurrentPoint = document.querySelector( ".player-1__curren...
true
3e79f62227902f6dbb02ef3deeeaebf58f3edd7e
JavaScript
rmarren1/dash-renderer
/src/reducers/utils.js
UTF-8
1,395
3.0625
3
[ "MIT" ]
permissive
import R from 'ramda'; const extend = R.reduce(R.flip(R.append)); // crawl a layout object, apply a function on every object export const crawlLayout = (object, func, path = []) => { func(object, path); /* * object may be a string, a number, or null * R.has will return false for both of those types...
true
d2a8ba32e4d6cbfe6f20a65642c4eea47052835e
JavaScript
s2ataei/react-app-portfolio
/src/components/ReceptiveField/Tool.js
UTF-8
6,966
2.640625
3
[]
no_license
import { render } from '@testing-library/react'; import React from 'react'; import 'zingchart/es6'; import ZingChart from 'zingchart-react'; import './Tool.css'; class Conv2DTool extends React.Component { constructor(props) { super(props); this.state = { inputSize: '', ker...
true
01d2ced136c1e8def708fc20e3b7eb2a27e02a8e
JavaScript
BlueStoneQ/BBQ
/war2022/jsWriteByHand/data-handle/16-flatObj2Tree.js
UTF-8
5,537
3.4375
3
[]
no_license
/** * 扁平的js对象转化为树 * 2022-6-16 * https://juejin.cn/post/6946136940164939813#heading-47 * https://febook.hzfe.org/awesome-interview/book3/coding-arr-to-tree * 其实就是根据pid 来生成树型结构 * TODO: 1. 其实 应该要考这种的互相转换 */ /** * 方法1:迭代法 * 核心:使用map + data遍历2次 * @param {*} data * @returns */ const flatObj2Tree = (data) => { ...
true
b001897f4b3f424c918efc390aa121c6a6a80a0b
JavaScript
vuong123s/html
/ex10.js
UTF-8
174
2.59375
3
[]
no_license
function run(a){ var b = a.split('') var c = [] for(var i = b.length - 1; i >= 0; i--){ c.push(b[i]) } console.log(c.join('')) } run('w3resource')
true
bb91df6927ada2713bb78af5d67b3cb3ae0c5003
JavaScript
Codenegaar/crawoler
/frontier/src/index.js
UTF-8
7,612
2.65625
3
[]
no_license
const path = require("path"); require("dotenv").config({ path: path.join(__dirname, "../../.env") }); const amqp = require("amqplib/callback_api"); const winston = require("winston"); const redis = require("redis"); /** * Configures the logger */ let logger; async function configureLogger() { const format = ...
true
cf2f29e57f1f5fab67673be726a7345c224f1280
JavaScript
PeibolRam/cursoJavaScript-Platzi
/clase26.js
UTF-8
1,118
3.71875
4
[]
no_license
class Persona{ constructor(nombre, apellido, altura){ this.nombre = nombre this.apellido = apellido this.altura = altura } saludar(fn){ console.log(`Hola! me llamo ${this.nombre} ${this.apellido}`) if(fn){ fn(this.nombre,this.apellido) } } ...
true
641840132efb9a867e46f92db405e21cf2751443
JavaScript
DanielGalarza01/ExamenDivB
/ExamenDivB-main/tres.js
UTF-8
1,961
3.796875
4
[]
no_license
/* Llegan 10 vuelos con vacunas de distintos lugares del mundo Se debe registrar de cada vuelo: -Origen (“Asia”, “Europa”, “USA”) -Cantidad de vacunas (no puede ser 0) -Costo del vuelo (entre 1 millón y 5 millones de pesos) Informar: a- El origen que envió mayor cantidad de vacunas b- El promedio de vacunas llegadas de...
true
7e5e15bbe55afa7f9dc9516749b94f1e99247fe6
JavaScript
Pengbr/JavaScript_study
/JavaScript/break语句.js
UTF-8
646
3.859375
4
[]
no_license
// 可以为循环语句创建一个label,来标识当前的循环 // label:循环语句 // 使用break语句时,可以在break后跟一个label // 使用continue也可以后跟一个label // 这样break会结束指定的循环,而不是最近的 // console.time() 可以用来开启一个计时器,里面的字符串代表计时器的名字 console.time('test'); outer: for (var i=0;i<5;i++){ console.log('@外层循环'+i); for (var j=0;j<5;j++){ break outer; ...
true
0452eebd853ab4805fafd16d9a760b504e82f2b3
JavaScript
XRiver/scrum-proj-client
/tourism/pages/my/info/info.js
UTF-8
3,969
2.53125
3
[]
no_license
const api = require('../../../utils/api') const app = getApp() // pages/my/info/info.js // 功能:根据自己创建的尚未出行的计划,获取所有未审批的计划申请者 // 并且根据申请者进入对应审批页面 Page({ data: { planlist:[], /* Plan实体 pid: Integer; 计划编号 aid: Integer; 景点编号 openid: String; 创建者openid aname:String; 景点名称 uname:String; ...
true
ad7af0902f02951ed37b3be9cc0c9a526838dbd5
JavaScript
nicolasxu/front-end-knowledge
/Javascript/snippets/how_to_empty_an_array.js
UTF-8
82
2.609375
3
[]
no_license
function empty_array () { // empty an array var arr = [1,2,3,4,5]; arr = []; }
true
5644ccd939f43f7e59fa5b4b0bc02317fd37d92a
JavaScript
Kubaboty/sarky
/commands/4fun/say.js
UTF-8
511
2.578125
3
[]
no_license
const db = require('quick.db') module.exports = { name: 'say', category: '4FUN', aliases: ['powiedz', 'reply'], description: 'Wysyła to samo co ty wysłałeś', run: async (client, message, args)=>{ const user2 = message.author const blacklisted = db.fetch(`blacklist_${user2.id}`) ...
true
fdb93beb87c16250dafb84a4cf33f9943dc5610d
JavaScript
lpre-ys/js-to-tkcode
/js/lib/parser/parse-binary.js
UTF-8
1,599
2.75
3
[ "MIT" ]
permissive
'use strict'; const esprima = require('esprima'); const escodegen = require('escodegen'); const tmpVarFactory = require('../tmp-var-factory'); function parseBinary(node, parser) { let { operator, left, right } = node; if (!Object.keys(BinaryOperators).includes(operator)) { return { operat...
true
d636a0e74f1f16cf4bb654c999071710f80efca3
JavaScript
mijung-oh/miniPJT1_menuChoice
/static/js/bege_check.js
UTF-8
4,223
3.640625
4
[]
no_license
// 다른 js파일이랑 변수명 같아도 상관없는지? var imgArray= new Array(); imgArray[0]="static/images/김치.jpg"; //사진 imgArray[1]="static/images/라면.jpg"; //사진 imgArray[2]="static/images/젤리.jpg"; //사진 imgArray[3]="static/images/크림리조또.jpg"; //사진 var nameArray=new Array(); nameArray[0]="김치"; nameArray[1]="라면"; nameArray[2]="젤리"; nameAr...
true
3824024ac693c416db0bdf0478d5af71b2741a09
JavaScript
tombene/giphy
/assets/js/giphyhook.js
UTF-8
3,597
2.84375
3
[]
no_license
var giftastic = { topics: ['board games', 'brooklyn 99', 'princess bride', 'fails', 'mountains', 'kayak','hiking'], btnTopics: function () { for (var i = 0; i < this.topics.length; i++) { var li = $('<li>'), a = $('<a href="#">'); li.append(a); a.attr('class', 'topic-buttons label-primary'); a.attr('d...
true
fe808a8544e973153900bf64edf12ea1fd03669a
JavaScript
dabellator/birth-plan
/src/Services/Common.js
UTF-8
693
3.171875
3
[]
no_license
export function combineClasses () { return Array.prototype.reduce.call(arguments, (r, c) => { c = (c && typeof c === 'object' && c.length) ? combineClasses.apply(null, c) : c; return c ? `${r} ${c}` : `${r}`; }) } export function createRandom () { var letters = 'abcdefghijklmnopqrstuvxyz'; var numbers ...
true
42cb18a50f82f9d12cd7c48e0f29b3ae498940c4
JavaScript
TrungJamin/To-do-list-ReactJS
/src/component/Sort.js
UTF-8
2,615
2.578125
3
[]
no_license
import React, { Component } from "react"; class Sort extends Component { constructor(props) { super(props); this.state = { sort: { by: "", status: -1, }, }; } onSort = (name, value) => { console.log(name, " - ", value); var sort = { by: name, status: va...
true
e6579abf0b25331eb5931166ae14181acf70bad0
JavaScript
pattykag/sapui5Final
/uimodule/webapp/utils/formatter.js
UTF-8
561
2.625
3
[]
no_license
sap.ui.define([], function() { "use strict"; return { formatISODatetoLocaleDateString: function(sDate) { return new Date(sDate).toLocaleDateString('es-AR'); }, statusColor: function(cod_interno) { cod_interno = parseFloat(cod_interno); if (cod_interno...
true
19fb657f9b7f57b7bbeeadb9b073f0e2a4f22818
JavaScript
marsh69/Dyslexic-Reader
/templates/app.js
UTF-8
3,699
2.609375
3
[]
no_license
var currentSectionIndex = 0; var book = ePub(); var rendition; var inputElement = document.getElementById("input"); inputElement.addEventListener('change', function (e) { console.log("ONCHANGE TRIGGERED") var file = e.target.files[0]; if (window.FileReader) { var reader = new FileRe...
true
c6ffa2ec885e6bb060fe5c249bd095d2b9b80170
JavaScript
spammailnt4u/JQuery
/Practice/grades.js
UTF-8
706
2.65625
3
[]
no_license
function random() { var ran = Math.random() >= 0.5; if (ran) {grade = "F"} else {grade = "D"} return grade; }; function replace() { $('#SP-transcript td:contains("Acad: ")').each(function() { $(this).html('Acad: ' + random()); }); $('#SP-transcript td:contains("Cit: ")').each(functio...
true
c17ebf7d51c606cece8eeff14c4bd3fa50c126bd
JavaScript
Junelicious/Q_bot
/qbot.JS
UTF-8
3,539
2.625
3
[]
no_license
const Discord = require("discord.js"); const client = new Discord.Client(); const config = require('./config.json'); const shipmodels = require ('./data/shipmodels'); const fs = require ("fs"); const str = require ('./commandText.json'); var newUsers = new Discord.Collection(); client.on("message", msg => { // tes...
true
bb6d7bc739280877a9bbd04968f1082c7d65a674
JavaScript
linzhangfeng/WBPT
/scripts/js/phz1/scripts/utils.js
UTF-8
9,495
2.546875
3
[ "MIT" ]
permissive
var packet = { data:{}, parse: function (d) { var s = JPacket.decodeStr(d); try{ this.data = JSON.parse(s); return true; } catch(e) { return false; } }, toJson:function() { return this.data; }, toStr...
true
f313f8847fb7a4194067ae11004ebb4d7de331f3
JavaScript
BCSDLab/HANGANG_FRONT_END
/src/utils/timetablePage/getStartPosition.js
UTF-8
421
3.578125
4
[ "MIT" ]
permissive
/** * 해당 강의가 무슨 요일 몇시에 시작하는지 반환합니다. * 예를 들어, 01은 001로 변환되고, * 첫 자리 수 0은 월요일이며 01은 9시를 의미합니다. */ export const getStartPosition = (elem) => { const convertedElem = elem.toString().padStart(3, "0"); const day = parseInt(convertedElem[0]); const hour = parseInt(convertedElem.slice(1)); return { day, hour }; };...
true
f6e5d0266ba7188147d7c02b8da3098e6a52e8c4
JavaScript
chch1019/TURF-project
/GeoSpinn1/radiation-webgis-app-modelbuilder/js/libs/voronoi/Voronoi.js
UTF-8
7,376
2.578125
3
[ "MIT", "MIT-0" ]
permissive
define(["Point", "VEdge", "VEvent", "VParabola", "VPolygon", "VQueue"], function(Point, VEdge, VEvent, VParabola, VPolygon, VQueue){ function Voronoi() { with(this){ this.places = null; this.edges = null; this.cells = null; this.queue = new VQueue; this.width = 0; this.heght = 0; this.root = null...
true
9ec11ed49267b45153e0c77f971dd6635a501d73
JavaScript
liorho/Dog-Eat-Dog
/dist/js/Renderer.js
UTF-8
2,105
3.109375
3
[]
no_license
class Renderer { renderBoard(matrix) { $('.board-container').empty() let board = "" let width = (100 - 0.2 * (matrix[0].length)) / matrix[0].length for (let y = 0; y < matrix.length; y++) { for (let x = 0; x < matrix[y].length; x++) { board += this.rend...
true
185b6bcc734aee5873f8cc49afcc131c043610a2
JavaScript
sseun43/TweetAnalyzer
/apiSoup.js
UTF-8
2,961
2.546875
3
[]
no_license
const fetch = require('cross-fetch'); const Twitter = require('twitter'); const ToneAnalyzerV3 = require('watson-developer-cloud/tone-analyzer/v3'); const express = require("express"); const app = express(); app.set("port", process.env.PORT || 3000); const url ='https://api.twitter.com/oauth2/token' const newsKey =...
true
a8f20a82f4229d15544aed28664e3de19698fc29
JavaScript
WalshyDev/slimefun-items
/src/components/ItemName.jsx
UTF-8
2,077
2.78125
3
[]
no_license
import * as Utils from '../utils/Utils'; const colors = { 0: '#000000', 1: '#0000AA', 2: '#00AA00', 3: '#00AAAA', 4: '#AA0000', 5: '#AA00AA', 6: '#FFAA00', 7: '#AAAAAA', 8: '#555555', 9: '#5555FF', a: '#55FF55', b: '#55FFFF', c: '#FF5555', d: '#FF55FF', e: '#FFFF55', f: '#FFFFFF', } fu...
true
e2a29d251e6cb6b13bd5cc9cafe9ff4fcb6dc927
JavaScript
kyorohiro/memo_pwa_2018
/01_hello_pwa_with_javascript/sw.js
UTF-8
1,217
2.65625
3
[]
no_license
var cacheName = 'hello-v0.0.1'; self.addEventListener('install', function (event) { console.log('# install (1)'); const installFunc = function (cache) { console.log('# install (2)'); return cache.addAll(["/", "/index.html"]); }; event.waitUntil(caches.open(cacheName).then(installFunc)); }); self.addE...
true
cc13f87546047cf4041bb0074693f4f9836eb1f1
JavaScript
ga-meet-panchal/weather-app
/src/containers/Details/action.js
UTF-8
966
2.515625
3
[]
no_license
import * as actionTypes from "./actionTypes"; import { fetchWeatherDetails } from "../../Services"; export const getCapitalDetails = country => { return dispatch => { dispatch({ type: actionTypes.GET_CAPITAL_WEATHER_DETAILS_INIT }); fetchWeatherDetails(country) .then(response => { if...
true
710cc94e9fdcfb9aad050f7a702e1262b4cae3dc
JavaScript
ninetteadhikari/lab-hello-ironhack
/starter-code/src/index.js
UTF-8
1,554
2.640625
3
[]
no_license
import React from "react"; import ReactDOM from "react-dom"; import "./style.css"; const header=( <div className="title"> <nav className="nav-bar"> <img src="images/ironhack-logo.svg" alt="" /> <img src="images/menu-top.svg" alt="" /> </nav> <div className="header-text">...
true
2f139145e63a457675bc196e23bc4e7ca93d352b
JavaScript
kunglaw/hacktiv8-phase-1
/uber-fox-2018/week-1/roman-numerals/index.js
UTF-8
916
4.15625
4
[]
no_license
// roman numerals "use strict" function romanNumerals(num) { let numbers = [1, 4, 5, 9, 10, 40, 50, 90, 100,400,500,900,1000] let romanNum = ["I","IV","V","IX","X","XL","L","XC","C","CD","D","CM","M"]; let result = ""; if(num > 3000) { return "please insert below than 3000"; } ...
true
8cb3de103ee6918eadbca77c8c9edcf5c1715c12
JavaScript
mmarol/blueprint-paper-js
/js/p5Port.js
UTF-8
3,783
3.140625
3
[]
no_license
var oldWidth, oldHeight, newWidth, newHeight, randX, randY; var randEndPoints = []; var startPoints; var center = view.center; oldWidth = view.size.width; oldHeight = view.size.height; console.log(oldWidth); console.log(oldHeight); getStartPoints(oldWidth, oldHeight); console.log(startPoints); getRandPoints(); cons...
true
673a3a627e85975048f1ea27e20d02bfa896dfb9
JavaScript
Oscar6/react-hello
/src/App.js
UTF-8
757
2.78125
3
[]
no_license
import React, { Component } from 'react'; import './App.css'; class Hello extends Component { render() { let friends = [ {name: 'Messi', age: 18}, {name: 'Ronaldo', age: 21}, {name: 'David Silva', age: 25}, {name: 'Memo', age: 30}, {name: 'Andres', age: 33} ] return ( ...
true
135a11d7666825ecb3eaf1d9f82965da461bf9bb
JavaScript
HellGate94/ComponentLoader
/src/ComponentLoader.js
UTF-8
7,160
2.75
3
[]
no_license
import Logger from './Logger'; class ComponentData { /** @var {{new(): Component}} component */ component; /** @var {any} data */ data; /** @var {(key, value) => any} component */ optionParser; constructor(component, data, optionParser = null) { this.component = component; ...
true
0ae945a6f3c87b3378bd6dbbe2aee55aa056ffc7
JavaScript
trevorfehrman/auth-i
/routes/authRoutes.js
UTF-8
1,226
2.578125
3
[]
no_license
const express = require("express"); const router = express.Router(); const db = require("../dbConfig"); const bcrypt = require("bcryptjs"); router.post("/register", (req, res) => { const credentials = req.body; const hash = bcrypt.hashSync(credentials.password, 14); credentials.password = hash; db("users") .ins...
true
6606338cdceac477202c4368bad16f4701bf1a3f
JavaScript
thisisvetri/js1
/3.js
UTF-8
636
3.3125
3
[]
no_license
/* * This is a JavaScript Scratchpad. * * Enter some JavaScript, then Right Click or choose from the Execute Menu: * 1. Run to evaluate the selected text (Ctrl+R), * 2. Inspect to bring up an Object Inspector on the result (Ctrl+I), or, * 3. Display to insert the result in a comment after the selection. (Ctrl+L) ...
true
1ea20b9f3e44fd80e3d57ee6e5d61418934bacf9
JavaScript
Isabellanamutenda/testing-practise
/reversestring.test.js
UTF-8
219
2.734375
3
[]
no_license
const reverseString = require('./reversestring'); test('reverse a string', () => { expect(reverseString('Ashley')).toBe('yelhsA'); }) test('reverse a string', () => { expect(reverseString('Book')).toBe('kooB'); })
true
dd1f9de4eee8382d86f44580697ff2a5e93fee06
JavaScript
bodyhigh/art-repo-api
/app/helpers/controllerHelper.js
UTF-8
4,960
3.09375
3
[]
no_license
import util from 'util'; import APIError from './APIError'; const htmlEntities = require('html-entities').XmlEntities; /** * Define sanitized fields for our entities */ const artworkSanitizeFields = ['title', 'description']; function validateEntityArtistIdOwnership(entity, req) { if (entity === undefined) { ...
true
9682ad017e097b09a880248f83056098b95f3d5f
JavaScript
sorimachi0414/JamSequencer
/src/components/common.js
UTF-8
1,962
2.515625
3
[]
no_license
import Row from "react-bootstrap/Row"; import Col from "react-bootstrap/Col"; import React from "react"; export const ChordChopperCheckBox =(props)=>{ return( <input className="form-check-input m-05 p-sm-2 mx-sm-1" type="checkbox" checked={props.checked} value={props.value} onChange={props.onClick} /> ) } exp...
true
9ac94294cc8dd19fbd14ad28b81f166915c8a493
JavaScript
recovery-dev/Resizeable-responsive-window-javascript-css
/assets/js/custom.js
UTF-8
5,462
2.890625
3
[]
no_license
function create(htmlStr) { var frag = document.createDocumentFragment(), temp = document.createElement('div'); temp.innerHTML = htmlStr; while (temp.firstChild) { frag.appendChild(temp.firstChild); } return frag; } var interval; setTimeout(() => { var obj = animation...
true
f2d42cf100dd494b3bf743bfd8aa6ae11fc8db26
JavaScript
tech6hutch/fs-nextra
/test/createFile.js
UTF-8
891
2.53125
3
[ "MIT" ]
permissive
const ava = require('ava'); const { fs, tempFile, tempFileLoc, tempDirLoc } = require('./lib'); const nextra = require('../src'); ava('new file (standard usage)', async test => { const file = tempFileLoc(); await nextra.createFile(file); const stats = await fs.statAsync(file); test.true(stats.isFile()); }); ava(...
true
e494d741a433ddacad6ee6f3414c03406f4f6b77
JavaScript
cimaron/jquery-ajaxresponse
/src/XMLHttpResponse.js
UTF-8
4,494
2.6875
3
[ "MIT" ]
permissive
/* Copyright (c) 2014 Cimaron Shanahan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute...
true
21cd741b6838d6690b1abf6bf90e106d403e3769
JavaScript
yesseniarod/c0121-code-solutions
/javascript-modal/main.js
UTF-8
417
2.796875
3
[]
no_license
var $button = document.querySelector('.button'); var $modalContainer = document.querySelector('.modal-container'); var $response = document.querySelector('.response'); function openModal(event) { $modalContainer.classList.add('active'); } function closeModal(event) { $modalContainer.classList.remove('active'); }...
true
dd7ee2d330792ed03c869b72dc9dba3fc381c9f0
JavaScript
EktaHeer/React
/hello-world/src/components/hello.js
UTF-8
420
2.59375
3
[]
no_license
import React from 'react'; const HelloJSX = () => { return ( // using jsx <div className="dummyclass"><h1>Heading tag using JSX</h1></div> ) // return React.createElement('div', null, 'Without JSX not accepting heading attribute') return React.createElement('div', {id: 'hello', className:'dum...
true
2f8bc213596cc5a68024f2e3b7b5f2730c5bac4c
JavaScript
yurastich/my_works
/Old works/lending-4/js/global.js
UTF-8
1,427
2.578125
3
[]
no_license
$(document).ready(function () { screenWidth = $(window).width(); // Parallax $(".b-wrap>div").each(function () { var hasAttr = $(this).attr("data-parallax"); if (hasAttr == "scroll") { var imagePath = $(this).find(".e-img-bg-image").attr("src"); $(this).parallax({ imageSrc: imagePath ...
true
98efe5b9e3c672cf887056b003f304391ca6eeea
JavaScript
amandasteckler/you-and-me
/react-folder/src/reducers/userReducer.js
UTF-8
806
2.546875
3
[]
no_license
export default function currentUser(state = {id: null, name: null, userBoardID: null, loggedIn: false}, action){ switch (action.type) { // case 'CREATING_USER': // return {...state, creating_user: true} case 'LOGIN_USER': return Object.assign({}, state, {id: action.currentUser.user_id, name: acti...
true
6734ccdb1d5f073b5797f45226ea1ce33d2993ce
JavaScript
FVANCOP/ChartNew.js
/Add-ins/stats.js
UTF-8
44,479
2.765625
3
[ "MIT" ]
permissive
function stats(data, config) { data.stats = {}; if (typeof data.datasets == 'undefined') { // Pie structure; PSbasic(data); } else { // line structure; LSbasic(data); Linear_Regression(data); } replace_stats(data, config); return; }; function isStat(val) { if (typeof val == "string") { if (val.indexOf(...
true
109afd11c70e40f57e303f167a79690ab906cab2
JavaScript
abelbezu/game_of_life
/board_model.js
UTF-8
6,981
4.21875
4
[]
no_license
//Datatype representing the game of life board. //Abstraction: {two dimensional binary array} -> BoardModel // 1 represents a live cell. // 0 represents a dead cell. //Can be initialized from any valid (!) two dimensional binary array. //Board is a mutable object. var BoardModel = function(boardArray, num_rows, ...
true
14c083c84d8f1204c8733f7536b3b6f1d98ee7cf
JavaScript
niteshkumarsinha/All_tutorials
/JavascriptDataStructuresAndAlgorithms/ProblemSolvingPatterns/multiple_pointers.js
UTF-8
994
4.5
4
[]
no_license
// accepts a sorted array of integers // find first pair where the sum is 0 // returns an array that includes both the values that sum to 0 or undefined if a pair does not exist. function sumZero(numbers) { for (let num of numbers) { index = numbers.indexOf(num) for (let i = 0; i < numbers.length;...
true
ef48ccfd1faf4561739e0ff8481a10200fa48e74
JavaScript
AsuraMoon/comprendre-javascript-master
/02-les-evenements/03.js
UTF-8
1,243
3.46875
3
[ "MIT" ]
permissive
/* Il est parfois nécessaire de déleguer l'évènement à un élement enfant pour ne pas avoir à attacher trop d'évènements (sur une liste par exemple). */ var mainElement = document.getElementById('main'); function deleteDoubleClicked(event) { var target = event.target; target.remove(); console.log('You delete...
true
43931084f79120b11d1f4b29e4b5da08f2291762
JavaScript
quannadev/fixme.github.io
/SPA/js/ready.js
UTF-8
171
2.515625
3
[ "MIT" ]
permissive
var body = document.body var removeLoading = function() { setTimeout(function() { body.className = body.className.replace(/loading/, ''); }, 1500); }; removeLoading();
true
1dafb2675844fec3a80c63b6f9e1241e1a15a375
JavaScript
suncraft/lotide
/test/middleTest.js
UTF-8
992
3.375
3
[]
no_license
const assert = require('chai').assert; // const assertArraysEqual = require('../assertArraysEqual.js'); const middle = require('../middle.js'); // middle([1, 2, 3]) // => [2] // middle([1, 2, 3, 4, 5]) // => [3] // middle([1, 2, 3, 4]) // => [2, 3] // middle([1, 2, 3, 4, 5, 6]) // => [3, 4] // assertArraysEqual(middl...
true
0d156b0123507ffa33527779c2b5d03ba9ddde27
JavaScript
hararia/lab-react-training
/src/components/IdCard.js
UTF-8
530
2.578125
3
[]
no_license
import React from 'react'; const IdCard = props => { const formattedBirth = props.birth.toString().substring(0,15) const divStyle = { display:'flex' } return ( <div style={divStyle}> <img src = {props.picture} /> <ul> <li><b>First Name: </b>{props.firstName}</li> <li><b>Last Name: </...
true
f4abe2c428b56f7e12e205f111a6228cf35b6607
JavaScript
Amrkady/EnterpiseSpring-APP
/WebContent/resources/js/animate.js
UTF-8
833
2.765625
3
[]
no_license
document.getElementById("about_us").addEventListener("click",()=>{ alert("1"); document.getElementById("three-column").style.backgroundColor="yellow"; // document.getElementById("cntus").style.backgroundColor="white"; }) document.getElementById("contact_us").addEventListener("click",()=>{ // document.getElementB...
true
a62826082b34000d02d03909f505eae1138061c4
JavaScript
chiwong08/tr_pair_manoj_codewars_tv_remote
/src/tvRemote.js
UTF-8
1,562
3.203125
3
[]
no_license
var tvRemote = function(word) { const map = [ ['a','b','c','d','e','1','2','3'], ['f','g','h','i','j','4','5','6'], ['k','l','m','n','o','7','8','9'], ['p','q','r','s','t','.', '@', '0'], ['u','v','w','x','y','z','-','/'] ...
true
3a6aedb90f0243b12076746be5754e91c8540107
JavaScript
AleksTeresh/self-monitor
/services/interUserService.js
UTF-8
1,687
2.609375
3
[]
no_license
import { executeQuery } from "../database/database.js"; import { keysToCamel, valuesToNumber } from "../utils/objectUtil.js"; import { formatDate } from '../utils/dateUtil.js' const postprocess = (queryResult) => { if (queryResult.rowCount === 0) { return; } const objRes = queryResult.rowsOfObjects(); ret...
true
ba2cbb2f52ce3e3b7ff61a3b21fc1c13dafffafe
JavaScript
sadik3ds/jxax
/src/util/nameOf.js
UTF-8
361
3.765625
4
[ "MIT" ]
permissive
/** * Get name of a varible using object instantiation syntax. * * @example * const someVar = something(); * nameOf({someVar}); // => "someVar" * * @param {object} obj An object containing the variable's reference as its first prop. * @returns {string} The name of the variable. */ export default function nameO...
true
4bc6cd7793ab66971dbe8e84707046fec03b87fe
JavaScript
cryptoCEU/juego
/Boss.js
UTF-8
820
3.1875
3
[]
no_license
/** * Monstruo final al que tenemos que destruir */ class Boss extends Opponent { constructor(game) { // Más lógico añadir aquí bossImage y no usar el isBoss // Modificar el Opponent y enviarle los param necesarios // super(game, bossImage, bossImageDead, bossSpeed) const bossImag...
true
5a22087ee9c27013de57e215afda7de9b6d24ee9
JavaScript
cgiglio/mlbam_interview
/data.js
UTF-8
5,520
2.625
3
[]
no_license
var gameData = []; // Helper function to generate HTML for thumbnail + hover functions var createThumbnail = function(carousel, val, key, next) { if (!next) { // Add to left end carousel.prepend($('<li>', {"id" : key + "_item", "class" : "tooltip"}).append($('<span/>', { "class" : "tooltiptext"}).append(val.gam...
true