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
9600d98dc6ab9a8524ab3404f10d1cc841057539
JavaScript
3words/CSCI2720-Bus-App
/src/admin/Admin.jsx
UTF-8
8,966
2.703125
3
[]
no_license
/* Group Memeber: Yu Chun Fung Ray 1155094125 Pun Man Wing 1155092833 Ho Shing Fung 1155105818 Yip Kai Hin 1155105796 */ import React, { useState, useRef, Component } from 'react'; import './Admin.css'; import axios from 'axios'; import { Link } from 'react-router-dom'; import 'react-dropzone-uploader/dist/styles.css...
true
d3cfc2bbb01e77a5d386708469779206f1eee9ff
JavaScript
Gamelle-adm/sescroquettes-api
/routes/searches.js
UTF-8
1,741
2.5625
3
[]
no_license
const searchesRouter = require('express').Router(); const Search = require('../models/search'); searchesRouter.get('/', async (req, res) => { const dataToSearches = []; await Search.findBrands() .then((results) => { dataToSearches.push(results); }) .catch((err) => { console.log(err); ...
true
47e7a228d7a71d0553fc0f883d50f3775c28683b
JavaScript
mathans1695/finding-falcone
/src/components/ChoosePlanet/ChoosePlanet.js
UTF-8
1,179
2.625
3
[]
no_license
import React from 'react'; import './ChoosePlanet.css'; function ChoosePlanet(props) { const handleChange = (e) => { const id = e.target.parentElement.id; const value = e.target.value; let distance; for (let i=0; i<e.target.options.length; i++) { if(e.target.options[i].selected === true) { distance ...
true
cb3a37a55cb7a6a5d66fd6441cbd94209064690f
JavaScript
xJocz/AppMataMosquito
/jogo.js
UTF-8
2,083
2.953125
3
[]
no_license
var altura = 0 var largura = 0 var vidas = 1 var tempo = 15 var cont = 1500 var nivel = window.location.search nivel = nivel.replace('?', '') if (nivel === 'facil') { cont = 1500 } else if (nivel === 'normal') { cont = 1000 } else if (nivel === 'dificil') { cont = 750 } functi...
true
f70b93e1c90bac68bd8ed43194d702225d0af966
JavaScript
patrick-breen21/eLearningAnalyticsCapstone
/_deprecated/other_files/dynamic_select.js
UTF-8
2,458
2.8125
3
[]
no_license
Liferay.DynamicSelect = new Liferay.Class( { /** * OPTIONS * * Required * array {array}: An array of options. * array[i].select {string}: An id of a select box. * array[i].selectId {string}: A JSON object field name for an option value. * array[i].selectDesc {string}: A JSON object field name f...
true
0094340d6ccad08ae59ada4b3a643029ee0e0b26
JavaScript
invincibleJai/instagram-backend
/routes/posts.js
UTF-8
1,365
2.546875
3
[]
no_license
const express = require("express"); const Post = require("../models/Post"); const router = express.Router(); //Get Posts list router.get("/", async (req, res) => { try { const posts = await Post.find(); res.json(posts); } catch (err) { res.json({ message: err }); } }); //Submit Post data router.post...
true
913136c0648c9d182ebd9df109c5f536e1b49c24
JavaScript
AlexanderMukas/js-lessons
/patterns/1.Creational-Design-Patterns/1_Constructor.js
UTF-8
743
3.453125
3
[]
no_license
// 1. Constructor //////////////////////////////// es5 ////////////////////////// // Class implementation and create like Class method function Server( name, ip ) { this.name = name this.ip = ip }; Server.prototype.getUrl = function() { return `https://${this.ip}:80`; }; // create new instance object cons...
true
2a92e575b4a506a29af7ebce6f213c3139c5407e
JavaScript
matthisk/ES6Compatibility
/misc/Proxy,internalgetcalls.sjs
UTF-8
13,039
2.921875
3
[]
no_license
/* Name: Proxy, internal 'get' calls * Category: misc * Significance: tiny * Link: http://www.ecma-international.org/ecma-262/6.0/#sec-proxy-object-internal-methods-and-internal-slots */ /* * Test: ToPrimitive */ function() { // ToPrimitive -> Get -> [[Get]] var get = []; var p = new Proxy({toString:...
true
3649fc5a86669b1704c8170d52cf1245c119451a
JavaScript
RamaNarayan/LMS
/source code/static/reducers/fines.js
UTF-8
455
2.578125
3
[]
no_license
import * as ActionTypes from '../actionCreators/actionTypes'; import {Map, List, fromJS} from 'immutable'; const initalState = fromJS({ finesData:null }); function setFineData(state,finesData){ return state.set('finesData',fromJS(finesData)) } export default function(state = initalState, action) { ...
true
c59bbbd138f696b7e050c47322198fef625d3788
JavaScript
onurhancaglan/tetris
/game.js
UTF-8
22,416
2.765625
3
[]
no_license
"use strict" // Load the script var script = document.createElement("SCRIPT"); script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js'; script.type = 'text/javascript'; script.onload = function () { var nextRandomObject = tetrisGame.gameObjects.getRandomObject()...
true
cc6a35e052ecee20933f42f8d8621f236d2665cf
JavaScript
bullego/Sedona
/develop/js/index.js
UTF-8
1,421
2.703125
3
[]
no_license
'use strict'; window.onload = function() { //____________________main-nav btn-mobile var navMenu = document.querySelector('.main-nav'); var btnClose = document.querySelector('.main-nav__btn-close'); var btnOpen = document.querySelector('.main-nav__btn-open'); btnClose.classList.add('btn-show'); btnClose.addEve...
true
9847ed72df176ae1cb799579c29271cc89cdc02e
JavaScript
gouqingping/yldct
/Obsx/core/Dep.js
UTF-8
906
2.65625
3
[]
no_license
/* * @Autor : Pat * @Description : Dep * @Email : gouqingping@yahoo.com * @Date : 2020-07-09 09:32:10 * @LastEditors : Pat * @LastEditTime : 2020-12-01 11:36:52 */ export default class Dep { constructor() { this.subs = []; this.target = null } /** * @descr...
true
e99b9d937c78e8635012b29599fb70e5e32fd877
JavaScript
swarthyman/test
/threed/Scene3D.js
UTF-8
3,431
3.203125
3
[]
no_license
function Scene3D(label) { // PUBLIC this.label = label; // PRIVATE var list = []; var cameras = []; var currentCameraIndex = 0; var canvas; var img; var imageData; var ctx; // PRIVILEGED this.add = function(obj) { if (typeof obj === "undefined") { console.error("forgot to add a...
true
f1e24602093ca6b5e3e7f1682c871894a8c9d5f4
JavaScript
ingnicolaspj/EjericiosJavaScript
/22052021/objetos.js
UTF-8
1,468
3.890625
4
[]
no_license
// Object literal Object Contructor const producto = { nombre:'Xbox Series X', precio:12000, disponible:true, informacion:{ medidas:{ peso:'1kg', medida:'1m' } } } const fabricacion = { pais:'China' } function Producto (nombre,precio...
true
40adda6e6dc3ebf3df96f1af74edcc22423a1ae0
JavaScript
luliyucoordinate/Leetcode
/src/1191-K-Concatenation-Maximum-Sum/1191.js
UTF-8
348
3.0625
3
[]
no_license
var kConcatenationMaxSum = function(arr, k) { var mod = 1e9 + 7, cur = 0, res = 0, total = 0; for (let num of arr) total += num; for (var i = 0; i < arr.length*Math.min(k, 2); ++i) { cur = Math.max(cur, 0) + arr[i%arr.length]; res = Math.max(res, cur); } return Math.max(0, res, ...
true
68a701f37e2397817002ec91a4ccf2f7a0bdaf93
JavaScript
mTarik12/homework
/homeWork4/script.js
UTF-8
3,387
3.859375
4
[]
no_license
// task1 function testThrow(exception) { throw new Error(`Caught: ${exception}`); } try { testThrow(new Error('An error happened')); } catch (exception) { console.log(exception.message); //console.log(exception.name); //console.log(exception.stack); } console.log('--------------------...
true
99b12bd485db8eaabd52c30e760dfbdb858cb59d
JavaScript
alan-wu/ZincJS
/src/primitives/pointset.js
UTF-8
2,356
2.984375
3
[ "MIT" ]
permissive
const THREE = require('three'); const Points = require('../three/Points').Points; /** * Provides an object which stores points and provides method which controls its position. * This is created when a valid json file containing point is read into a {@link Zinc.Scene} * object. * * @class * @author Alan Wu * @r...
true
490db22212cf6d18b9a9d5f1575a8dc3edd065bc
JavaScript
ztrmanom/nodejs
/nodejs/WebContent/ch06/file_writing/file_write_sync.js
UTF-8
508
3.453125
3
[]
no_license
/** * 동기적 파일 쓰기 * 아래 코드는 기본 동기적 쓰기 방식을 사용해 * 연속된 문자열 데이터를 파일에 저장하는 방법을 보여준다. */ var fs = require('fs'); var veggieTray = ['carrots', 'celery', 'olives']; fd = fs.openSync('../data/veggie.txt', 'w'); while(veggieTray.length) { veggie = veggieTray.pop() + " "; var bytes = fs.writeSync(fd, veggie,...
true
42c0e2ecbdfc24beb54feebcd9ce115c2f83f5b5
JavaScript
EmirVatric/calculator
/src/logic/operate.js
UTF-8
929
2.953125
3
[]
no_license
import Big from 'big.js' const operate = (numberOne, numberTwo, operator) => { const regex = new RegExp('[.]{2,}'); if (regex.test(numberOne) || regex.test(numberTwo)) { return 'error' } else { let numOne = numberOne === null ? Big(0) : Big(numberOne) let numTwo = numberTwo === null ? Big(0) : Big(n...
true
eeb28c80497fb72637e49218d90c8173a7310161
JavaScript
gaga1227/_gaga
/35_react.js/02_modernReactWithRedux/weather/src/containers/search_bar.js
UTF-8
1,870
2.859375
3
[ "MIT" ]
permissive
import React, { Component } from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { fetchWeather } from '../actions/index'; class SearchBar extends Component { constructor(props) { super(props); // init component state this.state = { term: '' }; // bind...
true
fb7942f6352410cee87dd58fa685603957dc6ee1
JavaScript
kinderasteroid/PythonBot
/users/static/script1.js
UTF-8
306
3.03125
3
[]
no_license
function validate(event){ // Get the username and password values var username = document.getElementById('username').value; var password = document.getElementById('password').value; // Perform validation (example: check if username is "admin" and password is "password") };
true
c367207212f57687e08df7ca8e01d95f7ec35e1d
JavaScript
brucou/slim
/tests/graphs/no-hierarchy-eventful-eventless-guards.graphml.fsm.js
UTF-8
2,659
2.953125
3
[]
no_license
// Copy-paste help // For debugging purposes, functions should all have a name // Using natural language sentences in the graph is valid // However, you will have to find a valid JavaScript name for the matching function // -----Guards------ // const guards = { // "condition1": function (){}, // "condition2": funct...
true
00a1279c43859c5ea34fb9097bb72295b0493146
JavaScript
Arunaudayanga/salon-web-app-front-end
/src/views/Appointment/AddAppointment.js
UTF-8
2,568
2.84375
3
[]
no_license
import React,{useState} from "react"; import axios from "axios"; import "./Appointment.css"; export default function AddAppointment(){ const [appointment_id, setAppointment_id] = useState(""); const [customer_name, setCustomer_name] = useState(""); const [service_type, setService_type] = useState(""); const ...
true
4558c496982a01c4ec5c612be3444aa030ec64ab
JavaScript
AndresHernandez301540/ProblemasSlak
/Sumas3Numeros.js
UTF-8
424
3.4375
3
[]
no_license
function sumar(numero) { var numeros = [12, 27, 9, 3, 21, 6, 18, 24, 15]; var sumas = []; for (var i = 0; i < numeros.length; i++) { for (var j = i + 1; j < numeros.length; j++) { for (var k = j + 1; k < numeros.length; k++) { if (numeros[i] + numeros[j] + numeros[k] == numero) { suma...
true
9d3d4e5855536fbf178e8c17110728de3ff7710b
JavaScript
andrycarrasco/control-turnos
/js/app.js
UTF-8
7,283
2.84375
3
[]
no_license
const mascotaInput = document.querySelector('#mascota'); const propietarioInput = document.querySelector('#propietario'); const telefonoInput = document.querySelector('#telefono'); const fechaInput = document.querySelector('#fecha'); const horaInput = document.querySelector('#hora'); const sintomasInput = document.quer...
true
81dca874ae8a983ab2e7d8060d344acfdee63af3
JavaScript
SteveWSmith/DailyRindMealPlanningApp
/client/mealClient/Calendar/Calendar.js
UTF-8
8,307
2.53125
3
[]
no_license
// @ts-check import React from 'react'; import { StyleSheet, View } from 'react-native'; import WeekCalendar from './WeekCalendar'; import FullCalendar from './FullCalendar'; import DayTitleBar from './DayTitleBar'; import MealList from '../meal-list/meal-list'; import { BackHandler } from 'react-native'; import...
true
1123b839181f99ec22a62dc0200a931eee935e05
JavaScript
ShamikaGK/MoviesCorner
/models/User.js
UTF-8
2,708
2.515625
3
[]
no_license
var mongoose=require('mongoose'); mongoose.connect('mongodb://localhost/MoviesCorner', function(err, db) { if (err) { console.log('Unable to connect to the server. Please start the server. Error:', err); } else { // server.start(); console.log('Connected to Server successfully!'); } }...
true
bd5adf03db3d87f267ca546a8a966bc45061391d
JavaScript
anru/utils.js
/src/string/replace.js
UTF-8
768
3.296875
3
[ "Apache-2.0" ]
permissive
import curryN from '../function/curryN'; /** * Replace a substring or regex match in a string with a replacement. * * @param {RegExp|String} pattern A regular expression or a substring to match. * @param {String} replacement The string to replace the matches with. * @param {String} str The String to do the search...
true
3c25ada81cd351c39fe2eaac22c6a00cd91e841e
JavaScript
mjsalerno/StopLeak
/app/scripts/storage.js
UTF-8
12,038
2.6875
3
[ "MIT" ]
permissive
/* global chrome, BLOCKED_STRINGS, SETTINGS, CUSTOM_SETTINGS, SWWL, ACTION_ALLOW, ACTION_DENY, ACTION_SCRUB, ACTION_UNKNOWN, BLOCK_COOKIES, BLOCK_URL_LEAK*/ 'use strict'; var stopleak = stopleak || {}; stopleak.noMatchRegex = new RegExp('a^', 'gi'); stopleak.piiRegex = stopleak.noMatchRegex; stopleak[BLOCKED_STRINGS]...
true
f1683279b4948f6967c373bb0805412a5a7ab2bb
JavaScript
nadvamir/gg-architecture
/souls-adrift/src/game-engine/ai/NpcRoam.js
UTF-8
1,511
2.53125
3
[ "MIT" ]
permissive
import { processGoTo } from "../actions/GoTo" import { Reflection } from "../util/Reflection" const ROAM_PERIOD = 1 * 60 * 1000 const ROAM_CHANCE = 50 // if at least ROAM PERIOD has passed, move npcs around // but don't leave the main area class NpcRoam { constructor(ai, gameEngine) { this.ai = ai ...
true
d644660af032621faf7c0176d20a9dde357296d3
JavaScript
Eddiev15/Trivia
/assets/javascript/app.js
UTF-8
7,957
3.1875
3
[]
no_license
// Define variables $(document).ready(function(){ var count = 0; var time = 31; var isSelected = false; var ticker; var correct = 0; var incorrect = 0; var unanswered = 0; // Questions and Answer Arrays var question = ["What hoopster scored in double figures in 787 straight games, from ...
true
0f320f199b51dc01135ebfb8ea814be464112e27
JavaScript
itneepco/hrms-server
/routers/functions/generate-password.js
UTF-8
800
2.5625
3
[]
no_license
const User = require('../../model/shared/user.model'); const bcrypt = require('bcrypt-nodejs'); function generatePassword() { return new Promise(async (resolve, reject) => { try { const password = Math.random().toString(36).substr(7) // console.log("Password", password) bcrypt.genSalt(10, (err...
true
a533ba814cfbe341d66880119f011efdf8c64e1e
JavaScript
brandonmosher/website
/component/nav/nav-entry.js
UTF-8
1,192
2.5625
3
[ "MIT" ]
permissive
import { textToTemplate } from "Lib/textToTemplate"; import css from "./nav-entry.css"; import html from "./nav-entry.html"; const template = textToTemplate(css, html); customElements.define('nav-entry', class extends HTMLElement { constructor() { super(); const shadowRoot = this.a...
true
ccd8cd3c49293b694fab7afb39c64827746ef492
JavaScript
EskaValier/Aplikacje-Mobilne-Dominik-Soczynski-185IC
/Lab3/lab3/components/Progress.js
UTF-8
1,331
2.5625
3
[]
no_license
import React, { Component } from "react"; import { Text, View, Button } from "react-native"; import styles from './styles' import ProgressBar from 'react-native-progress/Bar'; const kod = `<Progress.Bar progress={this.state.progress} width={200} />`; export default class ProgressElements extends Component { stat...
true
33f71dcbb3d822d5b4e09261fa3c83ffc61f57e3
JavaScript
event-planner-lambda-labs/front-end
/client/src/components/map/Map.js
UTF-8
4,807
2.515625
3
[ "MIT" ]
permissive
import React from "react"; import { GoogleMap, Marker, InfoWindow } from "react-google-maps"; import Search from "./LocationSearchComponent"; import { connect } from "react-redux"; import mapStyles from "../../styles/MapStyles"; import { EventIcon, CurrentLocation } from "../../pictures"; import moment from "moment"; ...
true
99bd6ed3fd2aa745981c15539406d0b6809e5f92
JavaScript
nathanduquette/scraperNews
/server.js
UTF-8
829
2.84375
3
[]
no_license
// dependencies var express = require("express"); var mongojs = require("mongojs"); // initialize express var app = express(); // set static folder for web app.use(express.static("puplic")); // data config/ save data url/ name of collection var datbaseUrl = "news"; var collections = ["stories"]; // mongojs connects...
true
7626e43a4ba98df1f5f591e3ca1dcee60f9e2f32
JavaScript
tobive/timestamp-api
/server.js
UTF-8
1,079
2.828125
3
[]
no_license
var express = require('express') var app = express() var moment = require('moment') app.get('/',function(req,res){ res.send(" pass a string as a parameter, and it will check to see whether that string contains either a unix timestamp or a natural language date") }) app.get('/:id',function(req,res){ console.log(ne...
true
7040236afac56ce172366be6e508d3a8efcb8073
JavaScript
joonilkim/skuol
/examples/src/store.js
UTF-8
1,553
2.5625
3
[]
no_license
import Skuol from 'skuol' import { TODO, INPROGRESS, DONE } from './constants' const commits = { addTodo(state, todo){ const id = state.cardSerial++ const card = { ...todo, id, sortKey: Date.now(), status: TODO, assignee: [...new Set(todo.assignee.split(',').map(x => x.trim(...
true
88260582a621f6fbe89ec5ee0a4ab8a46f1cd697
JavaScript
aroseca15/class_activities_repo
/Week 9/09-NodeJS/03-Algorithms/02-product-of-largest-two/Solved/test/product-of-largest-two.test.js
UTF-8
515
3.453125
3
[]
no_license
let expect = chai.expect; describe("productOfLargestTwo", function() { it("should return the number 966 when given [4, 8, 15, 16, 23, 42]", function() { let arr = [4, 8, 15, 16, 23, 42]; let result = productOfLargestTwo(arr); expect(result).to.eql(966); }); it("should return the number 2 when give...
true
58df04216461b5b1070028a26f6d6c22bf0709aa
JavaScript
adrianflatner/Vexi
/ScrollDraw/scroll.js
UTF-8
1,678
3.03125
3
[]
no_license
// Get a reference to the <path> var path = document.querySelector('#star-path'); // Get length of path... var pathLength = path.getTotalLength(); // Jake Archibald says so // https://jakearchibald.com/2013/animated-line-drawing-svg/ path.getBoundingClientRect(); path.style.transition = path.style.WebkitTra...
true
7ebe985a53fd3ceeff93e8854aa9b1a4b0589956
JavaScript
zhangjunqiang1102/201712react
/React/react12/src/DAY1/props-state.js
UTF-8
939
3.046875
3
[]
no_license
import React, {Component} from 'react'; import ReactDOM from 'react-dom'; import PropType from 'prop-types'; /* * 组件的数据来源有两个地方 * props 外界传递的 默认属性 属性效验 * state 状态是自己的 属性和状态变化都会影响视图更新 * */ class School extends React.Component{//类是的属性就叫静态属性 static propTypes={//效应属性的 age:PropType.number.isRequired // n...
true
b6ab180bdba898c6d783efedd5d8c2ccc79a11e9
JavaScript
ipipip1735/NodeJS
/system/writable.js
UTF-8
1,670
2.921875
3
[]
no_license
const {Writable} = require('stream'); let options = { highWaterMark: 3, decodeStrings: true, write: (chunk, encoding, callback) => { console.log("-----write-----"); console.log(chunk.toString()); console.log(encoding); setTimeout(() => callback(), 200); }, // writev...
true
2212d398136bde5e949736b7438a7bdc6342bd85
JavaScript
lmoroz/codejam-virtual-keyboard
/src/modules/Key.js
UTF-8
1,376
2.734375
3
[]
no_license
export default class Key { constructor({ keyProps, index, defaultSize = '55', layouts = [], }) { this.layouts = {}; const [, code, modifier, size, title, type, chars] = keyProps.match(/^([^:]+):([^:]+):([^:]*):([^:]*):([^:]+):((.|\n)+)$/i); this.code = code; this.type = type; this.layoutKey...
true
e92e3140090b2f3d71d62f9b43f5bd0380bca00e
JavaScript
pfengdev/koikoi-server
/public/js/index.js
UTF-8
3,797
2.84375
3
[]
no_license
var otherPlayers; var deckSize; var aiHand; var table; var pile; var selectedCardIdx; var socket; var gameState; var activePlayerId; var step; var renderer; var playerArea; var centerArea; //Add underscores to make things private i.e. _password //put these in constants js? //how to deal with resizing? ...
true
ccf684178617af2f107e1efa028c901dc7c12f16
JavaScript
Jrperez79/lab-13-User-Adventure
/test/renderSection.test.js
UTF-8
2,492
3.265625
3
[]
no_license
// IMPORT MODULES under test here: import { renderSection } from '../match/questUtils.js'; const test = QUnit.test; const barcelona = { id: 'barcelona', title: 'FC Barcelona', map: { top: '89%', left: '44%' }, image: '', description: ` You are playing against the might ...
true
7e0ad9e94b56a5b0d0fdfd775fc8c308c9305253
JavaScript
RoadHog31/Exam-70-480_-Programming-in-HTML5-with-JavaScript-and-CSS3
/js/navigatingtheDOM.js
UTF-8
1,125
3.625
4
[]
no_license
var btn = document.getElementById('btnSave'); // Returns a live NodeList, which is a special array of all ele - ments with the specified tag name.The live NodeList automatically updates if you add, delete, or modify elements.The following example returns an array of all images: var images = document.getElementsByTagNa...
true
9d5be6baf63d92478c7ad1e06768385ffea583cb
JavaScript
Drramos131/imobiliaria
/public/js/util.js
UTF-8
275
2.515625
3
[]
no_license
$.fn.numeric = function () { this.on('keypress', function(e) { var key = (window.event)?event.keyCode:e.which; if((key > 47 && key < 58)) { return true; } else { return (key == 8 || key == 0)?true:false; } }); }
true
5cec7dce61bbb9baab04fc359b233462c977a017
JavaScript
macr1408/car-shop-react
/src/redux/reducers/mainReducer.js
UTF-8
2,237
2.65625
3
[]
no_license
import GolfImage from '../../images/products/volkswagen-golf.jpg'; import CayenneImage from '../../images/products/porsche-cayenne.jpg'; import Ferrari458Image from '../../images/products/ferrari-458.jpg'; import CivicImage from '../../images/products/honda-civic.jpg'; const initState = { cars: [ { id: 1, ...
true
50d2b178362455cb778b93534dc51f8d35a45e9c
JavaScript
pagarme/artis
/src/utils/masks/masks.test.js
UTF-8
1,967
2.84375
3
[ "MIT" ]
permissive
import { formatInstallments, formatToBRL, removeMask, removeMaskPlaceholder, } from './index' describe('Test replacements for mask replacement functions', () => { it('should remove all mask characters', () => { expect(removeMask('')).toBe('') expect(removeMask('10/12')).toBe('1012') expect(remove...
true
327a732aa61112d80a0f8da7c296b34346b2ffdf
JavaScript
mrrezaahmadi/ClockJS
/scripts/clock.js
UTF-8
669
3.34375
3
[]
no_license
let hour12 = true const changeClock = (input) => { document.querySelector(".time").innerText = input } const makeTime = (hour12 = true) => { const time = new Date() return time.toLocaleTimeString("en-us", { hour12: hour12 }) } changeClock(makeTime()) let interval = setInterval(() => { changeClock(makeTime()) },...
true
856061ff1c4c1d2b7fcaea1d70f3399764bb9b83
JavaScript
rouletz/exerciseJavascript
/exerciseArrayAritmatika.js
UTF-8
875
3.75
4
[]
no_license
/*Diberikan sekumpulan angka dalam array. Tentukan apakah kumpulan angka tersebut merupakan deret aritmatika atau bukan pada function tentukanDeretAritmatika(array) contoh : array = [1,2,3,4,5,6] => antar angka punya selisih yang sama ya itu 1 jadi ini merupakan deret aritmatika. */ function deretAritmati...
true
eb09ad77469fee6b35d1dfcd8e18cb6c5074ab35
JavaScript
Durmaethor/Cover-Bands
/code.js
UTF-8
1,623
3.578125
4
[]
no_license
var coverBands = [ { bandName: 'Living Putsteaks', contact: 'dave@livingputsteaks.com', covering: 'Yardbirds' }, { bandName: 'Petty Theft', contact: 'steve@pettytheft.com ', covering: 'Tompetty' }, { bandName: 'Metalachi', contact: 'arr...
true
8a18bd16c40e9485b14e263757ffd0513897e145
JavaScript
alightedlamp/react-weather-app
/src/helpers.js
UTF-8
1,054
2.703125
3
[]
no_license
export function HttpClient() { this.get = function(aUrl, aCallback) { var anHttpRequest = new XMLHttpRequest(); anHttpRequest.onreadystatechange = function() { if (anHttpRequest.readyState == 4 && anHttpRequest.status == 200) aCallback(anHttpRequest.responseText); ...
true
c908bc8e5e668674ae270d6b1e7beb5111fea8b3
JavaScript
lullabyjune/leetcode
/reconstructQueue-406.js
UTF-8
300
3.40625
3
[]
no_license
/** * @param {number[][]} people * @return {number[][]} */ var reconstructQueue = function(people) { // 我太菜了 people.sort((a, b) => b[0] - a[0] || a[1] - b[1]); const newPeople = []; for (let item of people) { newPeople.splice(item[1], 0, item); } return newPeople; };
true
14f2de4043724af8452b84f91fb502f04686c2cf
JavaScript
oesiXD/PB
/src/store/getters.js
UTF-8
411
2.59375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// https://vuex.vuejs.org/en/getters.html export default { saludo(state) { if (!state.usuario) { return '' } let vocal = state.usuario.sexo && state.usuario.sexo == 'F' ? 'a' : 'o' return `¡Bienvenid${vocal} ${state.usuario.nombres}!` }, Despadida(state){ if(!state.usuario) {return '...
true
5d353026b157c7076e531cf01fe0ae9e8275f654
JavaScript
Miwler/proyecto
/include/js/jTeclas.js
UTF-8
15,521
2.703125
3
[ "MIT" ]
permissive
$(function () { $('.text').keypress(function (e) { /* if (e == null) { e = window.event; } if (e.which == 39) { alert('La tecla presionada no está permitida.'); return false; }*/ }); /*-----------------------Texto - Enteros '001'...
true
efbcaba1e651bbd1153354b90fc538dbec705699
JavaScript
PaulSenon/poc-blurhash-client-web-worker
/src/lib/InView.js
UTF-8
9,302
3.109375
3
[]
no_license
const EVENT = { ENTERING: 'entering', ENTERED: 'entered', LEAVING: 'leaving', LEFT: 'left', VISIBLE: 'visible', }; const isEventValid = (event) => Object.values(EVENT).includes(event); function isSupported() { return !!window.IntersectionObserver; } class InView { constructor({ roo...
true
e571c81dfb6b7f9f72c40dada4e1883a581590c4
JavaScript
famibee/SKYNovel-vscode-extension
/views/tmpwiz.js
UTF-8
1,419
2.609375
3
[ "MIT", "CC-BY-4.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-proprietary-license" ]
permissive
// 別のタブにフォーカスして戻るたびに発生(丸ごと再生成?)するので、このような // リクエストして最新情報をホストにもらう、サーバー・クライアント方式になっている。 // この事実を、createWebviewPanel()したホストは知りもしないので。 const vscode = ('acquireVsCodeApi' in window) ?acquireVsCodeApi() :null; //vscode.postMessage({cmd: 'info', text: 'tmpwiz.js'}); // デバッグ時はこう window.addEventListener('message', e=> { if (!...
true
f0c45d9d1bd386f32136d72f41b2efcd6a6dce20
JavaScript
HenriqueSchmitz/maratona-rocketseat-02
/src/utils/JobUtils.js
UTF-8
636
2.546875
3
[]
no_license
const Profile = require('../model/Profile') module.exports = { remainingDays(job){ let totalDays = (job["total-hours"] / job["daily-hours"]).toFixed() let createdDate = new Date(job["created-at"]) let dueDay = createdDate.getDate() + Number(totalDays) let dueDate = createdDat...
true
08d11f1e055fb342d95f28b2ef24ae2742f11bd0
JavaScript
ariel1995cr/passageSystem
/resources/js/comprar.js
UTF-8
5,332
2.65625
3
[ "MIT", "Unlicense", "LicenseRef-scancode-unknown-license-reference" ]
permissive
var butacasElegidas = []; console.log(datosViaje); $(function() { $(".badge-primary").click(function(e) { var valorPasaje = document.getElementById("tarifa").innerText; var valorPasajePuntos = valorPasaje * 2.5; if (parseInt(e.target.innerText)>=53){ valorPasaje = valorPasaje *...
true
2bbdd29628b1374f1347b6545013587bc7ac218e
JavaScript
lionhard83/sample-hello-world
/index.js
UTF-8
2,060
3.15625
3
[ "MIT" ]
permissive
var express = require('express'); var app = express(); var credit = 100; var extract = function(){ return parseInt(Math.random()*37) } app.get('/evenOdd/:myChoice/:myNumber', function (req, res) { var computerNumber = parseInt(Math.random()*6); var isEven = (computerNumber + parseInt(req.params.myNumber))%2 ===0...
true
0b13eb04dbb44e0430e5fb519e8c41a6fead74de
JavaScript
minoru-person/FiveProgrammingProblemsSVPINO
/Problem1/script.js
UTF-8
498
4.5
4
[ "MIT" ]
permissive
var array = [1,2,3,4,5]; var x = 0; // using for loop for (var i=0; i<array.length; i++){ x = x + array[i]; } console.log(x); var y = 0; var i = 0; //Using while loop while(i<array.length){ y = y + array[i]; i++; } console.log(y); function sumTotal(array, numberOfElements){ if (numberOfElements...
true
20ac04e0fefd9a36fa9cfffc9a1f5eeb98d3c3da
JavaScript
pcmueller/refactor-tractor
/test/recipe-test.js
UTF-8
2,010
2.90625
3
[]
no_license
import { expect } from 'chai'; import Recipe from '../src/Recipe'; import recipeData from './test-data/recipe-test-data'; import Ingredient from '../src/Ingredient'; import ingredientData from './test-data/ingredient-test-data'; describe('Recipe', function() { let recipeInfo; let recipe; beforeEach(function() ...
true
2e3e2b3b6acd6c8c893381c667d0738d00dc096a
JavaScript
bishop-shawn/STube
/src/service/searchRecordService.js
UTF-8
1,094
2.78125
3
[ "MIT" ]
permissive
import { AsyncStorage } from 'react-native'; const key = 'search_history'; let tags = []; const _storeData = async jsonStr => { try { await AsyncStorage.setItem(key, jsonStr); } catch (error) { // Error saving data } }; const _retrieveData = async () => { try { const value = await AsyncStorage.ge...
true
f89f200834a393b1861303b98db440b27b10ab5a
JavaScript
jcharry/100daysofalgorithms
/src/day13-separating-axis-theorem/Polygon.js
UTF-8
1,655
2.65625
3
[]
no_license
import Body from './Body'; import aabb from './AABB'; import vector from './Vector'; var polygon = function(options) { options = options || {}; var B = Object.create(Body); if (!options.vertices) { throw new Error('Polygons MUST be initialized with vertices. See docs.'); } B.init(options);...
true
78cb6a995e47b57a1813737d9014f3ff03ddab79
JavaScript
micuat/CodingChallenges-Alt
/CC_Alt_72_Frogger/lane.js
UTF-8
2,253
3.0625
3
[]
no_license
// Daniel Shiffman // http://codingtra.in // http://patreon.com/codingtrain // Frogger // Part 1: https://youtu.be/giXV6xErw0Y // Part 2: https://youtu.be/06-ZvYmSeus // Part 3: https://youtu.be/hk326ZHlENQ // Part 4: https://youtu.be/c6WdJltqEtM function Lane() { if (arguments.length == 3) { let sketch = argum...
true
864ba3cbe6bb5b2b1e277d58b7294c906f7022a8
JavaScript
pckurdu/Build-A-Library-Application-With-Graphql-ExpressJs-React-Apollo-and-MongoDB-Part-11
/client/src/queries/queries.js
UTF-8
1,224
2.5625
3
[]
no_license
//query for gql module import {gql} from 'apollo-boost'; //authors list query const getAuthorsQuery=gql` { authors{ id name } } `; //book list query const getBooksQuery=gql ` { books{ name type id } } `; //creating mutation to add book...
true
31fff5484ce041f279ad3c9700da5808dc6cb40a
JavaScript
certifiedwaif/GovHack2015
/public/js/drawD3map.js
UTF-8
2,075
2.625
3
[ "MIT" ]
permissive
function drawMap(lat, long, place) { console.log('Drawing map', { lat: lat, long: long, place: place }); const w = 200; const h = 200; const projection = d3.geoMercator() .center([Math.floor(long), Math.floor(lat)]) .translate([w / 2, h / 2]) .scale(10...
true
eff136a88926c367102867d40b472eddc6327a65
JavaScript
thatvictor7/express-server-mastery
/routes/students.js
UTF-8
892
2.671875
3
[]
no_license
const express = require('express') const router = express.Router() let students = require('../students.json') router.get('/', (req,res, next) => { res.json({ students }) }) router.get('/:id', (req,res,next) => { const id = req.params.id const filtered = students.filter(student => { return student.id == id ...
true
f4f22f9060def534efea3d8f872c0814070e88d4
JavaScript
76-Istanbul-Front-End-Bootcamp/odev-hafta-5-ZeynepPinarKaya
/odev.js
UTF-8
2,430
3.4375
3
[]
no_license
import data from "./data.js" import {createTableElements} from "./main.js"; /* ALWAYS USE IMPORTED data ARRAY TO MAKE MANIPULATIONS ID for allcities table is #allcities ID for singlecity table is #singlecity /* /* * PASS ARRAY TO createTableElements function to fill tables * first argument - data * second argu...
true
5e18504949e4b27591c2c9ef969dda6c1e81fb01
JavaScript
karoluju97/web-assign002
/app/models/anime-store.js
UTF-8
2,050
3.015625
3
[]
no_license
'use strict'; const _ = require('lodash'); const animeStore = { animeCollection: require('./anime-store.json').animeCollection, getAllanimes() { return this.animeCollection; }, getanime(id) { let foundanime = null; ...
true
2c1c99c813becbc63dbc41d7ed25a5e708d325c8
JavaScript
pywjh/Django-BillManager
/static/js/common/common.js
UTF-8
768
2.953125
3
[]
no_license
///*=== navMenuStart ===*/ //$(()=>{ // let $navLi = $('#header a'); // $navLi.click(function(){ // $(this).addClass('active'); // }); //}); ///*=== navMenuEnd ===*/ //let url = window.location.href; // "http://127.0.0.1:8000/detials/" let url = location.href; // "http://127.0.0.1:8000/detials/" let ...
true
ab4d15a55bd23c3578705172c556bd478db6f3d8
JavaScript
andrewpetersondev/scrape
/public/assets/logic/app.js
UTF-8
1,990
3.1875
3
[]
no_license
// global variables // ====================================================================== const articleContainer = $(".article-container"); // functions // ====================================================================== function loadPage() { } // function renderArticles(articles){} function showEmptyP...
true
dd25e302497be322f9399197c8b298c30cba19b2
JavaScript
firdausbaihaqi/js-recipe-book
/src/scripts/components/resultModal.js
UTF-8
1,812
2.546875
3
[]
no_license
class resultModal extends HTMLElement { connectedCallback() { this.render(); } set recipe(recipe) { this._recipe = recipe; this.render() } render() { this.setAttribute("id", `modal-${this._recipe.idMeal}`) this.setAttribute("class", "fixed inset-0 z-50 flex ...
true
aadcd7fecf2bed836651882e182b4e4e1473e0a3
JavaScript
vaishnavig11/Comp-4021-Project
/combine.js
UTF-8
4,164
2.84375
3
[]
no_license
const fs = require("fs"); const request = require("request"); const cheerio = require("cheerio") let linkFile = fs.readFileSync('accommodation.json'); let linkJSON = JSON.parse(linkFile); // linkJSON = linkJSON.map((val, index) => { // return {id:index+1, name:val.name} // }) let locationFile = fs.readFileSync('l...
true
97453c39d904f801e00c211461702414981a651f
JavaScript
stephanyes/bootcamp-2
/back/controller/airport_controller.js
UTF-8
2,538
2.859375
3
[]
no_license
//Traerte el servicio const { AirportService } = require('../service/airport_service'); class AirportController { async addPassenger(req, res, next) { try { const service = new AirportService(); const { first_name, last_name, uuid_code, category } = req.body; const passenger_data = { fi...
true
f9e18f6c29b25780aac8c93a2b05e8596357800a
JavaScript
wpyuan/bwoa
/WebContent/js/employee-add-verify.js
UTF-8
3,411
3.375
3
[]
no_license
/* * 判断是否为空方法 */ function isNull(obj){ if(obj.length==0){ return true; } return false; } /* *判断是否是汉字 */ function isHanZi(obj){ var reg=/^[\u0391-\uFFE5]+$/; if(obj!=""&&!reg.test(obj)){ return false; } return true; } /* * 判断手机号是否合法 */ function validatemobile(obj){ var reg=/^...
true
af0905ed2f5c9274cd53248d020854acd944b97c
JavaScript
erwindev9/codeid_01
/06-MenghitungJarakOrdinat.js
UTF-8
231
3.5
4
[]
no_license
function getCordinates(x1, y1, x2, y2) { let r1 = Math.pow(x1 - x2, 2) let r2 = Math.pow(y1 - y2, 2) let r3 = r1 + r2 let koordinat = Math.sqrt(r3) return koordinat; } console.log(getCordinates(3, 4, -4, -5));
true
29979d515c9bd9e0518ace05257260d8034489c2
JavaScript
primaulia/calculatorfest
/js/main.js
UTF-8
1,192
3.671875
4
[]
no_license
// DOM Manipulator file document.addEventListener('DOMContentLoaded', init) function init () { var basic_calc = calculator() var display = document.querySelector('.display') document.addEventListener('keyup', onKeyUp) function onKeyUp (event) { // console.log(event) if (checkKeyCode(event.keyCode))...
true
b3cea94d3bc5feceae97a0d8e2616527b21122a1
JavaScript
topaxi/diplomarbeit-tsbe
/apps/gigpillar_web/assets/js/components/datetime-input.js
UTF-8
2,489
2.890625
3
[]
no_license
import { LitElement, html, customElement, property } from 'lit-element' import { dateConverter } from '../utils' @customElement('datetime-input') class DatetimeInput extends LitElement { @property() inputId = '' @property() dateLabel = '' @property() timeLabel = '' @property() name = '' /** * @type {Date...
true
d45808bee128a71776c64dc123106b45960d1b58
JavaScript
acestudiooleg/monopoly_game
/src/app/store/modules/players/mutations.js
UTF-8
1,711
2.640625
3
[ "MIT" ]
permissive
/* ============ * Mutations for the players module * ============ */ import { findIndex, map, find } from 'lodash/fp'; import { creaceMethodChangeItemInList } from '@/utils/pureMutation'; const nextPlayerIndex = (array, id) => { const i = findIndex({ id })(array); if ((i + 1) < array.length) { return i + 1...
true
b3c520047384277a98aa659cc144867f1072d09a
JavaScript
ChaimF90/redux-tutorial-
/frontend/src/reducers/people.js
UTF-8
271
2.53125
3
[]
no_license
import * as types from '../actions/actionsTypes'; export default function peopleReducer(state = [], action) { switch(action.type) { case types.ADD_PERSON_SUCCESS: return [...state, action.person] default: return state; } }
true
ea6adca0820e567548dd2124bba398773e4f09a0
JavaScript
smathews5/amazon-react-springboot
/src/components/CategoryItem.js
UTF-8
1,979
2.515625
3
[]
no_license
import React from 'react' import ProductItem from "./ProductItem" import {useContext} from "react"; import { useHistory } from 'react-router-dom'; import ProductsContext from "../context/ProductsContext"; const CategoryItem = (props) => { const history = useHistory(); const goToProductsPage = () => history.p...
true
2ee56ef3ef0ef5e2b0deaebb3de9490f8ad2b10b
JavaScript
Jenniely/GB-JS-2
/js/form.js
UTF-8
1,800
3.421875
3
[]
no_license
const str = "He said 'I'll never forget you.' It was the best moment of my life. Yogi Berra famously said, 'A nickel ain't worth a dime anymore.' "; const regex = /\s[']|[']\s|[']$/g; const newStr = str.replace(regex, '"'); console.log(newStr); class Form { constructor() { this.form = document.querySelecto...
true
e69401a18e1acbf6b711807b8244758ceb9ba951
JavaScript
jeonghwan-kim/lecture-making-express
/public/js/script.js
UTF-8
935
2.8125
3
[]
no_license
const tag = '[script]' const http = (method, url, data = null) => new Promise((resolve, reject) => { const req = new XMLHttpRequest() req.open(method, url, true) req.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); req.onreadystatechange = evt => { if (req.readyState == 4) { l...
true
e0aa70325d178e733ff3aebdf8a5892735b701db
JavaScript
mmubuso/trillo-clone-project
/public/src/js/main.js
UTF-8
3,576
3.296875
3
[]
no_license
//import api //variables //button changing list name let editButtonForList = $('.list-of-cards .fa-edit') //holds name for board let editBoard = $('.board-edit') //store board list let board = document.getElementsByClassName('board-of-lists')[0] //store item being dragged let draggedItem //Item that shows when dragged...
true
355d76c863c53dd27351392b45fb2fdd10fe9957
JavaScript
adibadayalya/call
/client/src/components/callComponents/CopyRoomCodeButton.jsx
UTF-8
1,001
2.578125
3
[]
no_license
import React from 'react' import { CopyToClipboard } from 'react-copy-to-clipboard' import { BsClipboard } from 'react-icons/bs' /** * Copy room code button * copies the current room code to clipboard * and then displays an alert that the room code has been copied */ export default function CopyRoomCodeButton({...
true
8a3a5c779bd6ba022792f9d5983a4d1aed0acace
JavaScript
ghSunural/SppLab
/pages/mapCreator/scripts/js-models/Data/TDelaunayTriangulation.js
UTF-8
2,853
2.9375
3
[]
no_license
console.log('Модуль TDelaunayTriangulation'); export let TDelaunayTriangulation = (function () { let instance = { nodeSet: [], edgeSet: [], triangleSet: [] } // TDelaunayTriangulation.prototype.subscribes = []; /* let subscribes = []; let f = function(){ Array.obs...
true
3601de191039fa3cb14a6ab3e2ffed6bf867bf5f
JavaScript
qdk1/leetcode
/2019-02/338-counting-bits/338.js
UTF-8
660
3.703125
4
[]
no_license
#!/usr/bin/node /* */ const countBits = num => { const nums = [...new Array(num + 1).keys()]; return nums.map(x => num1s(x)); }; const num1s = n => { // Count the number of 1s in its binary representation // 1001 <-- Look at the last digit in binary, if odd, it's 1 // Shift right, throwing away t...
true
286d48b645d60f83b8bc30efd9ec42a063c7e58b
JavaScript
NadibHussain/EVS-System
/Frontend(React Based)/src/components/Result/suffleDelay.js
UTF-8
152
2.625
3
[]
no_license
export default array => { array.sort(function(a, b) { return b.countOld -a.countOld; }); console.log(array) return array; };
true
b54f0626dce786962a31a830af00660ed4da01b6
JavaScript
kevinashworth/imdb-pro-bookmarklet
/src/imdb-pro.js
UTF-8
2,159
2.65625
3
[]
no_license
// This version combines better logic, site_preference, more 'bad' words. // Use a break point and site_preference to get desktop version. // Note: site_preference can only be used on Pro URLs. (function () { const x = window.innerWidth || document.documentElement.clientWidth; const bp = 400; const hr = window.l...
true
d68345c771a0e511b6d3fdcf5bd29aecfbdbb669
JavaScript
obu-team/f1
/app/lib/Database.js
UTF-8
1,868
2.578125
3
[]
no_license
'use strict' const mongoose = require('mongoose') const config = require('config') const _ = require('lodash') const fs = require('fs') class Database { /** * Initializing callback function for each event * Calling methods for loading models and event listeners * * @param {function} onConnect [On connect...
true
a0014603e56db8b59d1263f00d60f67eabab56a1
JavaScript
MomsFriendlyDevCo/offline
/src/offline.sw.js
UTF-8
55,031
2.9375
3
[ "MIT" ]
permissive
/** * Offline ReST caching service * This ServiceWorker creates several caches and stores the contents of offline resources within them * * Cache: * 'resource' - The conents of a raw HTTP response (these are either mass-fetched collection records or single url fetches) * 'meta' - Generic meta information ...
true
85362be430df7eec913c279fe4c9d81682405617
JavaScript
kimjaydot/beerConnection
/js/app.js
UTF-8
2,014
2.578125
3
[ "MIT" ]
permissive
// Beer Connection External JavaScript File //Editing Image Slider // $('.carousel').carousel({ // interval: 2000 // }) var mainTexas = {lat: 29.759237, lng: -95.357553}; var mapArray = []; var map = new google.maps.Map(document.getElementById('map'), { zoom: 10, center...
true
2ed8bd51e985a37bd138254dc7f2683575b85238
JavaScript
TinaYounge/timGiaSuBackEnd
/Controllers/Price.controller.js
UTF-8
673
2.515625
3
[]
no_license
const PriceBox = require("../models/PriceBox"); const priceController = {}; //Get all Prices priceController.getAllPrice = async (req, res, next) => { let allPrices = []; try { allPrices = await PriceBox.find(); res.status(200).json(allPrices); } catch (err) { res.status(403).json("Cant get all price...
true
41755e122c61b8a0f3b84adfc9b0217b76dc3bb0
JavaScript
felixruano91/Auxilium
/assets/javascript/audiovisual.js
UTF-8
7,190
3.265625
3
[]
no_license
//========================================================== //=============== Variables and settings =================== //========================================================== // General settings----------------------------------------------------- // We use these to change general behavior of the player. var o...
true
56c8548e7a53915f19088b6dd57c8237e0a47330
JavaScript
fyoshida/React-7
/src/components/IncompleteTodos.jsx
UTF-8
1,558
2.578125
3
[]
no_license
import React from "react"; const style = { backgroundColor: "#c6ffe2", width: "400px", minHeight: "200px", padding: "8px", margin: "8px", borderRadius: "8px" }; export const IncompleteTodos = (props) => { // 引数 const { incompleteTodos, completeTodos, setIncompleteTodos, ...
true
b4565a17d0a1ba5c051cf4a9daf38e3ff0c80477
JavaScript
jdthorpe/cra-workerize-loader
/src/App.js
UTF-8
477
2.71875
3
[]
no_license
import React, { useState } from "react"; import "./App.css"; import Worker from "workerize-loader!./worker" // eslint-disable-line import/no-webpack-loader-syntax const workerMessage = (async () => { const worker = new Worker(); return await worker.getMessage(); })(); function App() { const [message, setM...
true
2039b48c0dbb2b6e76dd449b2a767c53db614f62
JavaScript
Adarshgabani/music-player-react
/src/App.js
UTF-8
2,697
2.75
3
[]
no_license
import React, { useState, useRef } from 'react'; // Importing Styles import './styles/app.scss' // Importing Components import Player from './components/Player'; import Song from './components/Song'; import Library from './components/Library'; import Nav from './components/Nav'; // importing util import data from '....
true
e5f35d6ebd826cf265f7a37e94785e2212e4fa21
JavaScript
DanRev/laika
/src/js/carousel.js
UTF-8
538
2.75
3
[]
no_license
export const showSlide = (image) => { var slides = document.getElementsByClassName("Home__subItemCarousel"); var dots = document.getElementsByClassName("Home__carouselDot"); for (var i = 0; i < slides.length; i++) { slides[i].style.display = "none"; } slides[image-1].style.display = "block"; for (var j ...
true