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
fc0efb57a6f742f1d5725ee400a92c2db7ae272c
JavaScript
zb8787/Medical-Meeting-Interface
/nodejs_learning/playground/5_es6_object.js
UTF-8
984
4
4
[]
no_license
// Object property short hand const name = 'Andrew' const userAge = 27 // since the variable name matched with name property, we can delete the name const user = { name, age: userAge, location: 'New York' } console.log(user) // object destructuring // access objects and their values in...
true
92c50c5cf7fec36758d82d448b41604e07bdc901
JavaScript
RyanDur/JavascriptPractice
/spec/ErrorHandlingSpec.js
UTF-8
1,352
3.1875
3
[]
no_license
describe("ErrorHandling", function() { var errorHandler; beforeEach(function() { errorHandler = Object.create(ErrorHandling()); }); describe("between", function() { it("should return the content specified", function() { expect(errorHandler .between("bor...
true
6fc4979a88bcbe6c1d35ec8a8374dddd5b7a7aa8
JavaScript
christabor/jquery.cayley
/dist/jquery.cayley.js
UTF-8
1,717
3.015625
3
[ "MIT" ]
permissive
/* * jquery.cayley - v0.1.0 * Generate Cayley Tables (Punnett Squares, function composition, etc...) with ease. * http://github.com/christabor/jquery.cayley * * Made by Chris Tabor * Under MIT License */ // the semi-colon before function invocation is a safety net against concatenated // scripts and/or othe...
true
2849853f70f1bbbe1dc22273ad18b10a401cab7a
JavaScript
HumorYi/canvas
/books/HTML5 Canvas核心技术 图形、动画与游戏开发/56-sprite-simple/main.js
UTF-8
1,013
2.921875
3
[]
no_license
/* * @Author: Bamboo * @AuthorEmail: bamboo8493@126.com * @AuthorDate: Do not edit * @AuthorDescription: 入口文件 * @Modifier: * @ModifierEmail: * @ModifierDate: Do not edit * @ModifierDescription: */ const canvas = document.getElementById('canvas') const context = canvas.getContext('2d') const width = canvas.widt...
true
df8bbebf5f62be7bc9b7fa6f8c223ede37dfc6c9
JavaScript
IvanaAndersson/speedtyping-game
/src/components-old-unused/FunctionalToDoList.jsx
UTF-8
1,614
3.09375
3
[]
no_license
import React, { useState } from "react"; const FunctionalToDoList = props => { const taskString = localStorage.getItem("tasks") || ""; const initialTasks = taskString.split(" ; "); const [tasks, setTasks] = useState(initialTasks); const [input, setInput] = useState(""); const handleChange = event => { s...
true
c7b6eaded34d8b8de6547351285047408158b03e
JavaScript
codingpains/camelobj
/index.js
UTF-8
1,337
3.15625
3
[ "MIT" ]
permissive
const camelCase = require('camelcase'); const isPlainObject = require('is-plain-object'); const camelizeObject = (data, exceps) => { if (Array.isArray(data)) return data.map(item => camelizeObject(item)); if (!isPlainObject(data)) return data; return Object.keys(data).reduce((result, key) => { const newKey ...
true
d2da4058afc6b20c5b61c2479a4a60f787b216a3
JavaScript
HershNagpal/juicebox
/src/components/Juicebox.js
UTF-8
581
2.5625
3
[]
no_license
import React from 'react' import "../styles/juicebox.css" import juicebox from '../assets/images/juicebox.png' export const Juicebox = ({toggleMenu, menuState}) => { const [right, toggleRight] = React.useState(false) const toggle = () => { toggleMenu(!menuState) toggleRight(!right) ...
true
4d0e9dca1ee976f762f8fb48881bcc3670579695
JavaScript
sjweil9/JS-Algorithms
/sorting.js
UTF-8
4,135
3
3
[]
no_license
function bubble_sort(arr) { for (var i=arr.length-1; i>0; i--) { for (var k=0; k<i; k++) { if (arr[k+1] < arr[k]) { let temp = arr[k]; arr[k] = arr[k+1]; arr[k+1] = temp; } } } return arr; } function selection_sort(arr)...
true
c14580b5ae28fba0c6763dc3d565fa6c76eb6e2d
JavaScript
codyjgreen/14-mongo-express-two-resource-api
/lab-cody/lib/recipe.js
UTF-8
1,444
2.578125
3
[]
no_license
'use strict'; const mongoose = require('mongoose'); const Recipe = require('../models/recipe'); const DATABASE_URL = process.env.MONGODB_URI || 'mongodb://localhost/brewery'; mongoose .connect(DATABASE_URL) .then(() => { console.info('Mongoose connection successfully created.'); }) .catch(error => { ...
true
433d6f2235e8eb4183276abdfa10e44faa277499
JavaScript
frandugo/ze-test-moga
/src/js/banner.js
UTF-8
274
2.875
3
[]
no_license
(function(){ const bannerClose = document.querySelector(".js-banner-close"); const banner = document.querySelector(".js-banner"); bannerClose.addEventListener("click", closeBanner); function closeBanner(e){ e.preventDefault(); banner.style.display = "none"; } })();
true
38edb25d1966ac334cbf6c710d8f8b3cc9a529b8
JavaScript
Finyu/tiny-wheels
/src/Tabs/index.js
UTF-8
3,944
2.59375
3
[ "MIT" ]
permissive
import '../../style/tab.scss' class Tabs { constructor (options) { const defaultOptions = { element: '', callback: () => {}, animated: true } this.options = Object.assign({}, defaultOptions, options) this.$container = this.options.element this.initTabs() this.setTabs() t...
true
5afcc82538e1289c7022cafa7ffe9bec58700e99
JavaScript
IIP-Design/Courses-Module
/app/src/Course/components/InstructorList.js
UTF-8
2,124
2.6875
3
[ "MIT" ]
permissive
import React from 'react'; import { Link } from 'react-router-dom'; import PropTypes from 'prop-types'; import styles from 'Course/components/stylesheets/InstructorList.scss'; const { array } = PropTypes; /** * Render list of instructors * * @param {Object} instructor - individual instructor * @param {Number} n...
true
498bd74406e4a2a55e1803e65360ff808d8bee58
JavaScript
Codaisseur/visualized-execution
/src/lib/performEscapeAnalysis.js
UTF-8
1,524
2.71875
3
[]
no_license
import traverse from "@babel/traverse"; // import * as t from "@babel/types"; /* For sure this is a bit of a quircky analysis technique :D I would'ave written it otherwise, but I'm still getting used to the weirdly specific, powerful but idiosyncratic Babel API. The idea: - Find all *references* variables (`Identifi...
true
527bc150db09ff8cb1b3c8c6ad4a1e2be538ea86
JavaScript
wkirkgaard/MilSpecWeb
/web/JS/JSONparse.js
UTF-8
1,885
2.75
3
[]
no_license
/* global DRAWABLE,STRING */ function setValue(win, strLbl) { win.innerHTML = strLbl; } function getURL(url) { var returnURL = "" || null; try { returnURL = "url(" + url + ")"; } finally { if (returnURL == null) { Console.log("Error", "File Not Found"); return nu...
true
8db0cdf580e2c60867a3d7600f6568b1c42d8c8a
JavaScript
gunget/rct_hooks_phonebooks
/src/componets/useFetch_withoutJWT.jsx
UTF-8
2,037
2.703125
3
[]
no_license
import { useState, useEffect } from "react"; import axios from "axios"; const useFetch = (callback) => { const [loading, setLoading] = useState(true); axios.defaults.xsrfCookieName = "csrftoken"; axios.defaults.xsrfHeaderName = "X-CSRFToken"; //웹사이트 해킹 방지용도 const fetchInitData = async () => { const defau...
true
5a6205d81e2e2cc29f0aa7a7857dfe2c1414dc94
JavaScript
CodeCoreYVR/class_demos_bootcamp_march_2021
/js_node_basics/fsReadingAndCreatingFiles.js
UTF-8
346
3.078125
3
[]
no_license
const fs=require('fs'); fs.readdir('./',(err,data)=>{ console.log(data); }) const text = "This file will be the content of myFile.txt" fs.writeFile("myFile.txt",text,err=>{ console.log('File created!') }) fs.stat("myFile.txt",(err,stat)=>{ console.log(stat); console.log(stat.isFile()); console.l...
true
f3fc05729458491b1da1771ad598ec9480021947
JavaScript
agnestreasure2/stusuite
/expensecalc/expense.js
UTF-8
1,692
3.546875
4
[]
no_license
function addMoney(){ var totalBudget=parseInt(document.getElementById("totalBudget").innerHTML); var currentBalance=parseInt(document.getElementById("currentBalance").innerHTML); var money=parseInt(document.getElementById("money").value); //for validation and ensuring the user inputs numbers use th...
true
6eb8c00fbbb43b6795c01b620d9b9091797b5760
JavaScript
lsquaredleland/SGP-d3-map
/js/js_locationRose.js
UTF-8
5,024
3
3
[]
no_license
var w = 600; var h = 600; function deleteRose() { d3.select("#locationRose svg").remove(); } function generateRose(origin) { origin = origin || [103.8332347, 1.3356521] var lat = origin[0]; var lon = origin[1]; var directionQuantity = _.map(ewaste.data, function(data) { return findSegment(12, data.coordina...
true
59b592cc7f87847792f6aeb91afe8753d00c477f
JavaScript
noemission/vue-migration-helper
/helpers/track-stats.js
UTF-8
822
2.53125
3
[]
no_license
'use strict' var chalk = require('chalk') module.exports = function(proms) { Promise.all(proms) .then(function(data) { var filesWithErr = data.filter(function(x) { return x > 0 }).length var errCount = data.reduce(function(total, x) { r...
true
716dbab3162636d5362f6d7ed8360a93d6876e29
JavaScript
rzhanghu64/webscraper
/public/assets/js/app.js
UTF-8
470
2.703125
3
[]
no_license
$(document).on("click", ".save-btn", function() { var thisId = $(this).attr("data-id"); console.log("saved id:" + thisId); $.ajax({ method: "POST", url: "/saved", data: { id: thisId } }); }); $(document).on("click", ".delete-btn", function() { var thisId ...
true
9b682b98f98b8d98a502abf47afad667345e655d
JavaScript
joshmkennedy/site-to-image-function
/src/webscrape.js
UTF-8
2,345
2.703125
3
[]
no_license
async function webScrape({ event }, chromium, isProd) { // BUILDING THE URL OF SITE TO SCREENSHOT const [, , ...rest] = event.path.split("/"); const paths = rest.join("/").split("~/"); const options = paths.reduce((options, entry, i, all) => { if (i % 2 == 0) { options.push({ key: entry, value: all[i ...
true
8de4989ea55803ecdeeb26ea97388ca5bc525dca
JavaScript
Vanchurick/no-doubt
/src/js/burger.js
UTF-8
486
2.953125
3
[]
no_license
let buttons = document.getElementsByClassName("burger__button")[0]; let sideMenu = document.getElementsByClassName("side-menu")[0]; let navButtons = document.getElementsByClassName("navigation__item"); buttons.addEventListener("click", showMenu); function showMenu() { sideMenu.classList.toggle("shown"); } functi...
true
34f7649f2d691c45d3259cf3d1f34ab8709afd79
JavaScript
catmorgan/SquareLegacy
/Assets/skills.js
UTF-8
1,054
2.78125
3
[]
no_license
#pragma strict var attack = 0; var defense = 0; var health = 0; var inithealth = 0; var k = false; var state = 0; var limit = 14; var canAttack = false; var time = 0.0; var initAttack = 0; var initDefense = 0; function Start() { attack = Random.Range(3, limit); health = Random.Range(5, limit + 2); defense = Random.Ra...
true
44d909f678e9f5443a26219069984ecc8769166f
JavaScript
wstorey/AdventOfCode2020
/day1/part1/main.js
UTF-8
708
3.421875
3
[ "MIT" ]
permissive
const fs = require('fs'); const readline = require('readline'); async function lineByLine() { let inputArr = []; const fileStram = fs.createReadStream('input.txt'); let input = readline.createInterface({ input: fileStram, crlfDelay: Infinity }); for await (const line of input) { ...
true
ec144707acd7a16676324c37b0ae1144205aef06
JavaScript
chromium/chromium
/content/browser/webrtc/resources/tab_view.js
UTF-8
3,338
3
3
[ "BSD-3-Clause" ]
permissive
// Copyright 2013 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Creates a simple object containing the tab head and body elements. class TabDom { constructor(h, b) { this.head = h; this.body = b; } } /** * A TabView provide...
true
59c71a4ff44bae6b34fb411f4c69120c90eb68fa
JavaScript
elbiesmith/SuperDog-1
/js/site.js
UTF-8
5,831
3.515625
4
[]
no_license
// including functions let events = [{ event: 'ComicCon', city: 'New York', state: 'New York', attendance: 240000, date: "06/01/2017" }, { event: 'ComicCon', city: 'New York', state: 'New York', attendance: 250000, da...
true
2088b660ebbc5b46f4948bda7dc0f36eeca45c38
JavaScript
SujonHossain1/firebase-authentication
/src/components/Login/Login.js
UTF-8
6,856
2.5625
3
[]
no_license
import React, { useContext, useState } from 'react'; import { initializeAppFirebase, signInWithGithub, signInWithGoogle, signUpWithEmailAndPassword, signInWithEmailAndPasswordOwn, signInWithFacebook } from '../FirebaseManager/FirebaseManager'; import { useHistory, useLocation } from 'react-route...
true
1c82d849809c24ca4027d3b08d0105b23e4b8940
JavaScript
mblair415/js-control-flow-training
/starter-code/login.js
UTF-8
774
3.484375
3
[]
no_license
console.log("login.js loaded"); var userLogin = { userName : "Paul", userPassword : "123456" }; var loginAttempt = 0; var loggedIn = false; while (!loggedIn) { userAnswer2 = prompt("Enter password for " + userLogin.userName + "."); if (userAnswer2 === userLogin.userPassword) { console.log("Passwords matc...
true
08a89804d97ce254bddba66532a344ef7fd9bbfc
JavaScript
francesco-allera/php-ajax-dischi
/js/script.js
UTF-8
853
2.515625
3
[]
no_license
var app = new Vue({ el: '#app', data: { apiUrl: 'app/server.php', disks: [], genres: [], genre: '', error: false }, methods: { filterGenre() { axios.get(this.apiUrl + '?genre=' + this.genre) .then(resp => { t...
true
9d96208042fe1b4b7b634a58a9b278bf6f9da164
JavaScript
JacksGo/Open-Captions-PWA
/js/helpers.js
UTF-8
2,799
3.140625
3
[]
no_license
let global_test = null; class customGrammarList { constructor(...items) { this.list = items; this.name = 'custom'; } append(...items) { this.list.push(...items); } toString() { return `#JSGF V1.0; grammar ${this.name}; public <${this.name}> = ${this.list.join(" | ")} ;` } toGrammarList() ...
true
2d9bb4ba4e157abfbf46d9cff4d7c7ac2068ef1c
JavaScript
cliffkang/BigOLA
/Week 1 - Trees/mergeBST/Solution.js
UTF-8
4,707
3.828125
4
[]
no_license
class BinaryNode { constructor(value) { this.value = value; this.left = null; this.right = null; } } const validTree1 = new BinaryNode(10); validTree1.left = new BinaryNode(5); validTree1.right = new BinaryNode(15); validTree1.left.left = new BinaryNode(2); validTree1.left.right = new B...
true
bc5ce9a03fdcf7197979ee88a1fda98e11d61f86
JavaScript
rproenza86/es6orES2015
/5-experiments/1-protected_user_object.js
UTF-8
3,657
3.40625
3
[]
no_license
"use strict" const PSW = Symbol( "password" ); // Magic const UserObj = { [PSW]: 'Just for my eyes budy :)' }; Object.defineProperty( UserObj, "name", { value: 'Raul Proenza', writable: false, // not writable! configurable: true, // it control the redefinition and property deletion ...
true
5ad4ba140e40365ca27a68e5212ae97ca2725b6b
JavaScript
xiaoganuse/one_project
/FirstProject/src/js/happy_home.js
UTF-8
1,120
2.9375
3
[]
no_license
//快乐e家代码块 var nextss = document.getElementsByClassName("nextss")[0]; var prevss = document.getElementsByClassName("prevss")[0]; var lis = document.getElementsByClassName("contentsone")[0] //左边的按钮 //设置定时器 var Stoprunprevess prevss.onclick = function() { clearInterval(Stoprunprevess) Stoprunprevess = setI...
true
08e8feefe82b6c2a94e248d34e36b1ca1b9bec79
JavaScript
congweijing/blog1.0
/proxy/post.js
UTF-8
4,764
2.6875
3
[]
no_license
var postModel = require('../models/post'); //新增或更新文章 exports.save = function(params,callback){ var _id = params.UniqueId, entity = new postModel({ Title:params.Title, Alias:params.Alias, Summary:params.Summary, Source:params.Source, Content:params.Content, CategoryId:params.CategoryId, Labels:pa...
true
a1b9ef91363b7679909b4a3d2791db5949260a6e
JavaScript
to6esko/SoftUni-JS
/JSLesson-2/sempleSolution.js
UTF-8
1,448
4
4
[]
no_license
/*jshint esversion: 6 */ function sum([arg1]) { let a = parseInt(arg1); let area = a * a; console.log(`Square area = ` + area); } sum([5]); function printTrapezoidArea([arg1, arg2, arg3]) { let a = parseFloat(arg1); let b = parseFloat(arg2); let h = parseFloat(arg3); let area = (a + b) * h ...
true
bb2653c564ca37d3580c0dddc52517f327a2e448
JavaScript
chiakeyo0o/learnyounode
/p2.js
UTF-8
136
2.984375
3
[]
no_license
var total = 2; for (var i = 2; i < process.argv.length; i++){ total = total + parseInt(process.argv[i],10); } console.log(total);
true
5ffd0d0b7b26427637c43c3a43398e0f0e62e372
JavaScript
MahdiMajidzadeh/materialize-rtl
/js/chips.js
UTF-8
11,965
2.609375
3
[ "MIT" ]
permissive
(function ($, Vel) { 'use strict'; let _defaults = { data: [], placeholder: '', secondaryPlaceholder: '', autocompleteOptions: {}, limit: Infinity, onChipAdd: null, onChipSelect: null, onChipDelete: null }; /** * @typedef {Object} chip * @property {String} tag chip tag ...
true
d1b3904d7550033c56eabb98df612dd7eb7a1744
JavaScript
aiasifistiaque/vincents-sphere
/functions/wordShortner.js
UTF-8
178
2.828125
3
[]
no_license
// const wordShortner = (string, len) => { if (string.length > len) { return `${string.substring(0, len)}...`; } else { return string; } }; export default wordShortner;
true
95f686e0e4c6a63d1a1a9901b37042eff0931f46
JavaScript
TenderShootTM/shalom-paypal
/paypal.js
UTF-8
3,753
2.515625
3
[]
no_license
/*** * Paypal jQuery code * @author Chris Hsu 26matrices@gmail.com * @version 0.8 */ /** Options **/ var recurringOptions = [ 10, 25, 50, 100, 200 ]; var defaultRecurring = 50; var onceOptions = [ 50, 100, 200, 500 ]; var defaultOnce = 200; var monthlyOptions = [ 3, 6, 12, 24 ]; var yearlyOptions = [ 1, 2, 3, 5 ];...
true
3a64b7730f99d3b0f1881362c0f912627f03549d
JavaScript
epilogue/Xsuite-dev
/public/js/controllers/xprev/datepicker.js
UTF-8
7,680
2.578125
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * Type: Date or Number or String Default: null The minimum selectable date. When set to null, there is no minimum. Multiple types...
true
9328b9591eb23b8f1ca3d92e9d951c148e789461
JavaScript
nickprender12/Todo-Client
/src/hooks/useTodoState.js
UTF-8
1,126
2.515625
3
[ "MIT" ]
permissive
import { useState } from 'react'; import { v4 as uuidv4 } from 'uuid'; // eslint-disable-next-line import/no-anonymous-default-export export default (initialTodos) => { const [todos, setTodos] = useState(initialTodos); // const addtodos = async (newTodoText) => { // try { // setTodos([...todos, { id: uui...
true
8075e952015fa29f24395068ff658c73da909964
JavaScript
sambarksdale/Courier
/router/user.js
UTF-8
1,318
2.53125
3
[]
no_license
const express = require('express'); const router = express.Router(); const userApi = require('../api/userApi.js') router .route('/users') .get((req,res) => { userApi.returnAllUsers() .then(users => { res.json(users) }) }) .post((req,res) => { const us...
true
c35f7c80e63fb9f4432d40b02dea6f1370802156
JavaScript
VasyaStelmah/Laboratory
/pdp/TASKS/28_loops_js.js
UTF-8
3,462
4.25
4
[]
no_license
const iterationAPI = { whatIsLastValue: () => { //Какое последнее значение выведет этот код? Почему? let i = 3; while (i) { console.log(i--); } }, getValueLoopWhile: () => { // Какие значения выведет цикл while? i = 0; while (++i < 5) console.log(i); // Постфиксный вариант i...
true
9539f0e64379a042150fa201ba30fe82dfc5bc4b
JavaScript
mollerjorge/react-app-boilerplate
/src/helpers/decamelize.test.js
UTF-8
866
2.875
3
[ "MIT" ]
permissive
import { decamelizeKeys } from './decamelize'; describe('decamelizeKey', () => { it('should deeply decamelize the keys of an object', () => { const fakeDate = new Date(2016, 3, 15); const obj = { nestedObj: { fooBar: 1, fakeDate, anArray: [1, 2, { fooBar: 3 }], }, }; ...
true
1ec7eef816ea23b14068b657f5f393039460345a
JavaScript
owidder/zer0slides
/scripts/searchFolders.js
UTF-8
658
2.734375
3
[]
no_license
const fs = require('fs'); const foldersToBuild = (publicFolderPath, indexName = "index") => { const content = fs.readdirSync(publicFolderPath); const foldersWithIndexHtml = content.filter(entry => { const pathToFolder = `${publicFolderPath}/${entry}`; if(fs.lstatSync(pathToFolder).isDirectory()...
true
043faf6c8509d9b907c5736a88f78960c4ba273e
JavaScript
roshnij/StudyTracker
/src/playground/es6-classes-one.js
UTF-8
530
3.96875
4
[]
no_license
class Person{ //define constructor in this manner constructor(name='test') { this.name = name; } //good way of creating a string with variablein it getGreeting(){ return `Hi. I am ${this.name}`; } } class Student extends Person{ constructor(name,major){ super();...
true
b47803152cb0525029e234c4a64819937eb0d0e3
JavaScript
GabrielBoivin/GabrielBoivin
/Programmation 1/sortTableaux/js/script1.js
UTF-8
462
3.8125
4
[]
no_license
var tab = []; var min = 9999999999999999; var nbMax = -9999999999999999; for (var i = 0; i < 10; i ++){ var nombres = prompt("Veuillez entrer 10 nombres"); tab.push(Number(nombres)); } for (var j = 0; j < 10; j ++){ if(min > tab[j]){ min = tab[j]; } if (nbMax < tab[j]){ nbMax = ...
true
95e87f250094575cdba7a83350bef2e0a27df18c
JavaScript
majaBai/refactoring
/chapter8 搬移特性.js/管道取代循环.js
UTF-8
1,081
3.890625
4
[]
no_license
/* 集合管道是这样一种技术,它允许我使用一组运算来描述集合的迭代过程, 其中每种运算接收的入参和返回值都是一个集合 map filter */ //下面这个 acquireData 函数的作用是从数据中筛选出印度的所有办公室, //并返回办公室所在的城市(city)信息和联系电话(telephone number) function acquireData(input) { const lines = input.split("\n"); let firstLine = true; const result = []; for (const line of lines) { if (firstLine) ...
true
a5d94d9562e646353abf8976225a7bff1c4b79c8
JavaScript
nopjmp/schwarznasenschaf
/src/commands/info/role.js
UTF-8
1,503
2.796875
3
[ "MIT" ]
permissive
import Config from 'config' import createEmbed from 'utils/embeds' import { formatDate } from 'utils/date' export default class RoleInfoCommand { constructor() { this.name= 'role_info' this.aliases = ['roleinfo', 'role-info'] this.description = 'Gets some info about the given role' this.maxArgs = 1 ...
true
77a7784385e8344fb771364c0323703a9ef818fc
JavaScript
IvankoRambo/object-fly-simulator
/src/js/helpers/mediator.js
UTF-8
2,694
3.203125
3
[]
no_license
const collisions = { /** * Type of collision for simple HTML elements (rectangle divs) * @param {HTMLElement} source - source element to find with what elements it could collide * @param {HTMLElement} aim - HTML element to find potential collision with * @returns {Object} object with status of c...
true
b138ffdba18cdbf785f072d8f0a0ea8be23db5fc
JavaScript
Stefan941/bit-pp
/objects/vezbanje_5.js
UTF-8
713
4.09375
4
[]
no_license
//Pretvoriti dati input string u novi string kojem je //Svako drugo slovo veliko, i svako slovo A veliko var input = "abrakadabra"; var velika = input.split("").map(function (el, i) { if (el === "a" || i % 2 === 1) { //ako je malo a ili ako je idex neparan, tj. svaki drugi return el.toUpperCase() } e...
true
8574bf629ef88df62755ffcaf722ccdd7f325f4d
JavaScript
YutaImaizumi/comp1073-assignment04
/Scripts/lib/core/banner.js
UTF-8
2,487
2.796875
3
[]
no_license
(function (window) { var cj = createjs, stage, bitmap, text; function init() { stage = new cj.Stage('banner01'); bitmap1 = new cj.Bitmap('http://yuta-pf.azurewebsites.net/mypf-4/Assets/base1.jpg'); bitmap1.y = 0; bitmap1.x = 0; stage.addChild(bitmap1); stage.updat...
true
997585d425794a87861f944858a66f44441e1733
JavaScript
deniseyu/javabuzz
/spec/javabuzzSpec2.js
UTF-8
1,331
3.28125
3
[]
no_license
describe(Javabuzz, function(){ beforeEach (function(){ javabuzz = new Javabuzz(); }); describe('it should divide by', function(){ it('three', function(){ expect(javabuzz.isDivisibleByThree(3)).toBe(true); }); it('five', function(){ expect(javabuzz.isDivisibleByFive(5)).toBe(true); ...
true
336bdd49bb1d1ab01fc74f5a0e51c03b21bd4f7f
JavaScript
tiagofinger/teste-interage
/js/scripts.js
UTF-8
953
2.65625
3
[ "MIT" ]
permissive
/** * Arquivo com as funções js utilizadas */ $(document).ready(function() { $("#busca").focus(); $("#frmBusca").submit(function (){ if( $("#busca").val().length > 0 ){ $.post("ajax/buscaVideo.php", { nome_video: $("#busca").val() }, function(data){ $("#conteudo").html(data); $(...
true
beee767d8ad366f10f57cff3975d7fff265ef360
JavaScript
kette-io/nft-asset-registry-backend
/modules/encryptionService.js
UTF-8
809
2.578125
3
[ "MIT" ]
permissive
const AWS = require('aws-sdk'); module.exports = (kms) => { functions = { encrypt: async (textToEncrypt) => { var params = { KeyId : process.env.ENCRYPTION_KEYID, Plaintext: textToEncrypt }; const encrpyted = await kms.encrypt(params)....
true
240413c702b807afa3f271a62dfeea79c569ca0c
JavaScript
MichaelRT17/react-drills
/app-6/src/App.js
UTF-8
917
2.75
3
[]
no_license
import React, { Component } from 'react'; import Todo from './Todo' import './App.css'; class App extends Component { constructor() { super(); this.state={ myList:[], userInput:'' } this.adding = this.adding.bind(this); } whenInputting(input) { this.setState({userInput:input}) ...
true
3d42fa643f76de59c3f9bae684c674dfa9a35b66
JavaScript
fred75013/RPG
/character.js
UTF-8
623
3.171875
3
[]
no_license
class Character { constructor(hp, dmg, mana, name, status) { this.hp = hp; this.dmg = dmg; this.mana = mana; this.name = name; this.status = status; } takeDamage = (dmg) => { this.hp -= dmg; console.log(`${this.name} à desormais ${this.hp} points de vie`); if (this.hp <= 0) { ...
true
e36bb7564964df86604708f53d127d0e8545318b
JavaScript
builtbymonkey/wygwam-word-count
/themes/third_party/wygwam_word_counts/wordcount/plugin.js
UTF-8
858
2.65625
3
[]
no_license
CKEDITOR.plugins.add('wordcount', { init: function(editor) { var wordCount = 0; var maxWordCount = editor.config.wordcount_max; $('td#cke_bottom_' + editor.name).hide(); setTimeout(function() { var htmlData = editor.getData(); var element = $(document.createElement('div')).addClass('cke_word_count...
true
c5ad5c102edf9930cdc96af20a96ee89724b3628
JavaScript
indinabilah/phase-0
/digitPerkalianMinimum.js
UTF-8
1,592
3.34375
3
[]
no_license
function digitPerkalianMinimum(angka) { // you can only write your code here! var faktor = [] if(angka === 1){ faktor = [1] } for(i = 1; i <= angka; i++){ if(angka % i === 0){ faktor.push(i) } } var depan = [] var belakang = [] for(i = 0; i <= (f...
true
b4fad5e65f9f39b2079b27a75dff284e3387ed5f
JavaScript
tallongsun/doodle
/js/Player.js
UTF-8
1,150
3.390625
3
[]
no_license
//Player object //角色 var Player = function() { this.vy = 11; this.vx = 0; this.isMovingLeft = false; this.isMovingRight = false; this.isDead = false; //Sprite clipping this.cx = 0; this.cy = 0;//大图片中不同朝向的角色所处位置 this.cwidth = 110; this.cheight = 80; this.dir = "left"; this.width = 55; this....
true
f8996590fec5996a8fb1031687299b5353e90b7d
JavaScript
AmruthashreeAM/AIHealthTracker-server
/public/javascripts/pillDBAbstractionLayer.js
UTF-8
3,173
2.546875
3
[]
no_license
var mongodb = require('mongodb'); var connected = false; var db = null; //mongodb.MongoClient.connect('mongodb://localhost:27017', { useUnifiedTopology: true }).then(connection => { mongodb.MongoClient.connect('mongodb+srv://sxm4311:soumya123@cluster0.s89sh.mongodb.net/test?authSource=admin&replicaSet=atlas-pxhlmq-sha...
true
06f27258f5953711329212563b97faeb903d027d
JavaScript
BranchofLight/CyTube-Room-Script
/src/utility.js
UTF-8
5,087
2.765625
3
[ "MIT" ]
permissive
import { getCustomCSSNode, msgBuffer, getCurrentUsername, getGifSearchNode, getGifErrorMsgNode, } from "./constants"; export const addCSS = cssString => { getCustomCSSNode().innerText = getCustomCSSNode().innerText + " " + cssString; }; export const isNodeServerMsg = node => { retu...
true
3bbb2aa77d25aaec067b9ae8b6828a3c626becf1
JavaScript
Abhi591/JavaScript
/DOM/09. Event Bubbling and Event Delegation.js
UTF-8
483
2.78125
3
[]
no_license
//Bubbling document.querySelector("task").addEventListener("click", runEvent); document .querySelector("task") .parentElement.addEventListener("click", runEvent); document .querySelector("task") .parentElement.parentElement.addEventListener("click", runEvent); //Delegation document.body.addEventListener("click...
true
6257ce69ad49ddbe878e06177a715fac2fdbe814
JavaScript
raj2k00/Dice
/index.js
UTF-8
495
3.25
3
[]
no_license
var p1=Math.random(); p1=p1*6+1; p1=Math.floor(p1); v1=document.querySelectorAll("img")[0]; v1.setAttribute("src","images/dice"+p1+".png"); var p2=Math.random(); p2=p2*6+1; p2=Math.floor(p2); v2=document.querySelectorAll("img")[1]; v2.setAttribute("src","images/dice"+p2+".png"); if(p1>p2){ document.querySelecto...
true
82cba7bc19d01cb8e352dcee37dea77f4338fc03
JavaScript
ljrdemail/AID1810
/Ajax/Day03/static/js/01-search_jquery.js
UTF-8
747
2.75
3
[]
no_license
$(function () { $("#uname").keyup(function () { /** * 请求地址:/01-search * 请求方式:get * 请求参数:uname * 响应数据:['',''] * */ $.get("/01-search", "uname=" + this.value, function (data) { //data 是相应回来的数据 直接被转换成js数据 if (data.length > 0) { ...
true
b61482379d59331c13eff8f0d016b691a5a167c3
JavaScript
ColineVL/EISC209_Projet_GestionnaireDeTaches
/projet/taskmanager/static/js/histogramActivity.js
UTF-8
955
2.875
3
[]
no_license
// On récupère les données utiles let list_dates = JSON.parse(document.getElementById('list_dates').textContent); let data = []; // On les met dans une liste propre for (let date of list_dates) { data.push([Date.UTC(date[0], date[1], date[2], date[3], date[4])]); } // On crée un chart Highcharts.chart('graph', { ...
true
56c02e687bfe2b552686a42336f44f3d3401c6e5
JavaScript
alveraboquet/proj
/houtaiweb_admin/src/utils/Storage.js
UTF-8
592
2.65625
3
[]
no_license
const LOCAL_PRIMARY_KEY = 'DBS_ADMIN_DES82821_' /** * 本地储存 */ class Storage{ //设置数据 static setLocalData(key, value){ localStorage.setItem(LOCAL_PRIMARY_KEY + key, value); } //取出数据 static getLocalData(key){ return localStorage.getItem(LOCAL_PRIMARY_KEY + key); } ...
true
7b2d9abb8fbdcb09e7125afb5ddd8c83844c7967
JavaScript
its-nedum/movie-search-app
/js/script.js
UTF-8
5,537
2.546875
3
[]
no_license
const search = document.getElementById('searchbtn'); search.addEventListener('click', () =>{ const query = document.getElementById('query').value; if(query.length < 3){ alert("Your movie name is too short!") } else{ const apiEndpoint = `http://www.omdbapi.com/?s=${query}&apikey=bb4d0a41`; const getMovies...
true
94f0741f0aec8c340059bd74e87df2c6a73bfa8c
JavaScript
chae-chae/BaekJoon
/9012.js
UTF-8
673
3.5
4
[]
no_license
const fs = require("fs"); const filePath = process.platform === "linux" ? "/dev/stdin" : "./input.txt"; let input = fs.readFileSync(filePath).toString().trim().split("\n"); const n = parseInt(input[0]); input.splice(0, 1); for(let i = 0; i<n; i++){ const string = input[i]; const stack = []; let res = "YES...
true
1bdf1f8a0a178421d62758ed751db85bf8edb9d2
JavaScript
alto4/ResumeGenerator
/src/components/PreviewButton.js
UTF-8
2,355
2.734375
3
[]
no_license
import React, { useState } from 'react'; const PreviewButton = () => { // Hold state of user mode and potentially removed placeholder contents const [preview, setPreview] = useState(false); const [placeholders, setPlaceholders] = useState([]); // Switch between preview and edit mode const togglePreview = (e...
true
18e9e77bb6007d9de3772a827fab5c0b0ce65771
JavaScript
abeegit/barba
/scripts/main.js
UTF-8
736
2.625
3
[]
no_license
(function() { $('.nav-carousel').slick({ infinite: false, arrows: false, slidesToShow: 1, slidesToScroll: 1 }); function animateLogo() { TweenMax.to(document.querySelector(".logo"), 4, { "background-color": "#8B6969" }); }; function initialize() { ...
true
28a4eff31e434ef6eef4cb562c6cc7dec6d0bb12
JavaScript
boyz-ii-mern/BoysIIMERN
/client/src/components/eventContent/Superlatives/addSuperlativeForm.js
UTF-8
2,705
2.515625
3
[]
no_license
import React, { Component } from "react"; import api from '../../../api'; class SuperlativesForm extends Component { constructor(props) { super(props); this.props = props this.eventId = props.eventId this.userId = props.userId this.friends = props.friends || [] this...
true
e188c4cadc5310032ad61badc3ab8306e8b27ac6
JavaScript
GregLahaye/listwo-frontend
/src/Lists.js
UTF-8
4,376
2.515625
3
[]
no_license
import AuthContext, { deauthorize, isAuthenticated, request, } from "./AuthContext"; import { Link, navigate } from "@reach/router"; import React, { useContext, useEffect, useState } from "react"; import Skeleton from "react-loading-skeleton"; const Lists = () => { const [auth, setAuth] = useContext(AuthContex...
true
603e861ee69f73da3b537e8df12d3195d052229c
JavaScript
Michael-ibanez/MiMr
/test/scripts.js
UTF-8
358
3.078125
3
[ "Apache-2.0" ]
permissive
/* Manny's Script-A-Nator v.0.0.0.1 :) */ alert("Just type a value into the input box, and it will update the total field"); var inputVal = 0 ; function getInputValue(){ inputVal = document.getElementById("hours").value; var newHours = document.createTextNode(inputVal); document.getElementById("...
true
81039c49badc23e36e1582f80f02123b747c2f2a
JavaScript
niranjangp/react-food-order-app
/.history/src/store/CartProvider_20211005000344.js
UTF-8
1,406
2.609375
3
[]
no_license
import { useReducer } from 'react'; import CartContext from './cart-context'; const defaultCartState = { items: [], totalAmount: 0 }; const cartReducer = (state, action) => { if (action.type === 'ADD') { const updItems = state.items.concat(action.item); const updTotalAmount = state.totalAm...
true
ebe5048e967d035b67d275fafc03ee4581623db4
JavaScript
house-rappers/cs171-final-project
/CS171_Midterm2_Gallagher/js/barchart.js
UTF-8
4,014
3.171875
3
[ "MIT" ]
permissive
/* * BarChart - Object constructor function * @param _parentElement -- the HTML element in which to draw the bar charts * @param _data -- the dataset 'household characteristics' * @param _config -- variable from the dataset (e.g. 'electricity') and title for each bar chart */ BarChart = function(_pare...
true
273528f314cdbbc87e8b162112bd2005f864251f
JavaScript
HerrEmil/LegendaryJourney
/js/hero.js
UTF-8
5,167
2.765625
3
[]
no_license
window.lj = lj || {}; const fightEl = document.getElementById("fight"); const damageEl = fightEl.querySelector(".damage"); const hitEl = fightEl.querySelector(".hit"); lj.hero = (() => { let currentDir = null; let room = null; let creaturesAndItems = null; let // col, row currentTile = [5, 9]; let isB...
true
b0313ddf2f45a10eb788b3882a72a04ecc7b710e
JavaScript
mediassumani/SoccerU
/controllers/middlewares/checkAuth.js
UTF-8
709
2.5625
3
[ "Apache-2.0" ]
permissive
const jwt = require('jsonwebtoken'); // Constantly checks if the user is Autheticated const checkAuth = (request, response, next) => { if (typeof request.cookies.SUToken === 'undefined' || request.cookies.SUToken === null) { request.user = null; console.log('user not authenticated'); }else{ ...
true
03926e8bb06b83529c85f19e5ee32086bca9cc67
JavaScript
woland84/kat
/src/js/input/form/fieldparser/TextAreaParser.js
UTF-8
4,012
2.5625
3
[]
no_license
/** * Field processor for text fields. For more details see @link{kat.input.form.fieldparser.FieldParser} * * @author <a href="mailto:m.dumitru@jacobs-university.de">Alex Dumitru</a> * @author <a href="mailto:v.merticariu@jacobs-university.de">Vlad Merticariu</a> */ FlancheJs.defineClass("kat.input.form.fieldpars...
true
ad2b1f968c2950a23c3c6c839b939c7f646b0b9e
JavaScript
Corrots/drag
/base.js
UTF-8
284
2.53125
3
[]
no_license
// JS document window.onload=function(){ var oDiv=document.getElementById('div1'); oDiv.onmousedown=function(ev){ var oEvent=ev||event; var disX=oEvent.clientX-oDiv.offsetLeft; var disY=oEvent.clientY-oDiv.offsetTop; oDiv.onmousemove=function(){ } } }
true
57900168b63a3615193d3dfe7ba0d051219d6e75
JavaScript
Mukesh23singh/reptar
/lib/cli/init.js
UTF-8
1,544
2.640625
3
[ "MIT" ]
permissive
import fs from 'fs-extra'; import path from 'path'; import inquirer from 'inquirer'; import spawn from 'cross-spawn'; import log from '../log'; export default async function init() { log.info('Init a new Reptar site'); const destination = process.cwd(); const questions = [ { type: 'confirm', na...
true
da8454215b613b69db054552faa785a3cd937aa4
JavaScript
inbalchen/RGBgame
/JS/rgbgame.js
UTF-8
2,540
3.390625
3
[]
no_license
var numofsquares = 6; var colors = generatecolors(numofsquares); var squares = document.querySelectorAll(".square"); var colorDisplay = document.getElementById("colordisplay"); var resmsg = document.querySelector("#resultmsg"); var h1 = document.querySelector(".gametitle"); var resetbtn = document.querySelector("#reset...
true
ec71918c15d3b4e10313c87c504db3b5d4afe5ff
JavaScript
codr/bhardin.github.com
/_includes/sharing.js
UTF-8
1,368
2.6875
3
[ "MIT" ]
permissive
<script type="text/javascript"> $(document).ready(function() { // Facebook $( ".badge.facebook" ).children().each(function(index,value) { var facebook_button = $(this); var url = facebook_button.attr("data"); jQuery.getJSON("http://graph.facebook.com/?id="+url, function(data) { if (typeof data.shares ...
true
c09d24817f1797051da0ed04b4db4cc82ccfbca5
JavaScript
marabigo/marabigo-ver2
/js/canvas.js
UTF-8
5,644
2.625
3
[]
no_license
/*global YUI, console, Image */ /*jslint undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, strict: true, newcap: true, immed: true */ "use strict"; YUI().add('canvas', function(Y) { function Canvas(config) { Canvas.superclass.constructor.apply(this, arguments); } ...
true
172f795613627af8ef55cf9892d5b8bb09a827f4
JavaScript
EzexnDev/js-snack-es6
/JSnack 1/jssnacks.js
UTF-8
342
3.09375
3
[]
no_license
var palla = { 'nome': 'palla', 'peso': 10, 'toString': function() { return `La proprieta nome contiene ${this.nome} La proprieta peso contiene ${this.peso}`; } }; // console.log(palla.toString()); //JSnack 1A palla.peso = parseInt(prompt('Inserisci un peso')); console....
true
0faf6adf960956c2042473fdd8ca1be6597d9f98
JavaScript
maxhamz/todo-server
/helpers/errorModel.js
UTF-8
252
2.6875
3
[]
no_license
// class CustomError { // constructor(type, message) { // this.type = type; // this.message = message; // } // } module.exports = function(code, message) { let err = new Error(message) err.code = code return err }
true
8f827b945768e414858ab0dd64007017e9f6f8e4
JavaScript
Alexandre-Georges/plane-tracker
/common/callback-handler.js
UTF-8
631
2.609375
3
[]
no_license
const create = () => { let generalErrorCallback = null; const callbackMap = {}; const addGeneralErrorCallback = (callback) => (generalErrorCallback = callback); const executeGeneralErrorCallback = (error) => generalErrorCallback(error); const addCallback = (id, callback) => (callbackMap[id] = callback); c...
true
598f6f24f87320a4af9658b009195579645e880d
JavaScript
vschau/CrkingtheCode
/1-ArraysAndStrings/3-URLify.js
UTF-8
824
4.46875
4
[]
no_license
// Replace all spaces in a string with '%20' if given true length of a string. // Input : "Mr John Smith", 13 // Output : Mr%20John%20Smith // Input : "Mr John Smith ", 13 // Output : Mr%20John%20Smith // Solution: split string into char array. Replace space chars with '%20' and join back to get string. // Assume ...
true
c2f89130366e8b1532f5295c64ab2cf37e067fbc
JavaScript
canawa7/crwn-clothing
/src/App.js
UTF-8
5,229
2.59375
3
[]
no_license
import React from 'react'; import './App.css'; import {Route, Switch, Redirect} from 'react-router-dom'; import HomePage from './pages/homepage/homepage.component'; import ShopPage from './pages/shop/shop.component'; import Header from './components/header/header.component'; import SignInAndSignUpPage from './pages/si...
true
712033a6291916423e0a275cea81c4ad502b0ad3
JavaScript
bferriman/hacker-news-search
/src/utilities/api.js
UTF-8
1,045
2.703125
3
[]
no_license
import axios from "axios"; const searchAPI = (params, page) => { // configure URL for sort by relevance or date let queryURL = `http://hn.algolia.com/api/v1/${params.sortBy === "relevance" ? "search" : "search_by_date"}?`; // add query for search text if (params.searchText) { const queryStr = params.sear...
true
399540f937b1b954be19a9ad61b20e9920626081
JavaScript
Html5wanghang/js-leetcode
/leetcode/editor/cn/[23]合并K个升序链表.js
UTF-8
1,994
3.671875
4
[]
no_license
//给你一个链表数组,每个链表都已经按升序排列。 // // 请你将所有链表合并到一个升序链表中,返回合并后的链表。 // // // // 示例 1: // // 输入:lists = [[1,4,5],[1,3,4],[2,6]] //输出:[1,1,2,3,4,4,5,6] //解释:链表数组如下: //[ // 1->4->5, // 1->3->4, // 2->6 //] //将它们合并到一个有序链表中得到。 //1->1->2->3->4->4->5->6 // // // 示例 2: // // 输入:lists = [] //输出:[] // // // 示例 3: // // 输入:lists = [[]]...
true
62e0242a7e6e43eb1574fd41943fdc781d37883f
JavaScript
hahs-92/pokedex
/src/pages/Home.js
UTF-8
2,674
2.53125
3
[ "MIT" ]
permissive
import { useState, useEffect } from 'react' import { useSelector, useDispatch } from 'react-redux' //ESTILOS import styles from '../styles/Home.module.css' //COMPONENTS import Header from '../components/Header' import ListCardMain from '../components/ListCardMain' import Loader from '../components/Loader' //actions cre...
true
346b16d54b2afffa9f6f6699c054329a0fe759b8
JavaScript
James-H33/Algorithms
/easy/same-tree.js
UTF-8
1,207
3.53125
4
[]
no_license
/** * 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 ? null : right) * } */ /** * @param {TreeNode} p * @param {TreeNode} q * @return {boolean} * S...
true
251a6a21218d6549d1a49c5a8c9a60aa3481d646
JavaScript
adrienjoly/thtr
/fetch-emoji.js
UTF-8
984
2.625
3
[]
no_license
const request = require('request') const EMOJI_DEF = /data-c="([^"]+)"\>([^\<]+)/g; var URL = 'http://facebook-emoticons.fr.downloadastro.com/tools/'; // other source: http://pastebin.com/raw/hzURT2EX (201 emojis in french) const processName = name => name .toLowerCase() .replace(/[Tt].te d[e\']/, '') // tête d...
true
5dbb50f0fe7759455c002e81fedc48d2aaee1edd
JavaScript
FikirYibeltal/eder-website
/src/reducers/username-reducer.js
UTF-8
255
2.546875
3
[]
no_license
import {USERNAME_UPDATE} from '../actions/username-action'; export default function usernameReducer(state=[],{type,payload}){ switch(type){ case USERNAME_UPDATE: return { ...state,username:payload.username } default: return state; } }
true
3d6121c4cd7145570c8abc62913077e40a736757
JavaScript
exactlyaaron/capstone
/app/static/js/es6/sockets.es6.js
UTF-8
1,691
3
3
[]
no_license
/* global io */ /* jshint unused:false */ (function(){ 'use strict'; $(document).ready(initialize); var socket; function initialize(){ initializeSocketIo(); $('#send').click(send); } function send(){ var message = $('#message').val(); $('#message').val(''); socket.emit('send-messag...
true
7e023c9ca378b93848f531cbf669cadb8ca0bf6c
JavaScript
TioChrisGt/Tarea-9-
/Rutas.js
UTF-8
1,269
2.5625
3
[]
no_license
var funcion = require('./funcion'); // Ruta para tamaño exports.buscar_porTamanio = function (req, res) { const arreglo = funcion.tamanio(); res.render('tamanio.html', { data: arreglo }); } // Ruta experiencia exports.Buscar_porExperiencia = function (req, res) { const puntosmin = req.body.m...
true
be6d8a229b51fcd99e7293e731ab2b308fc5c0af
JavaScript
AppRiver/IWC
/dist/iwc.js
UTF-8
42,226
2.640625
3
[ "MIT" ]
permissive
//https://github.com/slimjack/IWC var SJ = SJ || {}; SJ.ns = function createNameSpace(namespace) { var nsparts = namespace.split("."); var parent = SJ; if (nsparts[0] === "SJ") { nsparts = nsparts.slice(1); } for (var i = 0; i < nsparts.length; i++) { var partname = nsparts[i]; ...
true
89a234ef0316b5b76dae75868bd6668666cc6a11
JavaScript
durbonca/fundamentos-js
/Clases/clase2 - strings/clase.js
UTF-8
3,379
4.59375
5
[]
no_license
//para declarar un string (cadena de texto debemos de colocarlo entre comillas simples o dobles) var nombre = 'manuel'; var apellido = "DURAN"; console.log("El nombre es "+nombre+" y el apellido es "+apellido); // para pasar toda una cadena a mayuscula podemos usar la funcion "toUpperCase()" var nombreEnMayus = nom...
true
de4e18b319b0de94017ef3fa835a3fd61ab92e3e
JavaScript
Rickert-Gonzales/Covid-19-mapa
/app.js
UTF-8
2,670
3.25
3
[]
no_license
//importamos los estilos para el mapa import styles from "./styles.js"; //asignamos el div con id mapa a una constantes const $map = document.querySelector("#map"); //llamamos a la clase mapa que tiene nuestra API //primer parametro - pasar la clase con el id map //segundo parametro - difinor en donde se dibu...
true