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
a5f86cb17e973d83f33100097e7dc38c36cf5a59
JavaScript
uhclspiritsquad/uhclspiritsquad.github.io
/submenu.js
UTF-8
1,238
3.0625
3
[]
no_license
/*<div class="btn-group" role="group"><a href = "LINK"><button type="button" class="btn btn-default about"><p>NAME</p></button></a></div>*/ var ans = prompt("Do you want to edit the submenu?", "Yes or no"); /*function WriteToFile(addition) { var txtFile = new File(""); txtFile.open("w"); txtFile.writeln(additi...
true
1c7ccf02e0ed0c84d4ba53f3de9dcfaf05e1ab32
JavaScript
estelora/code-quizzes
/toHex.js
UTF-8
67
2.59375
3
[]
no_license
function toHex(num) { var hex= num.toString(16); return hex; }
true
1bd36404652234d02fcd72dae3e5d53c9cbca349
JavaScript
vodolaz095/hunt
/test/sequilizeModel.sqlite.test.js
UTF-8
1,158
2.609375
3
[ "MIT" ]
permissive
'use strict'; var hunt = require('./../index.js'), PlanetModel = require('./../examples/models/planet.model.js'), Hunt; require('should'); describe('Sequilize test for SQLite database model', function () { this.timeout(10000); before(function (done) { Hunt = hunt({ 'enableSequilize':true, '...
true
0237499dcbcc0bb68ce68400cb35bb9ef743a03a
JavaScript
diegomedina248/Memcached
/config/server.js
UTF-8
817
2.6875
3
[ "MIT" ]
permissive
const joi = require('joi') const schema = joi.object({ PORT: joi.number() .default(4000), ADDRESS: joi.string() .default('127.0.0.1'), NODE_ENV: joi.string() .allow(['development', 'production', 'test']) .required(), }).unknown() .required() /** Class that validates there's a env and port envi...
true
a93fab23ca342e1b9eb4a731292f6c2c612e2107
JavaScript
gaoshengyun/front-end-knowledge-summarize
/css3/transform/transform小实例/index.js
UTF-8
932
2.984375
3
[ "MIT" ]
permissive
var setListInnet = () => { let list = document.querySelector('#list') let inner = '' for (let i = 0; i < 100; i++) { inner += `<li>这是第${i+1}个li标签</li>` } list.innerHTML = inner } window.onload = () => { setListInnet() let wrap = document.querySelector('#wrap') let list = document.querySelector('#lis...
true
f7d588df73f9ca7cfdd58ed711e9f0e3c3ff9de2
JavaScript
loopmode/cairo-workshop-app
/src/components/UserList/utils.js
UTF-8
186
2.8125
3
[]
no_license
export function filterUsers(users, filter) { if (filter) { return users.filter(user => user.username.toLowerCase().match(filter.toLowerCase())); } else { return users; } }
true
e67214d464392bcf1354faf51091af6c4eb645c1
JavaScript
StepanSnigur/JavaScript-Design-Patterns
/behavioral/Iterator.js
UTF-8
356
3.671875
4
[]
no_license
class Iterator { constructor(arr) { this.arr = arr; this.index = 0; } next () { return this.arr[this.index++]; } hasNext () { return this.index < this.arr.length; } } let arrIterator = new Iterator([1, 5, 7, 'hello', 234, 0]); while (arrIterator.hasNext()) { ...
true
4385a50457488db31b0eb60818162d4f6613312d
JavaScript
pranshudobhal/banana-speak
/app.js
UTF-8
802
3.296875
3
[]
no_license
//Button click var translateButton = document.getElementById("translate-button"); translateButton.addEventListener("click", translate); //Read Input var translateInput = document.getElementById("translate-input"); //Show Output var translateOutput = document.getElementById("translate-output"); //Mock API //var url ...
true
c50fadab1975e3381f19504e6ae405f3c07154a1
JavaScript
Maile123/test2
/js/valid.js
UTF-8
2,256
2.53125
3
[ "MIT" ]
permissive
var firebaseConfig = { apiKey: "AIzaSyDuu4FIsR0yRIkOrtu6T59lqfPbN7SG53M", authDomain: "sms-demo-9ec85.firebaseapp.com", databaseURL: "https://sms-demo-9ec85-default-rtdb.firebaseio.com", projectId: "sms-demo-9ec85", storageBucket: "sms-demo-9ec85.appspot.com", messagingSenderId: "401316316472", app...
true
5c83489981b7a64f30f5917291ee1503d81f4f9d
JavaScript
webmaster444/webmaster444.github.io
/d3/reportdashboard1/assets/donutchart.js
UTF-8
4,847
2.59375
3
[ "Apache-2.0" ]
permissive
function donutChart(chartWrapper, dataset,oData,selectedKey) { var width = 960, height = 960, radius = Math.min(width, height - 100) / 2; var color = d3.scale.ordinal() .range(["green", "red", "orange", "#6b486b", "#a05d56"]); var arc = d3.svg.arc() .outerRadius(radius - 50...
true
0b357898c6c32a6a1dd95ed155a91dbbdba1bdb1
JavaScript
dchuchukalo/goit-react-hw-03-phonebook
/src/App.js
UTF-8
2,802
2.515625
3
[]
no_license
import React, { Component } from 'react'; import ContactForm from './components/ContactForm'; import ContactList from './components/ContactList'; import Filter from './components/Filter'; import { v4 as uuidv4 } from 'uuid'; import { ToastContainer, toast, Zoom } from 'react-toastify'; import styles from './App.module...
true
a977005c0cd786fd6a0a09c3098aa45aab7506d8
JavaScript
aczapi/mvc-budget-app
/public/js/limit.js
UTF-8
3,305
2.546875
3
[ "Unlicense" ]
permissive
$(function () { // const date = document.getElementById('todayDate').innerHTML; $('#inputAmount').on("keyup keydown change", function () { const category = $('#expenseCategory').val(); const amount = $(this).val(); const date = $('#todayDate').val(); $.ajax({ url: "/expense/getLimit", ...
true
9656b82b615958ba8b757321fc105d25880d8e27
JavaScript
Echefu-Charles/Javascript-Training
/Assignment/index.js
UTF-8
1,183
4.28125
4
[]
no_license
// function factorial(num) { // let value = 1; // if (num === 1) { // return 1; // } else if (num === 0) { // return "Error"; // } else if (num > 1) { // for (let i =0; i < num; i++) { // let newNum = num - i; // value = value * newNum; // } // re...
true
9f69be7f5c5b098a6dc2d9a10e04a9e95948c2a9
JavaScript
ptkim10/ModPE-Script
/seekBar.js
UTF-8
1,149
2.53125
3
[]
no_license
var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); function newLevel(){ ctx.runOnUiThread( new java.lang.Runnable( { run: function(){ try{ Progress = new android.widget.SeekBar(ctx); Progress.setMax(20); Progress.setProgress(20); Progres...
true
c70ea2d3d24973add0336798dbfee8433a0e19a9
JavaScript
alannguyen-git/BookCataloguing-Reactjs
/src/Components/BodyComponents/Form.js
UTF-8
7,278
3.078125
3
[]
no_license
import React, { Component } from 'react' import { connect } from 'react-redux' import { Link } from 'react-router-dom' class Form extends Component { //This is the constructor of this class, where binding the function happens so that it gains //access to the method this.setState, without binding, the functio...
true
36e456dcebcb7a16b06fe7d747f1f649d3963c35
JavaScript
tfantina/rss-really-simple-style
/customizer.js
UTF-8
790
2.828125
3
[]
no_license
//this script uses jQuery to update the DOM as the user moves the color sliders (function($) { //creates live reloading when the site title is changed wp.customize('blogname', function (value) { value.bind( function(newVal) { $('h1').html(newVal); }); }); //creates live reloading when background...
true
5fa299b23d1d3f9399d5f2e54e0dc6b716b6fc9d
JavaScript
yosuke-furukawa/babababel
/server.js
UTF-8
1,109
2.53125
3
[]
no_license
"use strict"; const levelup = require('levelup') const db = levelup('./mydb') const path = require('path') const express = require('express') const bodyParser = require('body-parser') const through2 = require('through2') const Stringify = require('streaming-json-stringify') const app = express() app.use('/', express....
true
3dbf70d3f0f3504cba1e6aec7173cf904805a8a2
JavaScript
sebastianAcuna/rest-server
/public/js/chat.js
UTF-8
2,821
3.109375
3
[]
no_license
const url = (window.location.hostname.includes('localhost')) ? 'http://localhost:8081/api/auth/' : ''; let usuario = null; let socket = null; //referencias html const textUid = document.querySelector("#textUid"); const txtMensaje = document.querySelector("#txtMensaje"); const ulUsuarios = document.querySelector("#...
true
bf6998c0c68c33cf89275c6c9b46c9c4cf7c74cf
JavaScript
hudawei996/bilibili-1
/src/js/components/IndexContent/IndexContent.js
UTF-8
4,756
2.65625
3
[]
no_license
import React from 'react'; // 插件方法 import ajaxRequest from '../../plugs/ajaxRequest.js'; // ajax请求方法 import createScriptJsonp from '../../plugs/createScriptJsonp.js'; // jsonp请求方法 // 组件 import RecommendVideoContainer from './RecommendVideoContainer.js'; // 推荐视频版块 import LiveVideoContainer from './LiveVideoContainer....
true
855c52b51b12c260e4a7f491b82b9ae5583f11a8
JavaScript
quoctrung1012/C0720G1-TruongQuocTrung
/Module 1/Bai_6_Tong_quan_JavaScript/Thuc_hanh/test_01.js
UTF-8
264
2.703125
3
[]
no_license
function showMessage5() { alert('XIN CHÀO') } function showMessage6(){ document.getElementById("messageDiv3").innerHTML='Xin chào'; } function showMessage7() { document.write('Xin chào!'); } function showMessage8() { console.log('Xin Chào'); }
true
01acf7d82d46a22ce5aee89ddbc427734ff8100d
JavaScript
emoracle/fcc_npm_answers
/mymodule.js
UTF-8
272
2.609375
3
[]
no_license
var fs = require('fs'); module.exports = function (dir, suffix, fn) { fs.readdir(dir, function (err, list) { if (err) fn(err, null); for (var i = 0; i < list.length; i++) { if (list[i].indexOf("." + suffix) !== -1) fn(null, list[i]); } }); }
true
fecf6878144e6f984c230336964312f6a52ebafb
JavaScript
shirley3790/vue_1912
/03vue基础/todomvc/js/app.js
UTF-8
3,765
2.828125
3
[ "CC-BY-4.0" ]
permissive
(function () { 'use strict'; /* 需求: * 列表数据渲染 ok * 没有数据隐藏列表 ok * 添加任务 ok * 删除任务 ok * 编辑任务 ok * 双击label就进入编辑状态:li插入一个input text * 修改任务,按下回车或失去焦点就保存任务:保存的时候如果数据为空就删除该任务 * 修改任务的时候,按下取消esc键,退出编辑状态不保存 * 完成:打钩,控制全选 ok * 点击全选 ok * 显示:未完成。已完成、条数 ok * 清除所有完成项 ok * 数据的持久化存储:刷新数据还在 ok...
true
f1c0db9bd92b1822d2330899f993cae977a2ee05
JavaScript
chaitrans/BridgeLabz-JS-Programming-Constructs
/IfElseProblem/FindMinMax.js
UTF-8
647
4
4
[]
no_license
const arrayOfRandomNumbers = []; for (i = 0; i < 5; i++) { let randomNumber = Math.floor(Math.random() * 899 + 100); arrayOfRandomNumbers[i] = randomNumber; } console.log("Five Randome Numbers are : \n" + arrayOfRandomNumbers); let minimum = arrayOfRandomNumbers[0]; let maximum = arrayOfRandomNumbers[0]; for (i...
true
4c8086b1eb340a33698a26216ca1687f4058e839
JavaScript
meravi23/BookLook
/server/index.js
UTF-8
3,330
3.296875
3
[]
no_license
const fs = require('fs').promises; // a node library that can access files const bodyParser = require('body-parser'); // required in order to read the body of POST const express = require('express'); // the express library enables creating a server const port = 8000; const fileName = 'sellersServer.json'; // with exp...
true
b7e66d34048781728ced7b05dd6df9acfec3e08c
JavaScript
cccc0101/Kata
/queenAttack.js
UTF-8
735
3.515625
4
[]
no_license
let whiteQueen = [0, 5]; let blackQueen = [5, 0]; let board = [[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],]; function generateBoard(first,second){ board[first[0]][first[1]] = 1; board[second[0]][sec...
true
8f002701d6ff9e703bfc4e61792ad21e5b9fd5a7
JavaScript
Fumblemouse/SA-Archiving-Tool
/archive/js/reqmanager.js
UTF-8
924
2.96875
3
[]
no_license
ReqManager = function(options) { this.requests = []; this.options = options; if (this.options.type == null) { this.options.type = "get"; } var Req = function(options) { this.options = options; this.complete = false; if (options.type == undefined) { this.options.type = "get"; } if (options.dataType ...
true
cf7140bd4a56207ac06ce31cd053ec58fa35ff75
JavaScript
HathHub/veutilities
/comandos/blacklist.js
UTF-8
729
2.578125
3
[]
no_license
module.exports = (client, message, args) => { let guild = message.guild const Discord = require('discord.js'); if (!message.member.permissions.has("ADMINISTRATOR")) return message.channel.send( "necesitas permisos" ); const embed = new Discord.MessageEmbed() .setTitle("raiders baneado")...
true
2e02f3253f1c6a0bdb057344b58b6ed02925026e
JavaScript
iqrarasheed-000/javascript2
/app.js
UTF-8
36,691
4.03125
4
[]
no_license
/* //Chapter # 1 "ALERTS"// //(Q1.)// //alert("Hello People!"); //(Q2.)// //alert("Error! Please enter a valid password."); //(Q3.)// //alert("Welcome to JS Land..." +"\n"+ "Happy Coding!"); //(Q4.)// //alert("Welcome to JS Land..."); //alert("Happy Coding!"); //(Q5.)// //conso...
true
b87ecbb796bdd25b84a8bb6f2db283a642f1a31f
JavaScript
God-Father-007/to_do_II
/script.js
UTF-8
8,796
2.515625
3
[]
no_license
let TC = document.querySelector(".ticket-container"); showTickets("all"); function showTickets(filterColor) { let allTaskData = localStorage.getItem("allTasks"); if( allTaskData != null ) { let data = JSON.parse(allTaskData); for( let ticket of data ) { if( filterColor == ...
true
fbb8c2fb212b8f1bf4a5e11c16beb0587337106e
JavaScript
MasamiYamate/fukuoka-emotion-data-api
/utility/fileUtility.js
UTF-8
2,119
3.40625
3
[]
no_license
const fs = require('fs'); module.exports = { createDir: createDir, deleteFile: deleteFile, copyFile: copyFile, dirList: dirList, fileList: fileList, filePathExists: filePathExists, deleteDir: deleteDir } /* ファイル操作のメソッド群 */ //指定したファイルを削除します function deleteFile(filePath) { try { ...
true
811dc09ee39fe0ae29fc5748dcbe6a12bdb19fd1
JavaScript
kvazimode/497391-keksobooking
/js/util.js
UTF-8
2,302
2.703125
3
[]
no_license
'use strict'; window.util = (function () { var formNode = document.querySelector('.ad-form'); var mapNode = document.querySelector('.map'); return { MAIN_PIN_HEIGHT: 84, MAIN_PIN_WIDTH: 62, filterNode: document.querySelector('.map__filters-container'), mapNode: mapNode, template: document.que...
true
2f5e4cef9a34f8f204fce1fe5525ce232e66b8fe
JavaScript
bbliong/skripsi
/frontend/bower_components/global-variable/core/global-data.js
UTF-8
3,401
2.765625
3
[ "MIT" ]
permissive
/** * Created by Rodrigo on 25/01/2017. */ "use strict"; var PolymerGlobalData = (function () { var instance, data, subscribers; /** * Notify to all the subscriber the new value. * A subscriber must implement a _onEvent method. * @param event * @param detail * @par...
true
63e03be423b5ac2cc56f9739924eb945cee51261
JavaScript
crsjs0909/priority-queue
/src/node.js
UTF-8
2,090
3.125
3
[]
no_license
class Node { constructor(data, priority) { this.data = data; this.priority = priority; this.left = null; this.right = null; this.parent = null; } appendChild(node) { if (node === null) { return; } if (this.left === null) { ...
true
edcce8bd8e6620be881c29e88a84a5c4a3070b47
JavaScript
msrikanth508/1day-meeting-app
/src/JS/Dom-utils.js
UTF-8
1,018
3.046875
3
[ "MIT" ]
permissive
class DomUtils { static assignAttrs(ele, props) { Object.keys(props).forEach(key => { if (key !== "children") { if (typeof props[key] === "object") { if (typeof ele[key] !== "object") { ele[key] = {}; } this.assignAttrs(ele[key], props[key]); } else ...
true
29c23d46643d3a5007b92701c9a589b769677818
JavaScript
oriAdler/SuperDuperMarket
/webApp/web/pages/chooseDiscounts/choose_discounts.js
UTF-8
5,533
2.828125
3
[]
no_license
const FIRST_DISCOUNT_LIST_URL = buildUrlWithContextPath("discountsList"); const REFRESH_DISCOUNTS_URL = buildUrlWithContextPath("refreshDiscount"); $(function (){ $("#checkoutButton").click(function (){ window.location.assign("../approveOrder/approve_order.html"); }) }) function ajaxDiscountList(){ ...
true
28827738db903a87739fc739897b9fa3e68e822d
JavaScript
Acalpha/qrcode
/lib/bookmarker.js
UTF-8
3,504
2.640625
3
[]
no_license
//初始化indexdb EtIndexDB = function(){ this.db = null; this.cache = {} } EtIndexDB.prototype = { open: function(callback){ var self = this; var request = indexedDB.open('et-indexeddb-bookmarks', 1); //第一次打开数据库 request.onupgradeneeded = function(e){ var db = e.target.result; //创建对象仓库 if(!db.objectSto...
true
5989ade32ce573f79e6867bced2d7874c2b8647d
JavaScript
adjspecies/presentations
/lib/impress/addclass-addon.js
UTF-8
693
3.078125
3
[ "MIT" ]
permissive
/** * impress.js addclass addon * * This addon adds a requested class to the body on slide change. */ (function(document, window) { const enter = function(evt) { if (evt.target.dataset.addclasses) { const classes = evt.target.dataset.addclasses.split(' '); classes.forEach(d => document.body.classL...
true
fdf0cdfb0e831ea7571db609baaf44ac3e7402d4
JavaScript
pederklev/evolutionSimulator
/Demo/Person/sketch.js
UTF-8
2,374
3.109375
3
[]
no_license
const Render = Matter.Render const engine = Matter.Engine.create(); const world = engine.world; let leggy, boundary; let leftMuscleSlider, rightMuscleSlider, bodyLeftLegMuscleSlider, bodyRightLegMuscleSlider; function draw() { background(54) leggy.leftMuscle.length = leftMuscleSlider.value(); leggy.rightMuscle.leng...
true
baf9ba57d4d8e941767bffd329a28e464c690e32
JavaScript
Jordhan-Carvalho/mincv
/routes/reviews.js
UTF-8
1,133
2.53125
3
[]
no_license
const express = require('express'); const router = express.Router({mergeParams: true}); // GET /posts/:id/reviews INDEX list all reviews router.get('/', (req, res, next) => { res.send("connected to /review"); }); // POST /posts/:id/reviews CREATE create review router.post('/', (req, res, ...
true
fbbb454f44ecc8b570f22a339c47c9f69440e987
JavaScript
jendowns/ibm-security
/src/components/ScrollGradient/__tests__/ScrollGradient.spec.js
UTF-8
5,038
2.515625
3
[ "Apache-2.0" ]
permissive
/** * @file Scroll gradient tests. * @copyright IBM Security 2019 - 2020 */ import React from 'react'; import { mount } from 'enzyme'; // JSDOM hasn't implemented `ResizeObserver` yet, so the mock needs to be moved into a separate file and included before the tested file - https://jestjs.io/docs/en/manual-mocks#mo...
true
388f467680170dd9911de698e9f7314d498a376b
JavaScript
slike100/NBA_APP
/nba_app/src/components/player_component.js
UTF-8
2,118
2.59375
3
[]
no_license
import React from 'react'; import { Button, Modal, ModalHeader, ModalBody, ModalFooter, ButtonDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap'; import { statement } from '@babel/template'; class PlayerModal extends React.PureComponent { constructor(props) { super(props); this.state ...
true
1ab6c4f67462b2ca1f7e87a7942a413d85451810
JavaScript
dian1p/weather-forecast-app
/scr/script.js
UTF-8
6,261
3.015625
3
[]
no_license
function getTemperature(response) { let timeZone = response.data.timezone; let temperature = document.querySelector("#temp"); temperature.innerHTML = `${Math.round(response.data.main.temp)}°C`; let humidity = document.querySelector("#humid"); humidity.innerHTML = response.data.main.humidity; let wind = docu...
true
ad15e6e10449fa93c5bcc8efe519ff09b94866a4
JavaScript
amulyakashyap09/getir-casestudy
/middlewares/inputSanitisation.js
UTF-8
1,413
2.53125
3
[]
no_license
const dateJoi = require("@joi/date"); const Joi = require("joi").extend(dateJoi); /** * This validates the input incoming for the generate records get api * @param {*} req * @param {*} res * @param {*} next * @returns error if found else passes to next click tick */ module.exports.generateRecordApiValidation = (...
true
e051b5fcab6f37196038bbbbb672ad12c1b21416
JavaScript
oswalgopal/javascript-tutorial
/4. comments in js /comment.js
UTF-8
182
3.703125
4
[]
no_license
//to create a one line comment we use "//" // for double line comments we use /* */ //This is a single line comment /* This is a multi line comment */
true
5f7016035f46aafc8f19168047b39d687667438e
JavaScript
julbarg/CV
/src/main/webapp/resources/js/edit.js
UTF-8
4,968
2.625
3
[]
no_license
var waypts = []; var markers = []; var map; var markerManual; var currentMarker; function initialize() { loadMapOrigin(); } function loadMapOrigin() { var lag = document.getElementById("form_admin_edit_service:lat").value; var lng = document.getElementById("form_admin_edit_service:lng").value; var mapCanv...
true
e6ec8c7484cfa4751be772e877aab2c437ae46e1
JavaScript
thehappycheese/bugalisis
/Search Replace Lols.js
UTF-8
422
2.5625
3
[]
no_license
Array.prototype.forEach.call(document.body.querySelectorAll("p,h1,h2,h3,h4,a,td,th"),function(item){item.innerHTML=item.innerHTML .replace(/[Bb]udget/g ,"Bag 'o Dicks") .replace(/[fF]iscal/g ,"Fisting") .replace(/[rR]evenue/g ,"Reaming") .replace(/[dD]ebt/g ,"Lack of Beer") .replace(/[dD]eficit/g ,"Lack of Beer") .rep...
true
88b5a4994da5c2d75ac160f81518046db143481e
JavaScript
WilsonZhang1587/react-ui-library-training
/example/src/pages/DocForm/index.js
UTF-8
7,373
2.515625
3
[]
no_license
import React, { Component } from "react"; import DocumentNavBar from "../../components/DocumentNavBar"; import MainContent from "../../components/MainContent"; import CodeSection from "../../components/CodeSection"; import ComponentSection from "../../components/ComponentSection"; import TableSection from "../../compon...
true
634b9cb94b54af490600f80b7dae9cbf969e94e4
JavaScript
Prince-Mittal/Messenger
/routes/profile.js
UTF-8
2,604
2.515625
3
[]
no_license
const express = require('express') const router = express.Router() const verifyToken = require("./verifyToken"); const Person = require('../models/Person'); // @type GET // @route /profile/ // @desc route for user profile // @access PRIVATE router.get('/', (req, res) => { const tokenRes = verifyToken.val...
true
32acc4dbd732faebccdd4c4c2bd8187bb8435e1f
JavaScript
Al-aminAzad/learning-javascript
/ES6_1.js
UTF-8
1,238
3.578125
4
[]
no_license
// const x=20; // x=25; // console.log(x); // const arr=[]; // arr.push(10); // arr.push(20); // console.log(arr); // let a=10; // if(true) // { // let a=25; // console.log('Indise a= ',a); // } // console.log('Outsie a= ',a); // function demo() // { // { // let x=10; // { // c...
true
18302370d46d4eb39079efc6500306bde65dd118
JavaScript
mcbobby7/TodoList
/components/addTodo.js
UTF-8
1,032
2.5625
3
[]
no_license
class AddTodo extends React.Component { state = { title: '' } onChange = (e) => this.setState ({ title: e.target.value}); onSubmit = (e) => { e.preventDefault(); this.props.addTodo(this.state.title); this.setState({ title: ''}); } render() { return ( ...
true
9cbd0a71f9f64eba394da3603f747b2409283fde
JavaScript
DennisSmolek/js.blend
/source/threejs/blend_three.js
UTF-8
2,157
2.765625
3
[ "MIT" ]
permissive
/*jshint esversion: 6 */ const createMaterial = require("./material.js"); const createTexture = require("./texture.js"); const createMesh = require("./mesh.js"); const createLight = require("./light.js"); const blender_object_types = { mesh: 1, lamp: 10 }; function createObject(blender_file, object) { if (objec...
true
3a10875d82d231c84f0ec0bceed3a978cef4144a
JavaScript
Praveendwivedi/Calorietracker
/cal.js
UTF-8
1,366
3.421875
3
[]
no_license
gen = document.getElementById("genders"); var age = document.getElementById('age'); var bmr = ""; var height = document.getElementById('height'); var weight = document.getElementById("weight"); document.getElementById("btn").addEventListener("click", calculate); function calculate() { if(gen.value=="male"){ bmr = ...
true
cf6aacabb2a8b64be6620bf50515936610a00a1d
JavaScript
fortdev210/mensio-test
/backend/database.js
UTF-8
785
2.828125
3
[]
no_license
const path = require("path"); const sqlite = require("sqlite3"); const dbFilePath = path.join(__dirname, "dev.db"); const createItemsQuery = ` CREATE TABLE IF NOT EXISTS items ( id INTEGER PRIMARY KEY AUTOINCREMENT, content TEXT DEFAULT '' NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, com...
true
50b01eaf3600ca9810b9d0fe1e8a735b3de96088
JavaScript
Dartteon/SeatSpy
/managers/queue_manager.js
UTF-8
8,511
2.5625
3
[]
no_license
/* UNUSED MODULE */ var uuid = require('uuid'); // var config = require('../config.json'); // var twilioClient = require('../twilioClient'); var queue = []; // var clients = []; var currTicketNum = 1; var custClients = {}; var merchantClients = []; var clientIdToTicket = {}; var custIdToClientId = {}; //Maps...
true
855f979794bd4f26679d8b15acab69d9d104cba1
JavaScript
nishantagrahari/nodejs-weather-website
/src/app.js
UTF-8
2,206
2.65625
3
[]
no_license
const geocode = require('./utils/geocode'); const forecast = require('./utils/forecast'); const path = require('path'); const express=require("express"); const hbs=require('hbs'); const port = process.env.PORT || 3000; // making environment variable for heoku and 3000 for local machine. const app=express(); //defi...
true
a9063dd1680a47b2c1a0ba21ac2cefec060e257e
JavaScript
KennyEliasson/TableShuffleWorkers
/scrapers/plScraper-terrikon.js
UTF-8
2,052
2.71875
3
[]
no_license
var request = require('request'); var cheerio = require('cheerio'); function fetchPremierLeague(seasonId) { if(!seasonId) { console.log('SeasonId was undefined'); return; } console.log("Got SeasonId", seasonId); var seasonMatchUrl = "/" + seasonId + "/matches" if(seasonId === "201...
true
a2e677d93bf356dbce9af3a3c452ca7f412fcd7a
JavaScript
luizclr/eloquent-javascript-exercises
/04-data-structures-objects-and-arrays/reversingAnArray.js
UTF-8
537
4.53125
5
[]
no_license
function reverseArray(array) { let result = []; for (const element of array) result.unshift(element); return result; } function reverseArrayInPlace(array) { for(let i = 0; i < Math.floor(array.length / 2); i++) { let temp = array[i]; array[i] = array[array.length - 1 - i]; array[array.length - 1 - ...
true
321527c5924bfd874be006ed87157f19d59e0fd8
JavaScript
Rozen2007/CreativeCanvas
/ParticleGravity/Particle.js
UTF-8
1,517
3.234375
3
[]
no_license
class Particle { constructor(x, y, mass) { this.pos = new Vector(x || random(CANVAS_WIDTH), y || random(CANVAS_HEIGHT)); this.vel = new Vector(0, random(-5, 5)); this.acc = new Vector(0, 0); this.mass = mass || 1; this.maxSpeed = 8; } edges() { if (this.pos.x < 0) { this.pos.x = CA...
true
e90a43526622a55465c03f7d15afcbc372fda828
JavaScript
akhilmurali/ds_algo_js_implementation
/src/mergeSort.js
UTF-8
994
3.71875
4
[]
no_license
function mergeSort(array){ let mid = (array.length)/2; if(mid < 1){ return array; } let sub1 = mergeSort(array.slice(0,mid)); let sub2 = mergeSort(array.slice(mid, array.length)); return mergeHalves(sub1, sub2); } function mergeHalves(leftSubArray, rightSubArray){ let left = 0; ...
true
d188f7c19fc52efa2c682494a2645e0189bab852
JavaScript
savereykjavik/swedishbudget
/getbudget.js
UTF-8
3,556
3.046875
3
[]
no_license
var tree = {"name" : "flare", "children": []}; //an array where each line from the sheet will be stored as an object - rowobj, primobj, secobj var budgetFix = []; var primFix = []; function getbudget(callback) { $.getJSON("https://spreadsheets.google.com/feeds/list/1WkRjZRDN55Esn0v4-Yb63uDMBUpz3ZmpIf-AjUobTZo/1/pub...
true
b4d310f34759044cdb53badf42860702aa293f88
JavaScript
ravieeeee/Eventips
/routes/events.js
UTF-8
5,681
2.640625
3
[]
no_license
const express = require("express") const bodyParser = require("body-parser") const User = require("../models/users") const Event = require("../models/events") const catchErrors = require("../public/javascripts/async-error") const router = express.Router() function needAuth(req, res, next) { if (req.session.user) { ...
true
335ac5a5dd044276cc2670facb38e7838e442ded
JavaScript
WillTisdale/spring-blog
/src/main/resources/static/js/weather_map.js
UTF-8
11,761
2.78125
3
[]
no_license
$(() => { //Map let mapOptions = { accessToken: mapboxToken, container: 'map', style: 'mapbox://styles/mapbox/streets-v11', // stylesheet location center: [-98.5795, 39.8283], // starting position [lng, lat] zoom: 2 } let map = new mapboxgl.Map(mapOptions); ...
true
33c771aac85faf1f18c9e8c3223c6e76c3d49553
JavaScript
juanmiguelRuaDev/date-difference
/test/test.js
UTF-8
2,202
2.921875
3
[ "MIT" ]
permissive
'use strict' var assert = require('assert'); var dateDifference = require('../'); /* Tests the date-difference w/o options set */ describe('date-difference', function() { describe('#dateDifferenceWithoutOptions()', function() { it('returns the difference between the two dates', function() { var date1 = new ...
true
8510f86637b2531949ef04164a0e27e62b9660d0
JavaScript
Antyfeev96/Study-Grokking-Algorithms
/src/01_Binary_search/binary.js
UTF-8
387
3.53125
4
[]
no_license
const binary_search = (list, item) => { let low = 0; let high = list.length - 1; while(low <= high) { const middle = Math.floor((low + high) / 2); const value = list[middle]; if (value === item) { return middle; } else if (value > item) { high = middle - 1; } else { low = mi...
true
b33c2696a23b8d2e3bc78f5bda84d9cabc0d894c
JavaScript
Silchenkoofficial/Silchenkoofficial
/script.js
UTF-8
397
2.765625
3
[]
no_license
function getCookie(name) { var matches = document.cookie.match(new RegExp('(?:^|\s)' + name + '=(.*?)(?:;|$)')); return matches[1]; } if (!getCookie('logged_in') || getCookie('logged_in') == 'no') { alert('Нет куки!'); } if (document.querySelector('.oauth-btn')) { document.addEventListener('clic...
true
babecf91d963c2caebefaec332acc4db09595cf5
JavaScript
frypie16/gpt2-visualization
/index.js
UTF-8
1,705
2.828125
3
[]
no_license
const app = new PIXI.Application({ width: window.innerWidth, height: window.innerHeight, backgroundColor: 0xffffff }); document.body.appendChild(app.view); const infoContainer = document.getElementById('text-info'); const viewport = new Viewport.Viewport({ screenWidth: window.innerWidth, screenHeight: window.in...
true
c3ab096ba84360f0c6f245a89ef040df85f1de36
JavaScript
marcos-suarez/testes-unitarios-js
/diasMeses.js
UTF-8
228
3.078125
3
[]
no_license
var assert = require('assert') var totalDias = function(a){ return a*30; } try { assert.equal(90, totalDias(3),"Deve retornar o total de dias"); assert.equal(60, totalDias(2)); } catch(e) { console.log(e); }
true
f28f6a508304b978531ef9badf5240eed78ab33d
JavaScript
lihanli/spinner_helper
/test/test.js
UTF-8
306
2.546875
3
[]
no_license
(function() { var counter = 0; $(function() { $('#button').click(function() { var spinnerHelper = new SpinnerHelper($(this), 'large'); setTimeout(function() { spinnerHelper.destroy(); $('#output').text(counter); counter++; }, 1000); }); }); })();
true
0f7121c0a856de0b2df9449c322bce080476e778
JavaScript
Daniil-Kudlach/HomeWorks
/JS_Classes/2/app/main.js
UTF-8
2,506
2.53125
3
[]
no_license
import { HtmlElement } from './HtmlElement.js'; const wrapper = new HtmlElement('div'), divChildOne = new HtmlElement('div'), divChildTwo = new HtmlElement('div'), hOne = new HtmlElement('h3'), hTwo = new HtmlElement('h3'), imgOne = new HtmlElement('img'), imgTwo = new HtmlElement('img'), ...
true
1b7b8be3fe4f38ad32de776dc1faca5a31be1d6b
JavaScript
sharpdressedcodes/react-crossword
/src/js/stores/app.js
UTF-8
13,316
2.78125
3
[]
no_license
import { BaseStore } from 'fluxible/addons'; import CellActionTypes from '../constants/cell'; import GridActionTypes, { DirectionTypes } from '../constants/grid'; import CrosswordActionTypes from '../constants/crossword'; import AppActionTypes from '../constants/app'; const { CELL_CLICKED, CELL_TYPED, CELL_NAVIGATED } ...
true
fe0b0490192245895e80b9f1199cfd12e4732017
JavaScript
sankaet/potterAPI
/api/db/seedSpells.js
UTF-8
888
2.59375
3
[]
no_license
const fs = require('fs'); const mongoose = require('mongoose'); mongoose.connect('mongodb://localhost/potterdata/'); const db = mongoose.connection; const Schema = mongoose.Schema; const SpellSchema = new Schema({ name: String, description: String, incantation: String, purpose: String, collections: Array, ...
true
fa9aa7df6b09142cf26075784a17edb19fd8eb21
JavaScript
iO-Academy/2020-feb-numberGame
/main.js
UTF-8
8,752
3.78125
4
[ "MIT" ]
permissive
function shuffleArray(array) { for (let i = array.length - 1; i > 0; i--) { let j = Math.floor(Math.random() * (i + 1)); [array[i], array[j]] = [array[j], array[i]]; } return array; } function arrayCheckEqualsAsc(array) { const ascArray = array.slice(0).sort((a, b) => a - b); for...
true
3fee5c1bcdf17fee6ddb5030ff4d4226c20779fd
JavaScript
maxcamp/sfdx-core
/examples/utils/select.js
UTF-8
383
2.75
3
[]
permissive
const inquirer = require('inquirer'); /** * Simple wrapper around inquirer list prompt */ const select = async (question, options) => { let prompt = inquirer.prompt([ { name: 'answer', message: question, type: 'list', pageSize: '20', choices: options } ]); const { answer }...
true
5f40812c014743a0ca1ec70ce6c7bd928431edf4
JavaScript
crjmosh/rps_js
/assets/javascripts/app.js
UTF-8
4,691
3.46875
3
[]
no_license
var rockChoice = document.getElementById('rock-choice'); var paperChoice = document.getElementById('paper-choice'); var scissorsChoice = document.getElementById('scissors-choice'); var rpsSelect = document.getElementById('rps-select'); var rpsResults = document.getElementById('rps-results'); var rockShow = document.get...
true
e38ff3203949c6e604e61c3861fca5ac0dbc1ba8
JavaScript
RomitGandhi07/JavaScript-Training-MEAN-Stack
/JavaScript/JS-Exercise-5/Task 1/js/login.js
UTF-8
1,990
3.609375
4
[]
no_license
//This function is responsible to check user is registerd or not const alreadyRegistered = userName => localStorage.getItem(userName); //This function is responsible for redirecting to home page based on user role const redirect = (role) => { if (role === "admin") { window.location="./admin/index.html"; } else...
true
e1ee091fd2b56d709e7a96f4cf4dfc96dcf588a6
JavaScript
jharding/beanlogs
/server/routes/user.js
UTF-8
1,330
2.546875
3
[]
no_license
/*globals module */ // module dependencies var User = require('../models').user.Model; var LogEntry = require('../models').logEntry.Model; var userController = module.exports; var TIME = { MS_IN_DAY: 86400000, MS_IN_WEEK: 604800000 }; userController.addLogEntry = function(req, res) { var url = req.body.url; ...
true
a942c44abb86a9e088c48d48ee06f507029cd816
JavaScript
Tutao1995/leetCode
/树/230.二叉搜索树中第k小的元素.js
UTF-8
715
3.328125
3
[]
no_license
/* * @lc app=leetcode.cn id=230 lang=javascript * * [230] 二叉搜索树中第K小的元素 */ // @lc code=start /** * Definition for a binary tree node. * function TreeNode(val, left, right) { * this.val = (val===undefined ? 0 : val) * this.left = (left===undefined ? null : left) * this.right = (right===undefined ? n...
true
6506febf7ce13e234ab42c2b3fb9bc179e4029b1
JavaScript
amiraaIi/1972267_AmirAli_TCSMEANStackTraining
/team-budget-planner/budgetplanner.js
UTF-8
1,783
3.625
4
[]
no_license
// Populating the table with the data from the session storage function populateTable() { var obj = sessionStorage.getItem("budgetInfo"); var data = JSON.parse(obj); var total = 0; data.forEach(element => { insertNewRecord(element); total += parseInt(element.budget); }); v...
true
487eac7377c28bfc0711e1c3ea892c6d8b11b2a3
JavaScript
alquinex/hyf-javascript1
/week2/morescript_1.js
UTF-8
111
2.890625
3
[]
no_license
function sumOf() { let number1 = 2, number2 = 4, number3 = 6; return sum = number1 + number2 + number3; }
true
b2b097f4f9eac1442e8f0c97da10d4c3443e6d21
JavaScript
froglander/week-14-burger
/controllers/burgers_controller.js
UTF-8
1,408
2.96875
3
[]
no_license
// Here is where you create all the functions that will do the routing for your app, // and the logic of each route. var express = require('express'); var router = express.Router(); var burger = require('../models/burger.js'); var moment = require('moment'); // Redirect the root route '/' to /burgers router.get('/', ...
true
73f97ad7d3ed2f1106ff3f0561804ad5447fb09b
JavaScript
GALT-A/corn
/apply.js
UTF-8
529
3.296875
3
[]
no_license
const apply = (count, f, arg) => { let result = f(arg); if (count === 0) { return arg; }; let i = 1; for (i; i < count; i++) { result = f(result); } return result } console.log(apply(2, Math.sqrt, 81)); // 3 console.log(apply(5, v => v + 10, 3)); // 53 console.log('*'); export default apply;...
true
1e544a9455ac4232a8669293642cde3b331fe09f
JavaScript
dodev/demo_player
/js/RegularSearchDemo.js
UTF-8
3,431
2.515625
3
[]
no_license
function RegularSearchDemo (arr, idx) { this.labels = 'elements,compares,status,operation'; this.items = arr.slice (0); this.compares = 0; this.initialItems = arr.slice(0); this.predefinedIndex = idx; } RegularSearchDemo.prototype = new DemoAlgorithm (); RegularSearchDemo.prototype.find = function () { this.scr...
true
fc2d285c15e3d9d0fadc84342bc6adfe30958361
JavaScript
adsantiago/socketio
/src/public/js/chat.js
UTF-8
1,036
3
3
[]
no_license
const socket = io() //console.log('It works'); let user_mes = document.getElementById('user'); let btn = document.getElementById('send'); let message_info = document.getElementById('message'); window.onload = enterpage; btn.addEventListener('click', function(){ socket.emit('message_send', { message: messa...
true
0b06877d5441413a5bd52bb20bf14e717c026c7a
JavaScript
amoorecodes/AlgoAcademy
/TechPrep - Part I Foundations/Javascript/V1.0/Sets/ES6/lib/consoleHook/consoleHook.js
UTF-8
420
2.65625
3
[]
no_license
function consoleHook_initialize() { let output = []; let _cl_ = console.log; console.log = function(value) { output.push(value); _cl_(value); }; return { read: function() { return output.shift(); }, bufferLength: function() { return output.length; }, flush: funct...
true
102c9f6b95a4ea8a44c885fcd80e7bc28bdf0e93
JavaScript
smer007/airtable_timeline_web_exercise_v6
/src/components/Timeline/Timeline.js
UTF-8
2,174
2.6875
3
[]
no_license
import './../../index.css'; import React, { Fragment, useState } from "react"; import Col from 'react-bootstrap/Col'; import Container from 'react-bootstrap/Container'; import Row from 'react-bootstrap/Row'; import Item from './../Item'; import { duration, DurationType } from "./../../utils"; import timelineItems fro...
true
d630c18728e580457e8b1d1836bd24720c908d2d
JavaScript
edyson10/calzado-franchesco
/view/presentacion/js/login.js
UTF-8
2,250
2.6875
3
[]
no_license
/* METODO PARA INICIAR SESION */ $(document).ready(function () { $('#FormLogin').validate({ rules: { user: { required: true }, password: { required: true } }, messages: { user: { required: "Debe de completar los campos." }, password: { required...
true
4e4850e7f31c389b63407fbd67bc139cbd41cbe9
JavaScript
inktechnkikov/JS-Core
/JS Fundamentals/StringsAnRegularExpressions/ReplaceWordInStr.js
UTF-8
138
3.140625
3
[]
no_license
let s = 'I like JS and i am JS fen and JS is nice'; console.log(s); console.log(s.replace('JS','C#')); console.log(s.replace(/JS/g,'C#'));
true
242a31c0bf0441fce1c6561988b384cb96f93760
JavaScript
goalexey/hidden-eateries
/hidden_eateries_react/src/App.js
UTF-8
1,534
2.625
3
[]
no_license
import React, { Component } from 'react'; import './App.css'; import Header from './components/Header'; import Boroughs from './components/Boroughs'; import RestaurantList from './components/RestaurantList'; import Footer from './components/Footer.js'; import axios from 'axios'; const boroughs = { bronx: 1, brookl...
true
6bea9fa0ef8598c164577739211a7b868d2b0720
JavaScript
edawson1980/reactjs-lightbox
/react-lightbox/src/App.js
UTF-8
2,334
2.984375
3
[]
no_license
import React, { useState } from 'react'; import './App.css'; function App() { //set images in state, versus hardcoding const [images] = useState([ //we add arbitrary ids b/c React requires children in a list to each have a unique key. In a WP scenario, these ids will the ids assigned automatically by the WP M...
true
e9184b7d3998b6857323a23eb179f507bf9784cc
JavaScript
joseph-p-pasaoa/exercises-hackerrank-practice--js-py
/ds/arrays/2d-array.js
UTF-8
848
3.375
3
[]
no_license
// 2D Array function hourglassSum(grid) { let maxSum = -Infinity; const H = grid.length - 2; for (let row = 0; row < H; row++) { const W = grid[row].length - 2; for (let col = 0; col < W; col++) { const currentSum = getSum(row, col, grid); maxSum = Math.max(maxSum, currentSum); } } ...
true
8bc9cef81ee236d33a1648470da39640f1356d0a
JavaScript
HongfeiJu/ChannelX
/src/services/PasscodeChecker.js
UTF-8
3,102
2.75
3
[]
no_license
/* description: check one time passcode author: Hongfei Ju date: 10/29/2019 */ import firebase from "firebase"; import fire from "../config/Fire"; import { debug } from "util"; import swal from 'sweetalert'; class PasscodeChecker{ checkOnetimePasscode(channelID, passcode){ return firebase.database().ref(...
true
dcbd2cc8baf07e435cf18b765d717c1ffe21f412
JavaScript
nachobaile/lab-angular-forum
/starter-code/server/bin/seeds.js
UTF-8
1,510
2.515625
3
[]
no_license
const mongoose = require('mongoose'); const Reply=require("../models/reply.model"); const User=require("../models/user.model"); const Thread = require('../models/thread.model'); const dbName = 'forum-development'; mongoose.connect(`mongodb://localhost/${dbName}`); const threads = [ { author: "Juanito", titt...
true
bd1270e2521f2607133c7078b3051a7e73f73eb7
JavaScript
shauvia/sal-cookie-shops
/js/app.js
UTF-8
6,918
3.953125
4
[ "MIT" ]
permissive
'use strict'; function Store(location, maxCustomNum, minCustomNum, averageCookieSale){ this.location = location; this.maxCustomNum = maxCustomNum; this.minCustomNum = minCustomNum; this.averageCookieSale = averageCookieSale; this.dailyCookiesPerHour = []; Store.allStores.push(this); this.cooki...
true
08fa526a12654e2a36b5d6e379a73d1af847460f
JavaScript
comahead/javascript
/study/extjs/extjs.dom.abstractelement.js
UTF-8
111,510
2.640625
3
[]
no_license
/** * @class Ext.dom.AbstractElement * @extend Ext.Base * @private */ (function() { var document = window.document, trimRe = /^\s+|\s+$/g, whitespaceRe = /\s/; if (!Ext.cache){ Ext.cache = {}; } // comahead Ext.define('Ext.dom.AbstractElement', { inheritableStatics: { ...
true
cf720d469539e2a11f1ac7b4c1eb4c92a6e01772
JavaScript
AhmadZuhdi/MiniDotaWar
/bower_components/cookie.js/test/test-cookie.js
UTF-8
5,038
2.9375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
describe('cookie', function() { function MockCookie() { this.value_ = ''; Object.defineProperty(this, 'cookie', { get: function() { return this.value_; }, set: function(value) { this.value_ += (this.value_ && ';') + value; } }); } describe('#get()', function()...
true
53937ddf6a8bc6e21b2e24cec04ee2eaee16994b
JavaScript
sofitek0910/travel-project
/client/src/components/pages/landing/countdown-section.js
UTF-8
2,800
2.890625
3
[]
no_license
import React, { Component } from 'react'; export default class TourCountdown extends Component { constructor(props) { super(props); this.state = { isRemoveInterval: false }; } componentDidMount() { this.countdownTime(); }; countdownTime = () => { ...
true
7eac2bb2efa02aadd0c6becc6d827aeb07bfcb38
JavaScript
akhilesh9201/TI-Generative-art
/bounce particle#2/sketch.js
UTF-8
1,010
3.46875
3
[]
no_license
let p; let q; function setup() { createCanvas(600, 600); p = new Particle(); q = new Particle(); } function draw() { background(220); p.display(); q.display(); p.update(); q.update(); // ellipse(p.posX, p.posY, 100) // ellipse(p.posX, p.posY, 50) } class Particle { constructor() { this.p...
true
4de790f6ce5e5259f3a9e03ca790a4f39d424ee0
JavaScript
MaengDeokyoung/css-canvas-drawing
/dist/landkid/js/animation-utils.js
UTF-8
3,891
2.9375
3
[]
no_license
(function() { function AnimationUtil(){ var that = this; var frame = 0; var duration = 300; var t = 0; var interpolator = function(t){ return t; }; var finalFrame = 30 / 1000 * duration; var startTime; var delay = 0; var re...
true
a73ab12e4bf89f4e1e07b964811930156d2ea0b5
JavaScript
auldsyababua/react-tube
/src/components/video_list_item.js
UTF-8
1,050
2.890625
3
[ "MIT" ]
permissive
import React from 'react'; //passing 'video' is the same as passing props and calling props.video in the return. //you are telling js you want only the video property instead of the entire props object. //Same for onVideoSelect. const VideoListItem = ({video, onVideoSelect}) => { const imageURL = video.snippet.thu...
true
37999c0af7fbca86f3c06d93177e2b54d8a8cd64
JavaScript
lztaoyang/baoxian_crm
/src/main/webapp/js/lib/common.js
UTF-8
28,472
2.75
3
[]
no_license
var vueSetAttribute = function(key,value){ if (typeof(Vue.prototype.lz)=="undefined"){ Vue.prototype.lz = {}; } Vue.prototype.lz[key]=value; } var vueGetAttribute = function(key){ if (typeof(Vue.prototype.lz)=="undefined"){ return; } return Vue.prototype.lz[key]; } String.prototy...
true