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
e08f71c09c184eb639fddb0158a7b49e439309d4
JavaScript
GuacLive/guac-web
/utils/getRandomId.js
UTF-8
559
3.09375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
export default function getRandomId(length){ if(!length){ return ''; } const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; let array; if('Uint8Array' in self && 'crypto' in self && length <= 65536){ array = new Uint8Array(length); self.crypto.getRandomValues(array); }else{...
true
9501ecde08d313be502163697a3786928539d09e
JavaScript
emilkhay/belka-translator
/old_example/data/belkaint.js
UTF-8
3,260
2.84375
3
[]
no_license
"use strict"; var JBelka = function() { console.log(arguments[0]); //---------vars, funcs var GlobalVar = { "true": true, "false": false, "nil": null }; var GlobalFunc = {}; //---------errors var errPrint = function() { if(arguments.length > 0) { var e = [ "Не верный код программы.", "Не верно...
true
146d0ee515c675b67d2f3d19a333dea44cbcdbb6
JavaScript
RobertTate/Chirper-Full-Stack-Project
/client/src/components/ChirpsID.jsx
UTF-8
1,800
2.53125
3
[]
no_license
import React, { Component, Fragment } from 'react'; import { BrowserRouter as Router, Route, Switch, Link } from 'react-router-dom'; class ChirpsID extends Component { constructor(props) { super(props); this.state = { text: "" } } componentDidMount() { fetch("...
true
7315f07d513e0a4f108ff4cd3e948df108b7d586
JavaScript
lvjiaming/bishexiangmu
/client/xxl/assets/Scripts/Common/GameControl.js
UTF-8
19,425
2.640625
3
[]
no_license
/** * 游戏控制中心 * @type {Function} */ const GameControl = cc.Class({ statics: { getInstance() { if (!this.control) { this.control = new GameControl(); } return this.control; }, }, _GameNode: null, // 游戏节点,会在游戏初始化赋予 _CurSelectItem: nul...
true
c0b46d56c2ea8eaca40b261171d88ee1779be1c0
JavaScript
IntriguingTiles/hgrunt-bot
/commands/garfield.js
UTF-8
6,185
2.515625
3
[ "MIT" ]
permissive
const moment = require("moment"); const snekfetch = require("snekfetch"); const cheerio = require("cheerio"); const FileType = require("file-type"); const { Client, ChatInputCommandInteraction, AttachmentBuilder } = require("discord.js"); // eslint-disable-line no-unused-vars const { SlashCommandBuilder } = require("@d...
true
964e1e43f4057cc7da93e22561fb2a5501b345fc
JavaScript
destromon/Scripting
/api/classes/routing.js
UTF-8
5,115
2.765625
3
[]
no_license
module.exports = (function() { var c = function() {}, public = c.prototype; var mimeTypes = { '.js' : 'text/javascript', '.html': 'text/html', '.css' : 'text/css' }; var url = require('url'), fs = require('fs'), path = require('path'); var _dir = '...
true
15642a0218e78af8f72f6c28837a27ed1a6f8144
JavaScript
augustinebest/augustinebest.github.io
/register.js
UTF-8
1,448
2.9375
3
[]
no_license
const button = document.getElementById('button'); button.addEventListener('click', (e) => { e.preventDefault(); const username = document.getElementById('username').value; const password = document.getElementById('password').value; const email = document.getElementById('email').value; const co...
true
fdf0cae287562ed09a6beffe96f80c53aa5f568d
JavaScript
treejames/Test-2
/uni/Public/themes/default/js/time.js
UTF-8
1,751
2.96875
3
[]
no_license
// JavaScript Document function UpdateClocks(){ //当地时间 d = new Date(); localTime = d.getTime(); //中国格式 var cn_year = d.getFullYear() ; var cn_month = d.getMonth() + 1 ; var cn_day = d.getDate() ; var cn_hour = d.getHours() ; var cn_minute = d.getMinutes() ; var cn_second = d.getSeconds() ; var cn...
true
b74b88c70551e2d941540fd6a430fe3734433e06
JavaScript
kjgalvan/measurement-library
/src/storage/CookiesInterface.js
UTF-8
2,623
2.5625
3
[ "Apache-2.0" ]
permissive
goog.module('measurementLibrary.storage.CookiesStorage'); /** * An implementation of StorageInterface that uses cookies for storage. * @implements {StorageInterface} */ class CookiesStorage { /** * @param {!Object.<string, string|number|boolean>} settings an object * holding the settings to be set on t...
true
20a0f1f022321dc17457663da500c666f6330295
JavaScript
thecluff/CompressionVisualizer
/script.js
UTF-8
4,462
2.796875
3
[]
no_license
var canvas = null; // Waveform canvas var ctx = null; var ratio = 1; var thr = 1; var sig = null; var wet = null; var gainred = null; var sigsz = 320; //=================================== function init(){ canvas = document.getElementById("waveform"); ctx = canvas.getContext("2d"); makeSig(); compress(); ...
true
bf360d22e95c8711d3a242efde3fe6b7e4120c8c
JavaScript
davefax/capella-tray
/src/upload-image.js
UTF-8
1,442
2.609375
3
[ "MIT" ]
permissive
const Capella = require('@codexteam/capella-pics'); const { shell } = require('electron'); const ncp = require('copy-paste'); const fs = require('fs'); const showNotification = require('./notification'); /** * Upload local image to Capella, copy url and show notification * @param {string} imagePath * @param {boolea...
true
a02c445f806aedc2608d38bc61dfd13d7e33f635
JavaScript
htekgulds/tuts-meteor-cardgame
/app/gameCreation.js
UTF-8
1,586
3.046875
3
[ "MIT" ]
permissive
GameFactory = {}; GameFactory.createGame = function (playerIds) { var deck = createDeck(), players = createPLayers(playerIds); GameFactory.dealPlayers(players, deck); var table = dealTable(deck); return { deck: deck, players: players, table: table, currentTurn...
true
6d61734f1d81dc0a139afa230b5a93ae1071a0e6
JavaScript
ashikprodhan/first-node-js-project
/index.js
UTF-8
257
2.609375
3
[]
no_license
//Life first node js project . Date : 23March 2021 const express= require ('express') const app =express() app.get('/',(req , res)=>{ res.send("Thank you for calling me again lovely baby") }) app.listen(4200,()=>console.log("Listening to port 3000"))
true
4e70f8c6e1d0f955a04fb86ce0ec7221e541d75a
JavaScript
JanKid/utils
/src/event.js
UTF-8
1,589
2.796875
3
[]
no_license
/* * author: Jankid * email: gaojianlin.1989@gmail.com * date: 2017//07/21 */ /** * 添加元素事件的简单封装 * @method addEvent * @param { el ,event, fn, capture} */ export function addEvent(el, event, fn, capture = false) { if (!(Array.isArray(el) || el.constructor === NodeList)) el = [el] if (document.addEventLis...
true
afa5c99f269981f1f025030c993ab11a8ff89d5f
JavaScript
mefive/bitcoin-quant-trade-web-fe
/source/js/reducers/modal.js
UTF-8
786
2.515625
3
[]
no_license
import { handleActions } from 'redux-actions'; import * as actionTypes from 'config/actionTypes'; const initialState = { queue: [], current: null }; export default handleActions({ [actionTypes.PUSH_MODAL]: (state, { payload }) => { const queue = [...state.queue]; queue.push(payload); let { curren...
true
16d4b93067bd2a65adffe44a16504b403f34f533
JavaScript
peterson-dev/itunes-search
/script.js
UTF-8
1,491
2.875
3
[]
no_license
$(document).on('keypress', function (event) { if (event.originalEvent.code === 'Enter') { searchSongs() } }) $('.search button').on('click', searchSongs) function searchSongs () { let inputContents = $('.search input').val() let queryType = $("input[name*='query']:checked") $.ajax({ url: `https://it...
true
1223f05632366926e42c20d97500410746a3f33d
JavaScript
bobbylbc/shipyard-audit-server
/class/__tests__/baseClass.spec.js
UTF-8
5,146
3
3
[]
no_license
/* eslint-disable max-classes-per-file */ import BaseClass from '../baseClass' class TestClass extends BaseClass { constructor(id) { super() this.id = id this.setDefinedKeys() } } class MasterTestClass extends BaseClass { constructor(course, courseName, test) { super() this.course = course this.course...
true
e07ad2a3ac035c02de9742db6c60f0081297add3
JavaScript
qgr/qjb-qexec-array
/src/qjb-qexec-array.js
UTF-8
5,557
2.75
3
[ "MIT" ]
permissive
// Quijibo Query Executor for JavaScript Arrays. Given an Array to be queried, // this Executor interprets Quijibo Query Trees and returns result rows in // Arrays. define(function (require) { var _ = require('underscore'); // exports return { expand_meta: expand_meta, execute_query: execute_query, ...
true
cdfe7f49465c5a607d8b79184173ba1ccec4ba36
JavaScript
deundrewilliams/cs2-grade-calc
/script.js
UTF-8
3,583
3.078125
3
[]
no_license
class Gradebook { constructor(syllabus_quiz, cl, eustis, assignments, exams, exit_survey) { this.syllabus_quiz = syllabus_quiz; this.cl = cl; this.eustis = eustis; this.assignments = assignments.sort((a, b) => b - a); this.exams = exams; this.exit_survey = exit_survey...
true
95ce4e8b0aa0dd715cf3fac6b01508bc500a80d8
JavaScript
fredosantana/intake_central
/scripts/dashboard.js
UTF-8
2,190
2.71875
3
[]
no_license
// For Program portion of dashboard const CCVPAmount = document.querySelectorAll('.CCVP'); const CCVPLength = CCVPAmount.length; const CCVPMessage = document.querySelector('#CCVP'); CCVPMessage.innerHTML = `CCVP = ${CCVPLength}`; const FUPAmount = document.querySelectorAll('.FUP'); const FUPLength = FUPAmount.length;...
true
9295f376e934175a25dd65a18942ed83836e8fc7
JavaScript
davidav/newesom_layot
/#src/js/scroll.js
UTF-8
697
2.671875
3
[]
no_license
$('a[href^="#"], a[href^="."]').click(function () { // если в href начинается с # или ., то ловим клик var scroll_el = $(this).attr('href'); // возьмем содержимое атрибута href $('html, body').animate({ scrollTop: $(scroll_el).offset().top }, 500); // анимируем скроолинг к элементу scroll_el // $('nav ul')....
true
17a3eafd070a866e898e3d81863b97c3a578dd43
JavaScript
rtikhomirov/GuessGame
/src/App.js
UTF-8
5,249
2.75
3
[]
no_license
import React, {Component} from 'react'; import Board from './components/Board'; import 'bootstrap/dist/css/bootstrap.css'; import { Button } from 'reactstrap'; import ArrowsContainer from "./components/ArrowsContainer"; class App extends Component { constructor(props) { super(props); this.state = {...
true
94051f9cee625be681fbbcee2da19502b3bec000
JavaScript
przemyslaw-chudzinski/custom-select
/src/spec/dom-factories/createElement.spec.js
UTF-8
2,274
2.859375
3
[]
no_license
const { createElement, } = require('../../dom-factories'); describe('dom-factories.js', () => { describe('createElement function', () => { it('should throw exception when classes attribute is not array', () => { expect(() => createElement('test')).toThrow(); }); it('shoul...
true
ecd8a625a9dc5c7cd6a5a015dbb6cc01b1d740e2
JavaScript
TatyanaLukashevich/EPAM.JS.2016S.Lukashevich
/day4/scripts/plant.js
UTF-8
214
2.6875
3
[]
no_license
var Plant = function($line, position){ this.position = position; var $field = $("#field"); var $plant = $("<div class='plant'></div>"); $plant.css('margin-left', 900 - this.position); $line.append($plant); }
true
dc5da2e51414a6427101b1ae5e4c1ec5b3cd38ef
JavaScript
Fadymbt/cloudfirebase
/public/javascripts/registerJQuery.js
UTF-8
867
2.625
3
[ "MIT" ]
permissive
$(document).ready(() => { $('#email').focus(() => { console.log("Ana abl el ajax!"); let userName = $('#userName').val(); $.ajax({ type: 'POST', url: '/users/checkUserName', data:{ userName: userName }, success: func...
true
25e9fde75b2def954e4813b68bd563c1e319b18c
JavaScript
jdog163/chatv2
/controllers/UserController.js
UTF-8
6,479
2.75
3
[]
no_license
/** * UserController Class. * * Adds routing middleware for all user functionality. * Includes simple Facade methods for Firebase transactions * such as login and register. * * @class * */ class UserController{ /** * Instantiates class, calls method to set * required session variables * ...
true
b976852e47f1665eeaa986db2739188f4b60d656
JavaScript
Delepha/COMFORT
/artifact_evaluation/data/codeCoverage/die_generate/937.js
UTF-8
232
2.734375
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
function one() { ; } ; function two() { /\u1e32/iu.exec("")[0]; undefined; } function three() { one("", "", "", "", String.prototype.toUpperCase.call("" + ""), ""); two(); } for (var i = 0; i < 10; --i) { three(); }
true
dc85d7460ec5d6a5217400b84b2ce5c3e3965640
JavaScript
agSwift/SitMe
/functions/models/timeout/break.js
UTF-8
1,565
2.75
3
[]
no_license
const time = require("../../utils/time"); const { BOOKINGS } = require("../../utils/constants"); const callbacks = {}; const onStartup = (server, seats) => { const bookings = server.fetchDatabase().ref(BOOKINGS).get(); Object.entries(bookings).forEach(([userId, value]) => { // Check if break information exis...
true
ed1c31c4508cde920875e7ad8b612a0bc4f4a0c1
JavaScript
jegelstaff/kaichronicles
/src/www/js/controller/workWithBooks.js
UTF-8
8,065
2.640625
3
[ "CC-BY-3.0", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "MIT" ]
permissive
/** * Handle / download books (only for Cordova app) */ var workWithBooksController = { /** Are we currently downloading / deleting books? */ changingBooks: false, /** * Has been the download process cancelled? */ processCancelled: false, /** * All runned processes are ok? ...
true
5a01ae699c67d083172dc79234f57878a12b8a64
JavaScript
tpatora/satel-integra-integration-protocol
/crc.js
UTF-8
412
2.6875
3
[ "MIT" ]
permissive
class Crc { constructor() { this._crc = 0x147a; } addByte(byte) { this._crc = (this._crc << 1) + (this._crc >> 15); this._crc ^= 0xffff; this._crc &= 0xffff; this._crc = this._crc + (this._crc >> 8) + byte; this._crc &= 0xffff; } addBytes(bytes) { bytes.forEach((value) => this.ad...
true
3f342bf3d63054716686372a067b2d1a6cd66db7
JavaScript
Serendipias/upodi-js
/src/UpodiApi.js
UTF-8
1,295
2.53125
3
[ "MIT" ]
permissive
`use strict`; const ApiError = require('./UpodiApiError') const CustomerService = require('./CustomerService') const https = require('https') module.exports = class UpodiApi { constructor(apiKey = null) { if (!apiKey) { throw new ApiError('Missing Api Key for Upodi') } this.__apiKey = apiKey ...
true
61c57b99fff59583f8fb5b240e44c6cb3ba0e4fa
JavaScript
step-off/react-pwa
/src/services/OfflineRequestsDatabase.js
UTF-8
1,452
2.6875
3
[]
no_license
import localforage from 'localforage'; export default class OfflineRequestsDatabase { static _db = null; static _databaseName = `${window.location.host}-offlineDB`; static _storeName = 'requestsStore'; static async initDB() { if (this._db) { return; } const db = await localforage.createInstance({ name...
true
2678727ac69854d4a8fce6a643bef890a5950eae
JavaScript
hronks/js
/resources/js/script1.js
UTF-8
5,046
2.9375
3
[]
no_license
// generic functions function add_line_break(divID) { var new_line = document.createElement("br"); document.getElementById(divID).append(new_line); } function add_sel_field(divID, title, fieldID) { document.getElementById(divID).append(title); var field = document.createElement("select"); field.setAttrib...
true
83ef297bd1e1b3a11de8edd5441e6cfca2fedda6
JavaScript
zhengshizhao/set
/set.js
UTF-8
5,562
4.09375
4
[]
no_license
// Task 1: Each card has symbols on it that vary across four dimensions: color, number, shape, and shading. There are three possible values per dimension (e.g. there are three possible colors: red, green, and purple). Start by writing a solver that takes in a collection of these cards (e.g. 9 cards, 12 cards, 15 cards,...
true
d098391be0759156e05000d82f9fedee86b70634
JavaScript
nigelgomesot/dsap
/algorithms/math/factorial/factorial.test.js
UTF-8
695
3.03125
3
[]
no_license
import * as Factorial from './factorial.js'; describe('Factorial', () => { it('computes factorial iteratively', () => { expect(Factorial.iterative(0)).toBe(1); expect(Factorial.iterative(1)).toBe(1); expect(Factorial.iterative(2)).toBe(2); expect(Factorial.iterative(3)).toBe(6); expect(Factorial.iterative(...
true
7a024b2cc52690e22a08de5c1aa3e7253966ed80
JavaScript
ninoch3n/platformer
/player.mjs
UTF-8
605
3.484375
3
[]
no_license
export default class Player{ constructor(){ this.X = 0; this.Y = 0; this.size = 100; this.color = 'rgb(0,0,0)' this.speed = this.size; } drawPlayer(context){ context.fillStyle = this.color; context.fillRect(this.X, this.Y, this.size, t...
true
a375feaf570a7f327dd0339a1a2b30a5a1e546c4
JavaScript
busy-web/utils
/tests/unit/local-storage-test.js
UTF-8
2,528
2.703125
3
[ "MIT" ]
permissive
import { module, test } from 'qunit'; import { LocalStorage } from '@busy-web/utils'; module('Unit | Utility | LocalStorage'); // Replace this with your real tests. test('it works', function(assert) { assert.ok(LocalStorage); assert.ok(LocalStorage.setProperty); assert.ok(LocalStorage.getProperty); assert.ok(...
true
5df3fdc1a6c0f57408b1a145ffba034383e3bfac
JavaScript
YozoraNoHoshi/Hack-Or-Snooze
/api-classes.js
UTF-8
6,447
3.265625
3
[]
no_license
const BASE_URL = 'https://hack-or-snooze-v2.herokuapp.com'; // Current Prgoress: Start of Step 6 class StoryList { constructor(stories) { this.stories = stories; } static getStories(cb) { $.getJSON(`${BASE_URL}/stories`, function(response) { const stories = response.stories.map(function(story) { ...
true
4eeef542166bb040551dd6257212e6f6a4257b8a
JavaScript
KaChr/14-fullstackjs-idea
/client/src/actions/authActions.js
UTF-8
2,471
2.84375
3
[]
no_license
// Promise-based HTTP client import axios from 'axios'; // Token decode import jwt_decode from 'jwt-decode'; // import action type variabel import { GET_ERROR, SET_CURRENT_USER, UPDATE_PASSWORD } from './types'; // Token for header import authToken from '../utils/authToken'; // React dependency for notifications import...
true
cff4cd92220b2931bd461b1512dcc662ce255f91
JavaScript
MuhammadAlaminMir/Javascript
/16.Asynchronous-Javascript/3.Problem.js
UTF-8
1,410
4.9375
5
[]
no_license
//For Asynchronous system Sometimes we have got some problem //like Sometime we have called function and store it in a variable and when we console.log that variable //it gives us output undefined //its happened Because of asynchronous system //Because when we storing a data in database it will take time but when we...
true
4fac4f252226b2ecda24b9e97bc6cba1e0072f54
JavaScript
sympmarc/SPServices
/src/utils/SPXmlToJson.js
UTF-8
10,496
2.640625
3
[ "MIT" ]
permissive
define([ 'jquery', '../utils/constants', '../core/SPServices.utils' ], function ( $, constants, utils ) { "use strict"; // This function converts an XML node set to JSON // Initial implementation focuses only on GetListItems $.fn.SPXmlToJson = function (options) { var ...
true
b388e6f473e95d6a74c3c2f363181889362ebdba
JavaScript
eker247/eco-game
/src/logic/stages/house/house.service.js
UTF-8
4,775
2.78125
3
[]
no_license
"use strict"; var __spreadArrays = (this && this.__spreadArrays) || function () { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a...
true
10f99c197f0d50ec988cda2b9469e5b27d9e03f2
JavaScript
arpneto2005/CRUD-JS-Puro
/recebidados.js
UTF-8
3,418
3.359375
3
[]
no_license
function soNumero(str) { //Função que devolve apenas os números de uma string str = str.toString(); return str.replace(/\D/g, ""); } function rec(){ var nomeTag = document.getElementById ('nome'); document.getElementById('return').innerText = 'Tag: ' + nomeTag; } function valida(){ // Função que rece...
true
3f1f158ee5cd45cc9cf16e08ae176846a742a8d0
JavaScript
N1ght02/Arrays2
/javarray.js
UTF-8
761
3.0625
3
[]
no_license
var klas = ["Jochem", "Joshua", "Robbe", "Mathijs" , "Yeno" , "Osman" , "Gio" , "Kevin" , "Mike" , "Flint" , "Taurece" , "Sohil" , "Lennard" , "Nanne" , "Lloyd" , "Delivio" , "Jordan" , "Job" , "Wiebe","Andre","Gijs","Tolga","Mark","Pelle","Sed",]; var lijst = document.getElementById('Lijst') let x = 1; funct...
true
650a39dca6a145055a9bcd5a2f05fa04b6849623
JavaScript
YUW349/NSNS
/routes/input.js
UTF-8
2,926
3
3
[ "MIT" ]
permissive
var data = require('../public/tasks.json'); exports.addNewTask = function(req,res){ var taskname = req.query.taskname; var date1 = req.query.date1; var date2 = req.query.date2; var date3 = req.query.date3; var time = req.query.time; var time2 = req.query.time2; var time3 = req.query.time3; var lo...
true
58451e2aedb0f3e8d285b6476222c8359a85db2a
JavaScript
donjude-eng/Javascript-Puzzle
/Js-basics-puzzles/puzzle-1.js
UTF-8
195
2.5625
3
[]
no_license
function sayHi() { helloMark(); } function helloMark() { console.log("hello Mark"); } function helloWilliam() { console.log("hello William"); } sayHi(); sayHi(); sayHi(); sayHi();
true
fe28d5cf6a0b774071955f4bff80701a91225ba3
JavaScript
sagban/SymCheck
/lambda_functions/possibleCases/db.js
UTF-8
3,029
2.609375
3
[]
no_license
const AWS = require('aws-sdk'); let documentClient = new AWS.DynamoDB.DocumentClient({ 'region': 'us-east-1'}); module.exports = class DB { get(key, value, table) { if (!table) throw 'table needed'; if (typeof key !== 'string') throw `key was not string and was ${JSON.stringify(key)} on table ${...
true
42eb2d6ce7cf6251dbad85c04ba83a4ac889fb35
JavaScript
notslang/npms-analyzer
/cli/util/stats/queue.js
UTF-8
867
2.6875
3
[ "MIT" ]
permissive
'use strict'; const log = require('npmlog'); /** * Continuously monitor the queue, printing information such as the number of enqueued messages. * * @param {Queue} queue The queue instance */ function statQueue(queue) { // Do nothing if loglevel is higher than stat if (log.levels[log.level] < log.level.st...
true
ef5c5168290f137042394e97987ba6cc07e3277e
JavaScript
Suniron/pokedex-for-my-son
/components/Pokedex.jsx
UTF-8
2,167
2.859375
3
[]
no_license
import React, { useEffect, useState } from "react"; const Pokemon = (props) => { const [imgUrl, setImgUrl] = useState(); // Effet pour aller chercher l'image du pokemon sur internet via une API: useEffect(() => { fetch(props.url).then((response) => response.json().then((body) => setImgUrl(body.sprites...
true
10381a86908a6ce1d310f66718b187360854ce53
JavaScript
sergiorap20/client
/src/components/form/index.js
UTF-8
1,160
2.734375
3
[]
no_license
import React, { useState} from 'react'; import './style.css'; function Form(props) { const [name, setName] = useState(""); const [bundle, setBundle] = useState(""); const [nameCorrecto, setNameCorrecto] = useState(false); const [bundleCorrecto, setBundleCorrecto] = useState(true); const validateN...
true
600a0f23d325aac0846cfe8d54c0c482b7444dcc
JavaScript
limousyf/paytoolsweb
/decoding.js
UTF-8
4,099
3.546875
4
[]
no_license
/** * Takes in input a JSON object formatted a number of bytes as follow * { * byte1 : [], * byte2 : [], * ... * bytenbBytes : [] * } * and translate the content as human readable * */ function translateByteList(byteListObject){ var interpretedByteList = "" console.log("Translating " + byteListObjec...
true
105a5fd13f7aa72588255c0319e05a331e15886c
JavaScript
1793523411/my-mian-note
/code/js/js实现reduce/index.js
UTF-8
535
2.71875
3
[]
no_license
Array.prototype.reduce = function (callbackFn, initialValue) { let O = Object(this) let len = O.length >> 0; let k = 0; let accumulator = initialValue; if (accumulator === undefined) { for (; k < len; k++) { if (k in O) { accumulator = O[k]; k++; ...
true
62be6dacd6b2cbe65b534d45d534072946d8f707
JavaScript
gquan1402/WebRuouVang
/src/utils/convertTime.js
UTF-8
1,138
2.8125
3
[]
no_license
import moment from 'moment' export const getTimeNow = () => { return moment(new Date()).format('DD-MM-YYYY HH:mm:ss') } export const unixToTime = time => { return moment(new Date(time * 1000)).format('DD-MM-YYYY HH:mm:ss') } export const unixToDateMonthYear = time => { return moment(new Date(time * 1000)).format(...
true
f2de0348e5e4bcef5a8148f1a19821c7c6f6abcc
JavaScript
gofish1234/plotly-challenge
/app.js
UTF-8
3,039
3.015625
3
[]
no_license
function buildMetadata(sample) { // @TODO: Complete the following function that builds the metadata panel var defaultURL = `/metadata/${sample}`; // var myData = sample_metadata; //var tbody = d3.select("sample-metadata"); // tbody.html("") d3.json(defaultURL).then(function(sample) { var tbody = d3.se...
true
df21c6fdb05834e28968f5efad20ac7e6f673d8a
JavaScript
KeerthanaP/Health-Care-Project-SSN-2015
/healthcare/WebContent/scripts/approveDoc.js
UTF-8
2,522
2.59375
3
[ "Apache-2.0" ]
permissive
function myselected(res) { var chkbox = document.forms[0]; var txt = ""; var i; for (i = 0; i < chkbox.length; i++) { if (chkbox[i].checked) { txt = txt + chkbox[i].value + " "; } } document.getElementById("approvedDoctors").value=txt; var line ...
true
ace405d82200c33c6868bb08b850205f0378fdc4
JavaScript
YC-Yuan/SOFT130002_project
/src/js/linkedFilter.js
UTF-8
2,273
3.234375
3
[]
no_license
//拿到国家筛选框,给予事件绑定函数 let countrySelect = document.getElementById('selectCountry'); let citySelect = document.getElementById('selectCity'); countrySelect.addEventListener("change", linkCity, false); //修改filterButton的链接 let contentSelect = document.getElementById('selectContent'); let filterButton = document.getElementByI...
true
36b864dfe6ac26591eb230dd80fce3e568252897
JavaScript
brystmar/breadsheet-ui
/src/helpers/convert_text_functions.js
UTF-8
2,562
3.3125
3
[]
no_license
// Helper functions for the text conversion components export function convert_text_using_provided_list(text, replacementList) { // Accepts a text string and a list of object replacements (old & new values) // Returns a modified string if (!replacementList) { return text; } for (let i = 0...
true
a207826b8664144f146f0a0e271235762ea708fc
JavaScript
Kodehawa/Meiko
/commands/info/help.js
UTF-8
1,040
2.6875
3
[ "Apache-2.0" ]
permissive
const Command = require("../base/command"); const Category = require("../base/category"); module.exports = class Ping extends Command { constructor(){ super({ name: "help", category: Category.type.INFO }) } async execute(meiko, content, context){ let co...
true
7a8a9d7c6013b31b60778899a44e7494828f9c20
JavaScript
bitfinexcom/bfx-api-node-models
/lib/account_summary.js
UTF-8
3,358
2.5625
3
[ "MIT" ]
permissive
'use strict' const numberValidator = require('./validators/number') const arrayValidator = require('./validators/array') const objectValidator = require('./validators/object') const Model = require('./model') const fields = { trade_vol_30d: [5, 0], fees_trading_30d: [5, 1], fees_trading_total_30d: [5, 2], fee...
true
09708269f4a3116c1d73899d76a9a509277643d5
JavaScript
adamgruber/aoc2020
/src/10-alt.js
UTF-8
1,286
3.171875
3
[]
no_license
const vm = require('./vm'); const sample = `16 10 15 5 1 11 7 19 6 12 4`; const dataTransformer = data => data.split('\n').map(parseFloat); // .sort((a, b) => a - b); const { data } = vm({ inputFile: '10.txt', dataTransformer, }); const sampleInput = dataTransformer(sample); function buildAdjacencyMatrix(i...
true
4854c78c1991b922d7b158435c0f7366f5456773
JavaScript
DenVdmj/apng-chrome
/stop-list.js
UTF-8
503
2.765625
3
[ "MIT" ]
permissive
/** * URL, которые не проверяем ни при каких условиях * * @param url * @return {Boolean} */ var inStopList = function (url) { var res = [ /^https?:\/\/mts\d\.google\.\w+\//, /^https?:\/\/\w+\.gstatic\.\w+\//, /^https?:\/\/[\w.]+\.tiles\.virtualearth\.net\//, /^https?:\/\/\w+\.ma...
true
e412bade51b10848a97c49aa5528aa7c33b7a596
JavaScript
akshayganesh09/libraryapp123
/src/routes/authorrouter.js
UTF-8
1,261
2.546875
3
[]
no_license
const express = require('express'); const authorsRouter = express.Router(); function router(nav){ var authors = [ { title : 'tom and jerry', author : 'joseph barbera', genre : 'cartoon', img : "joseph.jpg" }, { title ...
true
77b10790fd9127819a90c69ae317b6cd03acbc8c
JavaScript
nimiq/core-js
/src/test/specs/generic/consensus/base/primitive/PublicKey.spec.js
UTF-8
3,869
2.671875
3
[ "Apache-2.0" ]
permissive
describe('PublicKey', () => { it('is serializable and unserializable', () => { const pubKey1 = KeyPair.generate().publicKey; const pubKey2 = PublicKey.unserialize(pubKey1.serialize()); expect(pubKey1.equals(pubKey2)).toEqual(true); expect(pubKey1.serialize().byteLength).toEqual(pub...
true
b484189ce3c935d5a2f4a41a217adbb5efaa16aa
JavaScript
redice44/fractions
/fractions.js
UTF-8
6,321
3.609375
4
[]
no_license
var NUMERATOR = 0; var DENOMINATOR = 1; var MAX_NUMERATOR = 48; var MAX_DENOMINATOR = 12; function newFractions() { return _generateFraction(); } function displayReducedFraction(dom, fraction) { dom.html('<h1>Reduced Fraction</h1>' + _displayFractions(fraction)); } function _generateFraction() { var fraction =...
true
ae3506ed8d1a9cc6176f672995be4fabe51a7a4b
JavaScript
truth1492/Jason_Seo_MEAN_Stack
/Phase 3/connect-mongodb/model/course.model.js
UTF-8
507
2.75
3
[]
no_license
// Load the module let mongoose = require("mongoose"); mongoose.pluralize(null); // To avoid creating in lower case with s postfix // Create the Schema let courseSchema = mongoose.Schema({ _id : String, cname : String, desc : String, amount : String }); // Using schema creating model // 1st paramete...
true
29dfe536def859ae6bd49339d0b133d8d3d80f83
JavaScript
Krafalski/GA-NYC-Bowie
/w08/d02/instructor/bottleSong.js
UTF-8
790
4.25
4
[ "MIT" ]
permissive
/* Iterative vs recursive functions */ /* @author Jason Seminara */ /* @date 2016-03-08 */ function bottleSong(i){ switch (i){ case 0: return `celebration` case 1: return `${i} bottle` default: return `${i} bottles` } } // iterative approach var i = 99; var bottleLyrics = []; w...
true
e65db466bc6edc8b379b7ccf8ab1d8ae4642e7b5
JavaScript
christinto/E2E
/imports/ui/MessageBox.jsx
UTF-8
4,228
2.875
3
[]
no_license
import React, {Component} from 'react' /** * Message box to write message */ export default class MessageBox extends Component { /** * Constructor initializes known accounts * @param {Object} props - properties from parent */ constructor(props) { super(props) this.state = { ...
true
4dbefaaac4720fec7715f4d32280f777a7b0a0fc
JavaScript
GayathriS98/fl-interactive-form
/src/js-es3/input-types/text-input.js
UTF-8
1,955
2.859375
3
[]
no_license
import { trimSpaces, createErrorMessage, removeErrorMessage } from '../utils'; const textInputTypes = { TextArea: { type: 'text', regex: /\w{2,}/, error: 'This field must be filled', }, TextBox: { type: 'text', regex: /\w{2,}/, error: 'This field must be filled', }, EmailBox: { ty...
true
27549eec423556583252cab5ab41e5f5bbe3c26c
JavaScript
brochj/dietApp
/src/library/components/ChangeCalories.js
UTF-8
3,542
2.78125
3
[]
no_license
import React, { Component } from "react"; import { StyleSheet, Text, View, TouchableOpacity } from "react-native"; import R from 'res/R'; /* Date: 30/06/2019 props deste componente callbacks this.props.value --> valor a ser incrementado e decrementado this.props.onPressDecrement --> onPress do botao de decrementar t...
true
0492f24961ee5b0f5fd6706adafed61afd5fb2de
JavaScript
estensen/knowit-julekalender
/day5.js
UTF-8
2,009
2.90625
3
[]
no_license
// Kongen av Indonesia har som tradisjon å sende sine julehilsener kryptert til // sine venner. I år skjedde det en glipp og kongen sendte meldingen til alle i // hele verden med en email adresse, vi har også fått meldingen og trenger hjelp // til å dekryptere den. Med meldingen fulgte også følgende instruksjoner på //...
true
0828b2660ebf30ec46d63ddc7e63927adffea726
JavaScript
grifdail/GW2014-rebond
/scripts/game/game.js
UTF-8
2,660
2.59375
3
[ "MIT" ]
permissive
define(["game/functions/add_event_capabilities", "game/functions/renderEngine", "game/functions/basicObject", "game/functions/bulletsEngine", "game/functions/player_manager", "collisionEngine", "game/functions/bullets_collision", "game/functions/fittingOutEng...
true
467e1a580b1b2ba300e5fa14fef6d971b07e920c
JavaScript
MoDoStRoY/TestJS
/Pages/MessagesPage/JS/SendMessage.js
UTF-8
1,039
2.765625
3
[]
no_license
let doc; async function sendMessage(docIN) { doc = docIN; await sendRequest(); let body = doc.getElementById("fxMessageArea").value.toString(); let response = await fetch('http://94.181.44.86:25565/api/messages/send', { method: 'POST', headers: {'Accept': 'text/pl', ...
true
ed1fbd0bc7c03019ff3d63af7642f9517f4cb582
JavaScript
gillchristian/array-remove-item
/dist/array-remove-item.js
UTF-8
866
3.1875
3
[]
no_license
'use strict'; function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } /** * Removes and item from an array * * This is a pure function, does not mutate the provided array, * ...
true
95e2824faeb8c94867684d814fccf8e767f631f8
JavaScript
ZeroCrazy/petsvsmachine
/backend/middlewares/shop.js
UTF-8
1,706
2.59375
3
[ "MIT" ]
permissive
const { response, request } = require('express'); const { resp } = require('../helpers/response'); const PlayerResources = require('../models/playerResources'); const haveCE = async (uid, resource) => { try { const player = new PlayerResources(); player.player_id = uid; const resources = aw...
true
d34451ce3898324304046939d0e44e13e479e70a
JavaScript
aakash-10/react-techstore
/src/context/context.js
UTF-8
7,733
2.515625
3
[]
no_license
import React, {Component} from 'react' import {linkData} from './linkData' import { socialData} from './socialData' import {productData, items} from './productData' const ProductContext = React.createContext(); //provider //consumer class ProductProvider extends Component{ state={ sidebarOpen : false, ...
true
c32da2373365fe49b4f51a95519adbae07b2fcce
JavaScript
skidrow91/jsit
/bin/index.js
UTF-8
2,601
2.515625
3
[]
no_license
#! /usr/bin/env node const yargs = require("yargs") const GitRepo = require("../GitRepo") // var test = yargs.command('test', false, function(yargs1){ // return yargs.option() // }).arg; // console.log(test); yargs.command('init','', // function (yargs) { // return yargs.option('u', { // alias: ...
true
c53f8c203b5d586323ac93b725328ec82bde391b
JavaScript
shubham200/precily-assingment
/src/components/Clickcount.js
UTF-8
1,021
2.609375
3
[]
no_license
import React, { useEffect, useState } from "react"; import Axios from "axios"; import { devUrl } from "../dev.json"; const Clickcount=()=> { const [clicks, setClicks] = useState({ Add: 0, Update: 0 }); useEffect(async () => { try { await Axios.get(`${devUrl}/readCounts`).then((res) => { setClic...
true
7ce1288914797fdf3acd73aa2c5b2c2bfaeca36d
JavaScript
pratyaysaha/google-form-cover
/js/login.js
UTF-8
1,999
2.765625
3
[]
no_license
var eyestatus = true const eyechange = (me) => { if (eyestatus) { me.innerHTML = '<i class="fas fa-eye-slash"></i>' eyestatus = false document.querySelector('.input.password').type = 'text' } else { me.innerHTML = '<i class="fas fa-eye"></i>' eyestatus = true ...
true
65b304f11837801a26c7a296e0f42cabf1f1ce4e
JavaScript
ektravel/nytMERN
/client/src/utils/API.js
UTF-8
898
2.765625
3
[]
no_license
import axios from "axios"; const BASEURL = "https://api.nytimes.com/svc/search/v2/articlesearch.json?q="; const APIKEY = "&api-key=b9f91d369ff59547cd47b931d8cbc56b:0:74623931"; export default { // Gets all articles getArticles: function (query, startYear, endYear) { let queryURL = BASEURL + query + APIKEY; ...
true
47bdcaacca22d90eb6105d39717892af06f3b8a9
JavaScript
cafeTechne/JavaScript-PracticeProblems
/FreeCodeCampProblems/BasicAlgorithmScripting/longestWordInString.js
UTF-8
315
3.71875
4
[]
no_license
function findLongestWord(str) { var arr = str.split(" "); console.log(arr); var len = 0; for(i=0;i<arr.length;i++){ var x = arr[i].length; if (x > len){ len = x; } else continue; } return len; } findLongestWord("The quick brown fox jumped over the lazy dog");
true
edbcda7a8fbd9ee4868a17d6fb730fd2044d8c45
JavaScript
Setimarz108/To-do-s---Integrify-task
/todo/app.js
UTF-8
1,594
3.40625
3
[]
no_license
// add a task // function addItem (){ const input = document.getElementById("nuevoItem").value; const li = document.createElement("li"); const t= document.createTextNode(input); const deletebtn = document.createElement('button') deletebtn.textContent = ("\u00D7"); deletebtn.addEve...
true
af6fe1180c3dc399b51b79f8a3f6843c7e3dd39f
JavaScript
ThomasBarlow/Barlow_Thomas_WPF
/Week 2/Video Screencasts/Expressions1/js/script.js
UTF-8
133
3.59375
4
[]
no_license
// Expressions var a = 2; //sets up our variable and definition var b; b = a + 3; //add 3 to a console.log(b); //output to console
true
3a04ad3cee0866e814487d79a35f16d68b239e42
JavaScript
Jamaludin82/portfolio
/src/components/Contact.js
UTF-8
3,059
2.53125
3
[]
no_license
import React, { Component } from 'react' class Contact extends Component { constructor(props) { super(props) this.state = { username: '', email:'', message:'' } } handleUsernameChange = (event) => { this.setState ({ usern...
true
59375721d23536c4a176323160448e1279f632f7
JavaScript
Spacewolf21/contacts-react-native-demo
/src/actions/contacts.actions.js
UTF-8
995
2.546875
3
[]
no_license
import { getContacts } from '../services/contacts.service'; import Contact from '../models/contact.model'; import { startLoading, stopLoading } from './loading.actions'; export const GET_CONTACTS_SUCCESS = 'GET_CONTACTS_SUCCESS'; export const GET_CONTACTS_FAILURE = 'GET_CONTACTS_FAILURE'; export function getContactsS...
true
8508ae6b5e3f8387c7242015d71411316359a908
JavaScript
IXIXIXIXIXIXIXIXIX/nasa-image-search
/src/containers/SearchContainer.js
UTF-8
1,987
2.59375
3
[]
no_license
import React, {useState, useEffect} from 'react'; import SearchBox from '../components/SearchBox'; import ResultReel from '../components/ResultReel'; import Displayer from '../components/Displayer'; const SearchContainer = () => { const searchURL = "https://images-api.nasa.gov/search?q=" const [results, setRe...
true
1ee953ece911c9db2b170d995199a8f95fc3785c
JavaScript
lewisemm/euler
/problem3.js
UTF-8
1,992
4.25
4
[ "MIT" ]
permissive
// The prime factors of 13195 are 5, 7, 13 and 29. // What is the largest prime factor of the number 600851475143 ? const number = 600851475143; function* primeGenerator(limit) { let primes = [] let next = 2 let nexiIsAPrime, searching = true; while (searching && next <= limit) { nexiIsAPrime = true ...
true
b01f512489f19aa8bfa8e7bbdddde33e82483799
JavaScript
josephg/pathtrim
/test.js
UTF-8
532
2.671875
3
[ "ISC" ]
permissive
const pathtrim = require('.') const assert = require('assert') { const result = pathtrim([ [[-100, -100], [100, 100]] ], [ [[-2, 1], [2, 1], [2, -1], [-2,-1]] ], true) // This output is crap because pslg-to-paths produces crap output. assert.deepEqual(result, [ [ [ -1, -1 ], [ 1, 1 ] ] ]) } { c...
true
a632ab701f91335a201119a4bf1ad5af3d008488
JavaScript
ArazAslanian/TrueorFalse
/js/scripts.js
UTF-8
2,799
2.90625
3
[]
no_license
//marhaba var correctAnswer; var theQuestion; var theWord; var theGIF; function getQuestions(){ console.log("About to get questions"); //make ajax request $.ajax({ url: "https://opentdb.com/api.php?amount=1&category=9&type=boolean", type: 'GET', dataType: 'json', error: function(err){ console.log(err)...
true
fa4c8294dc59edc9769ca9fd76f2e6a974f40084
JavaScript
ShiboXing/Jobs_Tracker
/pitt-social-frontend-app/src/SearchPage/index.js
UTF-8
2,160
2.609375
3
[]
no_license
import '../style_sheets/index.css' import '../style_sheets/mainComponents.css' import '../style_sheets/searchComponents.css' import { NavBar } from '../components' import { Circle } from '../shapes/blob' const React = require('react') class MainBody extends React.Component { render() { return ( ...
true
948e740e794427a04bf9991328a070966960231b
JavaScript
Rudolfitox/React
/02-intro-javascript/src/bases/10-fetch.js
UTF-8
572
3.109375
3
[]
no_license
//Key para poder acceder al recurso en el API const key = '6njvZZPD98E0ZjegSpeQlRN34IErsbGZ'; //PETICION OBTIENE EL RECURSO REGRESARA UNA PROMESA const peticion = fetch(`http://api.giphy.com/v1/gifs/random?api_key=${key}`); // peticion.then(resp => { // resp.json().then(data => { // console.log(data); //...
true
40b8738f29493c9bbc92ee99bbc57f6bdaecdaa0
JavaScript
343N/quick-pong-client
/ball.js
UTF-8
1,361
2.84375
3
[]
no_license
function Ball(vx, vy){ this.vx = vx; this.vy = vy; this.speedscale = 1; this.x = 400; this.y = 300; this.size = 10; this.show = function() { // rectMode(CENTER); // rect(this.x, this.y, this.size, this.size); fill(255); rect(this.x - (this.size / 2), this.y - (this.size / 2), this....
true
11f4f72cc531667039e9f7dddc3f1ede000e704c
JavaScript
GhadeerMagdi/newsApi
/js/first.js
UTF-8
1,222
3.3125
3
[]
no_license
let myData; getData('general'); function getData(category) { myData = []; let http = new XMLHttpRequest(); //http.open("GET" , "https://jsonplaceholder.typicode.com/comments"); http.open("GET" , "http://newsapi.org/v2/top-headlines?country=eg&category="+category+"&apiKey=e6d2e0b91eb54a06aabff974320455...
true
927f192cc1971ccc5086678ca1ce945661a1509d
JavaScript
pseudo-ankit/WedD
/keeper-app/src/components/App.jsx
UTF-8
1,199
2.609375
3
[]
no_license
import React, { useState } from "react"; import Header from "./Header"; import CreateArea from "./CreateArea"; import Footer from "./Footer"; import Note from "./Note"; // import notes from "../notes"; // function App() { // return ( // <div> // <Header /> // {notes.map((note) => ( // <Note k...
true
abb6420516cd9ecc6d1d72690fbc1d5503749952
JavaScript
adjaha52/digitous-js
/jour01/jour01.js
UTF-8
698
4.1875
4
[]
no_license
// Hello world console.log("hello world"); //string var test = "My name is Ange"; console.log(test); // concatenation var name= "Ange"; console.log("nice to meet you" + " name "); // string length var testLength= "I m very long"; console.log(testLength.length); // replace var food= "croissant is meh"; food = food.r...
true
0bb2a43fd18f8a50e08f4385efb61696214c4beb
JavaScript
Andris-Pikarevskis/webcademy
/1st week/функции/functiosExercise/fucTest/functest.js
UTF-8
291
3.21875
3
[]
no_license
function calculateTips(sum) { if (sum <= 1000) { tip = sum * 0.2 } else if (sum > 1000 && sum <= 3000) { tip = sum * 0.15 } else { tip = sum * 0.1 } console.log(`If check sum are ${sum}, tips are ${tip}`); } var tip; calculateTips(1000); calculateTips(2000); calculateTips(5000);
true
307411a509ada7a5afabcf494e7a928ebdf13c37
JavaScript
Nuri0/dailyprogrammer
/challenges/298/easy.js
UTF-8
1,525
3.75
4
[ "MIT" ]
permissive
// https://www.reddit.com/r/dailyprogrammer/comments/5llkbj/2017012_challenge_298_easy_too_many_parentheses/ var minimizeParentheses = function(expression) { var tempPairs = []; var pairs = []; // travel through expression to find pairs of parentheses for (var i=0; i<expression.length; i++) { if (expression.ch...
true
3cb3a3282d8a530bd3c81f155b0313f5684abaa9
JavaScript
Facundo-Vaena/8base-taskList
/client/src/components/main.js
UTF-8
3,751
2.53125
3
[]
no_license
import React, { Component } from 'react'; import compose from "lodash/flowRight"; import { withRouter } from "react-router-dom"; import { withTodos, withToggleTodo, withToggleAllTodos, withRemoveTodo } from '../graphql' export default class Main extends Component { render() { const { todos, ...
true
cf0e71fbee6c78b783f94735e8d490442893a2cc
JavaScript
arzhed/snapgram
/test/timeAgoFunctionTest.js
UTF-8
4,115
3.125
3
[ "MIT" ]
permissive
var assert = require("assert"); var functionTimeAgo = require('../routes/feed'); describe("Test for function calculating difference between date and now", function(){ it("Passes if timestamp is past", function(){ var timestamp = new Date("2014-01-15 16:24:33"); var actual = functionTimeAgo.getTimeAgo(new Date(...
true
ecbfecc9a1a4a65864ca9549548a78b34d4a80a9
JavaScript
gomezlucas/RickandMorty-Challenge
/src/redux/generalDuck.js
UTF-8
534
2.875
3
[]
no_license
//Constants const initialData = { radio: "characters", } const UPDATE_RADIO = "UPDATE_RADIO" //Reducers export default function reducer(state = initialData, action) { switch (action.type) { case UPDATE_RADIO: return { ...state, radio: action.payload } default: retur...
true
1692d49331f6cbe143bd762e83eb65d086a74c0a
JavaScript
mgkrysiak/Javascript
/WAR_FER_S_25_Javascript/1_Zadania/Dzien_4/7_DOM_Inputy_i_formularze/js/zadanie04.js
UTF-8
638
3.28125
3
[]
no_license
/** * Created by Jacek on 2016-01-12. */ document.addEventListener('DOMContentLoaded', function(e) { document.querySelector('#name').addEventListener('keyup', function(e) { var name = this.value var type = ""; if(name.charAt(0) === '4' && (name.length >= 13 && name.length <= 16) ) { type = "Visa"; } e...
true