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
f1d046386aa82dd842cf8d6cf47a07e2971b06ed
JavaScript
HarisPratama/e-commerce-server-1
/controllers/bannerController.js
UTF-8
1,363
2.59375
3
[]
no_license
const {Banner} = require('../models/index'); class BannerController { static async getBanner(req, res, next){ try { const getBanner = await Banner.findAll(); res.status(200).json(getBanner); } catch (error) { console.log(error); next(error) } } static async addBanner(req, res...
true
3e3c5728d468fad6a3fb2279ecbe3c84469b86c7
JavaScript
synasius/playground-react
/reaggle/frontend/client/js/components/toggle_list.js
UTF-8
2,333
2.625
3
[ "MIT" ]
permissive
import React from 'react'; import moment from 'moment'; class ToggleList extends React.Component { render() { let entries = this.props.items.map(function(entry) { return ( <ToggleEntry key={entry.id} entry={entry} onSt...
true
9a45accaaa9de5f94b03f0668dedc2ac1588c461
JavaScript
aeolion7/sorting
/bubblesort.js
UTF-8
584
3.90625
4
[]
no_license
function bubbleSort(arr) { // forEach implementation // let sorted = true; // while (sorted) { // sorted = false; // arr.forEach(function (element, index) { // if (arr[index] > arr[index + 1]) { // swap(arr, index, index + 1); // sorted = true; // } // }); // } for (l...
true
abede20f1ecd4f71f72bf91ba0f5af613f8570a7
JavaScript
zhangzuowei1988/xiongantianxia
/News/三方库/www/js/article.js
UTF-8
2,999
2.59375
3
[]
no_license
window.onload = function(){ var imageArray = document.getElementsByTagName("img"); for(var i=0; i < imageArray.length; i++) { var image = imageArray[i]; image.index = i; image.onclick = function(){ // alert(imageArray[this.index].sr...
true
04023619592324f8ddffde834470988122932459
JavaScript
besrezen90/HJD
/js/solution.js
UTF-8
22,557
2.65625
3
[]
no_license
'use strict' const wrap = document.querySelector('.wrap.app'), menu = wrap.querySelector('.menu'), currentImage = wrap.querySelector('.current-image'), error = wrap.querySelector('.error'), imageLoader = wrap.querySelector('.image-loader'), menuSize = menu.offsetHeight, homeUrl = window.location...
true
187d3e76cfc10adacd1c306a1ce5fb1eb149aa72
JavaScript
tilok369/tbh-online-test
/Tbh.Online.Test/Tbh.Online.Test.Web/wwwroot/js/site.js
UTF-8
42,211
2.796875
3
[]
no_license
// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification // for details on configuring this project to bundle and minify static web assets. // Write your JavaScript code. var questionService = { timer: null, seconds: 0, getRootUrl: function () { ...
true
424f0f5e38085a20741b450d075d19d6bc8c2989
JavaScript
BonnieIsme/webabc
/javascript_learn/storage_learn/index.js
UTF-8
1,760
3.203125
3
[ "MIT" ]
permissive
const rememberDiv = document.querySelector('.remember'); const enterName = document.getElementById('entername'); const submitBtn = document.getElementById('submitname'); const forgetDiv = document.querySelector('.forget'); const forgetBtn = document.getElementById('forgetname'); const form = doc...
true
e3b47a41b9dd7e17c0d03d7d9efc52e93e85503b
JavaScript
sro-boeing-wave-2/english-to-braille-js-assignment-problem-mailmebhav
/index.js
UTF-8
751
3.125
3
[]
no_license
import englishToBrailleLiteralSet from './english-to-braille.js'; /** * Converts text in english to braille code. * Write all code related to the DOM Manipulation here. * Using the english-to-braille mapper convert the text * in english language to that in the equivalent braille * code. */ function respond() { docume...
true
0f9f8f2b79589ddaed5b470760a49c085914019a
JavaScript
lenakernytska/goit-react-hw-04-movies
/src/services/ApiService.js
UTF-8
1,062
2.59375
3
[]
no_license
import axios from "axios"; const apiKey="030295876ec9637cb436e167c8c73741" const baseUrl = 'https://api.themoviedb.org/3'; const fetchTrendFilms=async ()=>{ const { data } = await axios.get(`${baseUrl}/trending/all/day?api_key=${apiKey}`); return data.results; } const fetchMovieById=async (movieId)=>{ ...
true
7f63ec01a580e1fa33c4dc53e56e6b3d6e5111f9
JavaScript
concrete5-community/event_tracking
/js/gtag.js
UTF-8
972
2.65625
3
[ "MIT" ]
permissive
document.querySelectorAll('[data-event-tracking-handler="click"]').forEach(function (link) { var onClickHandler = function (e) { if (typeof gtag === "undefined") { return; } e.preventDefault(); console.log('Tracking event via GA gtag.js'); function su...
true
19c6a2129b325bb39f16a769cfab1a420ec6a123
JavaScript
davidbouchard/ica-2021
/week-11/ica-libs-play/sketch.js
UTF-8
2,424
3.34375
3
[]
no_license
let GRAVITY = 0.2; let player; let ground; let platforms = []; let walls = []; let jumpCounter = 0; let platformImage; function preload() { platformImage = loadImage('https://cdn.glitch.com/277b988c-8def-4f22-b1b7-ae85e78fe198%2Fplatform.png?v=1617724359991'); } // --------------------------------------------...
true
693741ff12f1eabc29fe4d500a6b39838e652ce7
JavaScript
samueljackson92/scripts
/Javascript/gol-simple/js/evolve.js
UTF-8
2,006
3.453125
3
[ "MIT" ]
permissive
// evolve.js // Date: 16/06/13 // Author: Samuel Jackson (samueljackson@outlook.com) // Description: Evolves start configurations of Conway's game // of life progressively according to a given fitness function. var POP_SIZE = 1; var population = []; var currentGeneration = 0; var noParents = 2; var maxGenerations = 10...
true
1c4e5f1778f6ef2ca4d21a247022c38ac0998d20
JavaScript
ghanendrak2/E2ETestFramework
/test.js
UTF-8
2,025
3.125
3
[]
no_license
const { browser } = require("protractor"); describe('angularjs homepage', function () { it('should greet the named user', function () { // Load the AngularJS homepage browser.get('http://www.angularjs.org'); // Find the element with ng-model matching 'yourName' - this will // find the <input...
true
ef05670791546854fde7f27444ca49b476f74eab
JavaScript
hmammana/tiny.js
/modules/next.js
UTF-8
425
3.59375
4
[]
no_license
/** * IE8 safe method to get the next element sibling * * @memberof tiny * @param {HTMLElement} el A given HTMLElement. * @returns {HTMLElement} * * @example * tiny.next(el); */ export default function next(element) { function next(el) { do { el = el.nextSibling; } while (el && ...
true
c0df8541894e785450245a90632d9d2f935705f0
JavaScript
learn-academy-2021-bravo/week-1-assessment-Shazeen15
/coding-concepts.js
UTF-8
1,492
4.375
4
[]
no_license
// ASSESSMENT 1: Coding conceptual questions // Examine the following examples. // First, predict the outcome based on your understanding of the code. // Then, uncomment the console.log() and verify the output. Briefly explain why your initial answer was correct or incorrect. // --------------------1) What will this...
true
56b2b091874466d4c57b844cd44d1db572420fde
JavaScript
blackmacy/The-Complete-Web-Developer
/Advanced Javascript/Pass By Value vs Pass By Reference/script.js
UTF-8
1,405
4.125
4
[]
no_license
// Pass by Value: var a = 5; var b = a; b++; console.log(a); // 5 console.log(b); // 6 // If we don't wan to modify the original object, we can clone first let obj = {a: 'a', b: 'b', c: 'c'}; let clone = Object.assign({}, obj); let clone2 = {...obj} // -> clone obj.c = 5; console.log(clone); // {a: 'a', b: 'b',...
true
071e99db06b8bd62b6c13bc4effccdd29f44c562
JavaScript
suryakant1698/workshopStudyMaterial
/Flappy Bird/js/game.js
UTF-8
10,529
3.125
3
[ "Apache-2.0" ]
permissive
// For any enquiry you are invited to visit si lab // Shobhit Garg // CSE // 9536331752 // Apoorva // CSE // 7011588761 // Akshat Kumar Srivastava // IT // 7379308109 // Avinash Singh // IT // 7500813655 (function (window, document) { 'use strict'; //Check whether the browser is Safari and this returns 19 (>0)...
true
6ca5268df3cf7ad5a097e5a0604da47d0c4c9f45
JavaScript
DrakeTHPS/game-shop
/src/store/selectors/games.js
UTF-8
709
2.703125
3
[]
no_license
const sortBySales = (a, b) => { if (a.sold > b.sold) { return -1; } if (a.sold < b.sold) { return 1; } return 0; } const sortByDate = (a, b) => { if (a.releaseDate > b.releaseDate) { return -1; } if (a.releaseDate < b.releaseDate) { return 1; } re...
true
afdda311b55cbd2c515fca5fee92be590b42831a
JavaScript
learningobjectsinc/gamejam
/app/scripts/gameData.js
UTF-8
20,685
2.765625
3
[]
no_license
var gameData = gameData || {}; gameData["blocks"] = [ { "shortName": "moveForward", "name": "Move Forward", "params": [ { "name": "Amount", "shortName": "amount", "type": "number", "units": "steps" } ] }, { "shortName": "turn", "name": "Turn", "params": [ { "name": "Angle", ...
true
17fe3e14dcb5c4ed5f3ab24a8c5550b8546be072
JavaScript
wwwK/ekmap-client
/src/common/commontypes/Date.js
UTF-8
2,953
2.859375
3
[ "MIT" ]
permissive
import { Ekmap } from '../Ekmap'; /** * @name Date * @memberOf Ekmap * @namespace * @category BaseTypes Util * @description Contains the implementation of the parse and toISOString methods. The two methods are used to parse RFC 3339 dates and follow the ECMAScript 5 specification. */ export var DateExt = Ekmap.D...
true
2dea84b561d7a48be2ff0a9e539d36df6439eda2
JavaScript
hnezado/lab-javascript-chronometer
/javascript/index.js
UTF-8
3,019
3.734375
4
[]
no_license
const chronometer = new Chronometer(); // get the buttons: const btnLeft = document.getElementById('btnLeft'); const btnRight = document.getElementById('btnRight'); // get the DOM elements that will serve us to display the time: let minDec = document.getElementById('minDec'); let minUni = document.getElementById('min...
true
89c7402d8ff71eda76065b138d921f8bfb60a6f8
JavaScript
n-nik/flight-surety
/src/dapp/index.js
UTF-8
3,225
2.71875
3
[ "MIT" ]
permissive
import DOM from './dom'; import Contract from './contract'; import './flightsurety.css'; (async() => { let contract = new Contract('localhost', () => { // Read transaction contract.isOperational() .then(result => { console.log( 'Operational Status', result); ...
true
5d010f3a7594682f0de7ca19921ef3498455997a
JavaScript
homelesshack/homeless
/app2.js
UTF-8
2,910
2.921875
3
[]
no_license
const cheerio = require("cheerio"); const getContent = function(url) { // return new pending promise return new Promise((resolve, reject) => { // select http or https module, depending on reqested url const lib = url.startsWith('https') ? require('https') : require('http'); const request = lib.g...
true
4c1dd10365fda0119cc682f4d4865371711e042a
JavaScript
Luca23876/Homework
/homework20.js
UTF-8
3,225
4.375
4
[]
no_license
//////////////////////////////////////////////////////////////////////////////////////// //Okay Semicolon, see if you can make some headway on these, there are going to be a lot of semicolons! // //**Make sure you test your answers in whatever environment you choose, and you will //definitely need to use the internet f...
true
db645f21717f628c68aeca8ff8957a1d509f6678
JavaScript
nikolapanev1993/limehome-test
/src/store/reducer.js
UTF-8
969
2.625
3
[]
no_license
import { FETCH_HOTELS_START, FETCH_HOTELS_SUCCESS, FETCH_HOTELS_FAIL, } from './actions'; import { updateObject } from './utility'; const initialState = { hotels: null, error: null, loading: false, }; const fetchHotelsStart = (state, action) => { return updateObject(state, { error: null, loading: true }...
true
e56be4117780b80d1909e944ec3bbcb838fdcccf
JavaScript
Garvit-121172/LineUp
/app.js
UTF-8
2,892
2.53125
3
[]
no_license
//jshint esversion:6 const express = require("express"); const bodyParser = require("body-parser"); const mongoose=require("mongoose"); const date = require(__dirname + "/date.js"); const app = express(); app.set('view engine', 'ejs'); app.use(bodyParser.urlencoded({extended: true})); app.use(express.static("public"))...
true
bc41a1f1bd669f12f697d78b80b2821780f63d3e
JavaScript
Ibrahim-Mohamed1/Vschool-Assignments
/exercises/dj-react/src/App.js
UTF-8
2,424
2.890625
3
[]
no_license
import React, {Component} from 'react' import "./App.css" class App extends Component{ constructor(){ super() this.state = { box1: "white", box2: "white", box3: "white", box4: "white" } } toggleBlack = () => { this.setState((prevState)=>{ if(prevState.isWhite){ ...
true
ff972c194b0596551980ce17c133fa78a9352e48
JavaScript
LeKarimDerradji/command-prompt-node
/pyramidTwoSide.js
UTF-8
420
2.796875
3
[]
no_license
let nbBaseInput = process.argv[2] let sideInput = process.argv[3] let strInput = process.argv[4] const showStars = (nbBase, rverse, str) => { if (sideInput === 'false') { for (let i = 1; i <= nbBase; ++i) { console.log(str.repeat(i)) } } else { for (let i = nbBase; i >= 1; --i) { ...
true
599c563eef28eeab05f726e98388b5915c8bf44f
JavaScript
weshaw/chat-socket.io
/modules/messages.js
UTF-8
499
2.53125
3
[]
no_license
module.exports = function(m) { this.history = []; this.init = function() { return new Promise((resolve,reject) => { m.data.find("messages").then((messages) => { this.history = messages; resolve(); }); }); } this.get = function(...
true
0c4bbfac3dd3fc242fc87fbf4597d90c8e4155ee
JavaScript
Kutaehwan/lab_spring4
/es6-es11/oi_es6.js
UTF-8
383
3.96875
4
[]
no_license
// Object Initializer // https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Operators/Object_initializer { const person = {a:'scott', b:'42'}; const name = 'scott'; const age = '35' const person2 = {name : name, age : age}; // key와 value가 동일할 때는 생략이 가능하다. const person3 = {name, age}; conso...
true
10ac7ac6c9dc6ab14396cea2c8f0b9a364823de1
JavaScript
velinovasen/spa-base-skelet
/init.js
UTF-8
5,785
2.703125
3
[]
no_license
function init_loader() { navigate('home') } init_loader() window.addEventListener('popstate', (e) => { router(location.pathname.slice(1)) }) const DOMSelectors = { nameInput: () => document.getElementById('nameInput'), // most likely this will be the input fields from the...
true
61ec21afefa6070b113564ec67aad79b20c3c325
JavaScript
BH1999/web-development
/string/insert.js
UTF-8
954
4.71875
5
[]
no_license
/*Q10. Write a JavaScript function to insert a string within a string at a particular position (default is 1)? File name suggestion: insert.js Test Data : console.log(insert(‘We are doing some exercises.’)); // “We are doing some exercises.” console.log(insert(‘We are doing some exercises.’,’JavaScript ’)); // “JavaScr...
true
d0044e496871f26483d147345e8f6e6b3b60feac
JavaScript
syueyan/shopping-cart
/client/src/components/AddProduct.js
UTF-8
2,008
2.578125
3
[]
no_license
import { useState } from 'react' import actions from '../lib/actions' import { useDispatch } from 'react-redux' const AddProduct = ({ showAddForm, setAddForm }) => { const [price, setPrice] = useState("") const [title, setTitle] = useState("") const [quantity, setQuantity] = useState("") const dispatch = useD...
true
d09e4bd5a3dd238e8f1730730e6749c2939779f9
JavaScript
stevethemacguy/angular_app
/app/apiEndpoints.js
UTF-8
2,049
2.515625
3
[]
no_license
/** * Author: Steven Dunn * Date Created: April 24, 2017 * Dependencies: None */ (function () { 'use strict'; var productUrl = config.apiUrl + "products"; var cartUrl = config.apiUrl + "cart"; var accountUrl = config.apiUrl + "account"; var checkoutUrl = config.apiUrl + "checkout"; var pa...
true
b3afdd9fe0c1c4fd3a6106c152e7883782b93763
JavaScript
volcanioo/covid-19
/src/Components/GetCountries.js
UTF-8
1,638
2.65625
3
[]
no_license
import React, { useState, useEffect } from "react"; import axios from "axios"; import GetCountryDataById from "./GetCountryDataById"; function GetCountries(props) { const [selectedCountry, setSelectedCountry] = useState(null); const [error, setError] = useState(null); const [isLoaded, setIsLoaded] = useState(fal...
true
7eaaaa2d5df46d30f68c8c9b911ee0fe84dea5ab
JavaScript
frmsm/459207-keksobooking
/js/card.js
UTF-8
4,556
2.8125
3
[]
no_license
'use strict'; (function () { var MAX_ADS = 5; var houseType = { 'flat': 'Квартира', 'house': 'Дом', 'bungalo': 'Лачуга', 'palace': 'Дворец' }; var mapTemplate = document.querySelector('#map__template').content; // шаблон карты var mapCard = mapTemplate.querySelector('.map__card'); // карточ...
true
fd1b5413c8f164e280370d5db08f986a02eb5b9d
JavaScript
EnziSchow/FitnessTracker
/src/components/CreateRoutines.jsx
UTF-8
1,389
2.59375
3
[]
no_license
import React, { useState } from "react"; import axios from "axios"; import { getCurrentToken } from "../auth"; const CreateRoutines = ({ user }) => { const [form, setForm] = useState({ creatorId: user.username, isPublic: true, name: "", goal: "", }); const handleInput = (e) => { setForm({ .....
true
5f6b9dff82ab4753f54ac9a0a873c75034f73d5a
JavaScript
burningtomatoes/SquareEngine
/src/engine/SquareEngine.js
UTF-8
5,486
3.0625
3
[ "MIT" ]
permissive
/** * The static Square engine class that hosts components and powers the main game loop. */ class SquareEngine { /** * Starts the engine. * * @param id The ID of the canvas element the engine is binding to. */ static start(id) { SquareDiagnostics.logMessage('Starting SquareEngine....
true
c9cc73f7cac5a2ca3b2f92a3dc18b8a116442758
JavaScript
alimalkhalifa/VisualEQ
/src/app/index.js
UTF-8
1,065
2.625
3
[ "MIT" ]
permissive
import Scene from './editor-components/scene' import { store } from './store' import { changeZone } from './store/actions' let zone = store.getState().zone //store.dispatch(addSpawn('test')) let scene = new Scene(store.getState().zone) store.subscribe(() => { if (store.getState().zone !== zone) { console.log(...
true
847045ebaa2cdddca68b9dffac9ec6ab5ad7e7ac
JavaScript
Klkrieg/TTS_WEEK_5-react-router-dom
/src/components/Dropdown.jsx
UTF-8
1,659
3.234375
3
[]
no_license
import React, { useState } from 'react'; export const Dropdown = () => { const [list, setList] = useState([]); const [inputValue, setInputValue] = useState(''); //create controlled input //create list of items based on input //make list visibile only when clicked const handleChange = (e) => { setInpu...
true
e2a5a7947347f3e0a24e9b83ba6c8c9bacdccc34
JavaScript
weedking/mypro
/src/main/java/com/billy/jpa/js/jq-post.js
UTF-8
769
2.640625
3
[]
no_license
// NOTE: This example will only work if you run it on a web server (it will not work locally) // You can try it out on the website for the book http://javascriptbook.com/code/c08/ // or run it on your own server. $('#register').on('submit', function(e) { // When form is submitted e.preventDefault(); ...
true
5ee3bd443d3d75e07bfc6161c9460f0ef31b867d
JavaScript
mattymaloney/nodeschool.io-stream-adventure
/08-http-client.js
UTF-8
398
2.609375
3
[ "MIT" ]
permissive
/*jslint node:true */ "use strict"; var httpRequest = require("request"); var url = "http://localhost:8000"; var postStream = httpRequest.post(url); var sendStream = process.stdin.pipe(postStream); var rcvStream = postStream.pipe(process.stdout); /* * after the above operations, are postStream, sendStream and rcvSt...
true
26979801a4539a74f7fe3f4b58c57cc3e4181648
JavaScript
katieolson84/web-sprint-challenge-advanced-web-applications
/src/components/BubblePage.test.js
UTF-8
2,181
2.65625
3
[]
no_license
import React from "react"; import { render, screen } from "@testing-library/react"; import BubblePage from "./BubblePage"; import ColorList from './ColorList'; import Bubbles from './Bubbles' const mockColors = [ { color: "aquamarine1", code:{ hex: "#7fffd4" }, id: 1, ...
true
397150da2cbc474e9abd2980514e60c3b5f7d79d
JavaScript
edfrias/skylab-bootcamp-201904
/staff/daniel-ferrandez-latre/precourse/calculadora2/main.js
UTF-8
2,002
3.796875
4
[]
no_license
class Calculator { constructor() { this.arrayOpertaion = []; this.strOperationInput = ''; this.operationResult = ''; } setOperationInput(input) { this.arrayOpertaion.push(input); } doOperation() { this.strOperation...
true
67835323f1a0cc9d0c1e4b846d042a3ff4c36b2d
JavaScript
chiefbiiko/preactor
/test.js
UTF-8
15,742
2.859375
3
[ "MIT" ]
permissive
var tape = require('tape') var EventEmitter = require('events').EventEmitter var Preactor = require('./index.js') function makePromise (value) { return new Promise(function (resolve, reject) { setTimeout(resolve, 100, value) }) } tape('simple transducer - Preactor.prototype.delay', function (t) { var emitte...
true
8474eb752738646449c755ea4c093fae1f634b39
JavaScript
SzaszNorbert/cursuri-front-end-4
/Project-OOP/views/gameDetailsView.js
UTF-8
2,592
3.265625
3
[]
no_license
window.onload=function(){ var titleGame=document.querySelector("input[name='title-input']"); var descriptionGame=document.querySelector("[name='description-input']"); var imageGame=document.querySelector("input[name='img-input']"); var currentGame=new Game(); var currentPostId=getUrlParameter('gamePostId'); cons...
true
b35eb9bc36dcca2855ddbb25cc7f0f29f72e7abf
JavaScript
danil952/node-react-restApi-app
/react/src/components/CreatedEvents.js
UTF-8
1,025
2.53125
3
[]
no_license
import React, { useState, useEffect } from "react"; import UserService from "../services/user.service"; import Event from "../components/Event"; import AuthService from "../services/auth.service"; function CreatedEvents() { const [events, setEvents] = useState([]); useEffect(() => { let isMounted= tr...
true
abc1629a0e9ba6bd06ec892261c041342c6a6751
JavaScript
oyeyipo45/sila-payments
/src/utils.js
UTF-8
1,808
2.75
3
[]
no_license
// third party packages const crypto = require('crypto'); const EthCrypto = require('eth-crypto'); const Web3 = require('web3'); // consts const { ENCRYPTION_KEY, ENCRYPTION_IV_STRING, WEB3_URL } = require('../.env'); //creates a wallet on Ethereum function createWallet() { const web3 = new Web3(WEB3_URL); co...
true
8366a2d176e17f813ee6ea5abf3ffe2a75d35f79
JavaScript
andreibrindas/planning-react-app
/src/components/App.jsx
UTF-8
1,541
2.546875
3
[]
no_license
import React, { Component } from "react"; import AddProject from "./AddProject"; import ProjectList from "./ProjectList"; class App extends Component { state = { projects: [ { name: "test 1", tasks: ["clean", "delete", "go"] } ] }; onTermSubmit = term => { const projects ...
true
089c0d68ce4380baef0e5f895f2e724f3686fe2d
JavaScript
SifatIbna/currency-converter
/currency-converter.js
UTF-8
1,542
3.609375
4
[]
no_license
/* APIS http://data.fixer.io/api/latest?access_key=f68b13604ac8e570a00f7d8fe7f25e1b&format=1 https://restcountries.eu/rest/v2/currency/${countryname} */ const axios = require('axios'); const getExchangeRate = async (fromCurrency, toCurrency) => { try { const response = await axios.get('http://data.fixer.io...
true
d30226fa8c02f33a0b835bb9bdd981291a7c7fec
JavaScript
Capstone-Team-Artemis/pocketBook
/test/GoogleAPI.js
UTF-8
3,662
2.625
3
[]
no_license
import { StatusBar } from "expo-status-bar"; import React, { useState } from "react"; import axios from "axios"; import { StyleSheet, ScrollView, Text, View, Button, SafeAreaView, TextInput, Image, } from "react-native"; import { Formik } from "formik"; import GOOGLE_API from "../secrets"; import Chat f...
true
efe61486de03e24e838626d61bc2485c96645304
JavaScript
przemyslawzamorski/neotericTask
/src/components/Modal.jsx
UTF-8
7,703
2.625
3
[]
no_license
import React, { Component } from 'react' import styled from 'styled-components' import PropTypes from 'prop-types' import PokemnonItem from './PokemnonItem.jsx' import LoadingWrapper from './LoadingWrapper.jsx' class Modal extends Component { state ={ loading: false, similar: [] } componentDidMount () ...
true
17c9b39a0bc070f9a294d5cefc4c818d0608c7e4
JavaScript
akhil110/btcticker
/fetchbtc.js
UTF-8
1,633
3.53125
4
[]
no_license
/* Commented section of code used for fetching data from the APIs */ /* const request = require('request'); exports.pushUpdates = function() { return new Promise(function (resolve, reject) { let btcArr = []; fetchAPI('https://api.cryptonator.com/api/ticker/btc-usd') .then(function (res1) { btcArr.push(JSON...
true
86b51d9b2e6559203283ffd290fddbf51d41e83c
JavaScript
m-slashe/main
/src/components/another/AnotherCtrl.js
UTF-8
589
2.953125
3
[]
no_license
class AnotherController { /** * Função que soma dois numeros * @param {string} numero - Numero 1 * @param {string} numero2 - Numero 2 * @returns {number} - Valores somados * @see {@link https://www.google.com/} */ static soma(numero, numero2) { return numero + numero2; } /** *Subtrai o segundo valor...
true
bec16cd4f57a64229a749cf75b9aa60f33d91261
JavaScript
tsgold/web-company-profile
/conditional/if_else_quizz.js
UTF-8
1,546
3.484375
3
[]
no_license
const rapor = { math: 80, english: 85, physic: 99, bahasa: 55, computer: 100, accounting: 67, chemistry: 35 } // console.log(rapor.computer); const hasil_akhir = (rapor.math + rapor.english + rapor.physic + rapor.bahasa + ...
true
a5f88c842068638a3f057cc504b8e563aba77af1
JavaScript
BlueStoneQ/BBQ
/war2022/jsWriteByHand/data-handle/3-randomArray.js
UTF-8
1,443
4.09375
4
[]
no_license
/** * 实现数组的乱序输出 * - 也就是将一个数组进行乱序 * 2022-3-23 * * 嗯 前端乱序 最正宗的还是使用[洗牌算法](https://juejin.cn/post/6844903878056476679) * - [洗牌算法](https://www.zhihu.com/question/68330851) */ /** * [以此为准]洗牌算法 */ const randomArray = (arr) => { let m = arr.length - 1; // index:m的范围从 len -> 1 while (m) { // 倒序 在m的左侧产生一个ra...
true
5ef475a38f0b525f2b7dc2e5de2812a80f4ea871
JavaScript
lena4lena/Study
/0829/script.js
UTF-8
2,391
3.328125
3
[]
no_license
window.onload = init; // Устанавливаем ф-цию обработчик после загрузки страницы ф-ция: init setInterval(update, 1000); // запускаем интервал в 1 сек на ф-цию update function init() { // назначаем кнопке (тегу button) событие onclick только програмно document.getElementsByTagName('button')[0].onclick = function(...
true
f86c38db101e2e1ddabefc1c6ccb54414f69220b
JavaScript
wojciechkaleb/Node-Modules-Colored
/modules/OSinfo.js
UTF-8
1,272
2.515625
3
[]
no_license
var os = require('os'); var colors = require('colors'); var fromSec = require('./fromSec'); function getOSinfo() { var type = os.type(); switch (type) { case 'Darwin': { console.log(colors.gray('System: ') + 'macOS'); break; } case 'Window...
true
f9ef36915233f155d9fecc65e3efde08f1208452
JavaScript
nemesis011/openchess
/src/board.js
UTF-8
14,547
2.9375
3
[ "MIT" ]
permissive
/* Purpose: This is the definition file for the board class. */ const axios = require('axios') const btoa = require('btoa') const { v1: uuidv1 } = require('uuid') const redis = require('./redis_client') const { pieces, colors, mainRow, empty, fen } = require('./pieces') const { GameError, ErrorTypes } = require('.....
true
e2ddc60115f0b226ce5ef79f031eef371bc00a8d
JavaScript
wallaceyuan/wechatMovie
/lesson/generator/2.js
GB18030
507
3.640625
4
[]
no_license
/** * Created by yuan on 2016/7/21. */ //ͬʱiterator next() ǿԴһġΪgeneratorڶӦ yield ķֵ function* genFunc () { var result = yield 1 console.log(result) } var gen = genFunc() gen.next() // ʱgeneratorڲִе yield 1 ͣδresultֵ // ʹ첽Ҳԣ setTimeout(function () { gen.next(123) // resultִֵУ: 123 }, 1000)
true
fa9bbd22238a6afbe25252846ef0044316e6e04b
JavaScript
santanutung/3rd-react
/src/App.js
UTF-8
1,280
2.84375
3
[]
no_license
import React from "react"; import "./styles.css"; export default function App() { const product = [ { name: "photoshop", price: "$90.99" }, { name: "Illustrator", price: "$60.99" }, { name: "AdobeXD ", price: "$49.99" }, { name: "AdobeXD ", price: "$49.99" } ]; const prouductName = product.map((p...
true
fb3246854fb8cc577aeb6b93ae16305ae16b8425
JavaScript
TiZho/article-parser
/run.js
UTF-8
775
2.734375
3
[ "MIT" ]
permissive
const {readFileSync, existsSync} = require('fs'); const isValidUrl = require('./src/utils/isValidUrl'); const {extract} = require('./index'); const extractFromUrl = async (url) => { try { const art = await extract(url); console.log(art); } catch (err) { console.trace(err); } }; const extractFromFi...
true
9ddec56c49f600459cb3dadc1f8c8b0a3cfa7fa0
JavaScript
mdaxtman/property-availability-context
/utils/is-available-for-all-dates.js
UTF-8
307
2.734375
3
[]
no_license
const moment = require("moment"); function isAvailableForAllDates([from, to], dates) { if (!dates || !dates.length) { return false; } const datesNeeded = Math.abs(moment(from).diff(to, "days")) + 1; return dates.length === datesNeeded; } module.exports = isAvailableForAllDates;
true
4ac4e76bf52be9c840850ee2deb54bc5cd5075b8
JavaScript
AmeerTaweel/change-file-case
/index.js
UTF-8
4,047
3.765625
4
[ "MIT" ]
permissive
// File System. const fs = require("fs") // Log welcome message. console.log(`+------------------------+`) console.log(`| |`) console.log(`| Change Case Script |`) console.log(`| |`) console.log(`+------------------------+`) console.log(``) console.log(` \"Ameer T...
true
1cff4fc136d5d1d8d00baccd87df0dd81530229b
JavaScript
econ24/twitter_traffic
/website/resources/javascript/myJS.js
UTF-8
8,800
2.53125
3
[]
no_license
(function() { var project = { version: "0.2.0-beta" }; var leafletMap = false, // Leaflet map object maxBarWidth = 330, // maximum length of confidence bars fadeDuration = 250, // fade time for hidable elements displayType = displayAlerts, // function to be called to display tweets featureCollec...
true
b500bd85a7803769b168b4c7132eeaad2c7979b7
JavaScript
FJaku/homepage
/src/components/App.js
UTF-8
4,218
2.96875
3
[]
no_license
import React, { useState, useEffect } from 'react' import axios from 'axios' import backgroundImage from '../img/background.jpg' import { useSelector, useDispatch } from 'react-redux' import TaskList from './taskList/taskList' import Clock from './clock' const App = () => { const dispatch = useDispatch(); //TODO...
true
5daf56f9d69f918d65efac7ed30e2936c6409189
JavaScript
Kolossion/tymora
/src/dice.js
UTF-8
1,327
3.328125
3
[ "MIT" ]
permissive
const R = require("ramda"); const dicePartRegex = /([0-9]+d[0-9]+)((?:[+-][0-9]+)*)?/i; module.exports = (rng) => { return { /* returns the parts of the dice expression. Will be expanded as the die regex * and die processing gets more and more powerful. * * TODO: Add error handling for improper dic...
true
b413be792c82407c9f65cc44edf58334cd62a940
JavaScript
azu/restrict-javascript
/test/fixtures/ng.default.example-var/input.js
UTF-8
350
3.3125
3
[ "MIT" ]
permissive
const a = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; const b = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz"; const c = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; const pos = Math.floor(new Date().getTime() / 1000000) % 62; const str = a.charAt(pos) + b...
true
8266906a3ec005dbb3d1d45a12ed1c8e76e0ca90
JavaScript
ricochetGobz/ricochet_server
/app/core/utils.js
UTF-8
758
2.703125
3
[]
no_license
/** * * app/core/utils.js * All of your utils functions * **/ import adrs from './addresses'; const util = { logError: (message) => { console.warn(`###ERROR : ${message}`); }, logDate: (message) => { console.log(`${new Date()} ${message}`); }, logEvent: (message) => { console.log(` -> ${me...
true
574698ee475b750e300b60622ef410b53a6ec390
JavaScript
16348104/JavaScript
/9/demo1.js
UTF-8
154
3.09375
3
[]
no_license
var a = new Date(); alert(a); alert(a.getFullYear() + '-' + a.getMonth()+1 + '-' + a.getDate()+'-'+a.getHours()+':'+a.getMinutes()+':'+a.getSeconds());
true
f235a29627d2fa36e26a325e2054aaee9de44ae3
JavaScript
yangke928/trip_advisor
/src/services/userService.js
UTF-8
885
2.671875
3
[ "MIT" ]
permissive
import {USER_URL} from "./config" const findOneUser = (username) => fetch(USER_URL).then(response => response.json()) .then(usersList => usersList.filter(user => user.username === username)) const findUserByUsername = (username) => fetch(`${USER_URL}/${username}`).then(response => response.json()) co...
true
3c93f3f467dd8e113f585955c33b1a8c75d91169
JavaScript
anitasv/anitasv.github.io
/remote/index.js
UTF-8
7,662
2.828125
3
[]
no_license
const $ = (id) => document.getElementById(id); const getCenter = (elem) => { const rect = elem.getBoundingClientRect(); return [rect.x + rect.width / 2, rect.y + rect.height / 2]; } const dbPerCircle = 32; const anglePerDB = Math.PI / (dbPerCircle / 2); const computeAngle = (reference, origin) => { const ve...
true
5ae70eb32e6da29fb5df09e7fe24a668cb709f40
JavaScript
passer2021/vue-learn
/kvue/01-reactive.js
UTF-8
2,068
3.609375
4
[]
no_license
// Vue.util.defineReactive(this, 'current', '/') // 数组响应式 // 1.替换原型数组中的7个方法 const originalProto = Array.prototype; // 备份一下, 修改备份 const arrayProto = Object.create(originalProto); ['push', 'pop', 'shift', 'unshift'].forEach(method => { arrayProto[method] = function() { // 原始操作 originalProto[method].apply(this,...
true
42f120c356b07d7048ed70dd1a241f3de2094893
JavaScript
lakishaJohnson/ToDontApp
/makeTodo.js
UTF-8
520
3.484375
3
[]
no_license
const makeTodo = (text) => { return { text: text, //TEXT, shorthand for if value is the same as the key isComplete: false, //BY DEFAULT ALL TASKS ARE INCOMPLETE markComplete: function() { this.isComplete = true; }, markIncomplete: function() { this.isComplete = false; }, ...
true
97277ec47251a78d5286af7cc8c3927a90930e45
JavaScript
harshita-arya/crypto
/script.js
UTF-8
15,000
2.609375
3
[]
no_license
// Live Prices API-end point const DOMAIN = "https://get-crypto-alert.herokuapp.com/api"; // timestamp to date time format function getDateTime(timestamp, chartType) { switch (chartType) { case "live": return moment(timestamp).format("mm:ss"); case "1h": return moment(timestamp).format("H:mm"); ...
true
132f838e72bc6fad2577469e03cfb75f2a664c80
JavaScript
TenpennyUMFPOS/DEVex
/app.js
UTF-8
2,986
2.71875
3
[]
no_license
function addRow() { var title = document.getElementById("title"); var author = document.getElementById("author"); var bprice = document.getElementById("price"); var table = document.getElementById("myTableData"); var rowCount = table.rows.length; ...
true
72a447aee0cf3bccee3b2b6dd5174d9bf4088a2f
JavaScript
GabeKuslansky/OjalaThreadsEmailCollector
/static/js/main.js
UTF-8
413
2.84375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* eslint-disable no-unused-vars */ function deleteUser(email) { if (window.confirm(`Are you sure you want to delete ${email}`)) { const xhr = new XMLHttpRequest(); xhr.open('POST', `./delete/${email}`); xhr.send(); xhr.onreadystatechange = () => { // Deletion successfully finished // Hide de...
true
b9c36d57e4084eb1a89a6633444a77c4d3c8a369
JavaScript
fajny-css/fajny-css
/js/accordion.js
UTF-8
1,287
2.828125
3
[]
no_license
/*=============================================== Accordion ===============================================*/ const accordions = document.querySelectorAll(".accordion") if (accordions.length > 0) { accordions.forEach(container => { const items = container.querySelectorAll(".accordion-item") const ...
true
ddef5c2fbb9a8679d11087340e700a7c694048d5
JavaScript
biliman/miniquery
/lib/miniquery.js
UTF-8
2,394
2.859375
3
[]
no_license
/*! * miniquery */ /* * ---------------------------------------------------------------------------- * Element Selector * ---------------------------------------------------------------------------- */ var SweetSelector = { select: function (element) { let el = document.querySelectorAll(element) return...
true
cdc2ba86850325afb2cbf4ec3669b478f60f985b
JavaScript
isaacdaw2/formulario
/form.js
UTF-8
5,238
3.03125
3
[]
no_license
// Variables del login en orden var login = document.getElementById("login"); var registrado = document.getElementById("registrado"); // Una vez registrado aparece este mensaje en el login: "Te has registrado correctamente" var usuario = document.getElementById("log"); var passwordLogin = document.getElementById("pass...
true
6ce567a9de5f87784e2bca7e73888e6bc9a17f46
JavaScript
sszh1904/SKOR
/docker/templates/js/studentSession.js
UTF-8
5,547
2.796875
3
[]
no_license
// Variables const student = JSON.parse(sessionStorage.getItem("student")); const studentEmail = student.email; const studentName = student.name; const session = JSON.parse(sessionStorage.getItem("session")); const acadYear = session.acadYear; const termNo = session.termNo; const courseCode = session.courseCode; const ...
true
341b8cb253d4ec98d74ed796102c7d97c36c462f
JavaScript
webclinic017/AcesTrader
/src/redux/reducerModal.js
UTF-8
3,662
2.59375
3
[]
no_license
// redux/reducerModal.js import uuidv4 from 'uuid/v4' import defaultState from '../json/defaultState.json' const QUERY_DELETE_TRADE_OBJECT = 'QUERY_DELETE_TRADE_OBJECT' const QUERY_ERASE_LISTS = 'QUERY_ERASE_LISTS' const QUERY_CLEAR_ONE_PROSPECTS_LIST = 'QUERY_CLEAR_ONE_PROSPECTS_LIST' const NOTIFICATION = 'NOTIFICA...
true
925d35f01f328d10e25516e4d09f2f20a48a7bf4
JavaScript
xiazhiyu/fashion
/public/js/modules/karte/service.js
UTF-8
2,351
2.53125
3
[]
no_license
function karteService($http, $rootScope, $mdToast){ var errorHandel = function(msg){ $mdToast.show( $mdToast.simple() .content(msg).position('top error').hideDelay(800) ); } var sucessHandel = function(msg){ $mdToast.show( $mdToast.simple() ...
true
08867c93f0d7599df3201da717c006cdfaffc8b9
JavaScript
Victiny-dev/Cours
/L3/S5/www/corrections_tp6/program.js
UTF-8
709
3.046875
3
[]
no_license
fs = require('fs'); figlet = require('figlet'); table = require('table'); continents = [ {nom: 'Afrique', population: 1340 }, {nom: 'Amérique', population: 800 }, {nom: 'Asie', population: 4641 }, {nom: 'Europe', population: 747 }, {nom: 'Océanie', population: 42 } ] let pop = 0; continents.forEach(function...
true
8051895a272a59a22da18d06adf474e7d229443e
JavaScript
miya89/portfolio-v2
/src/app.js
UTF-8
240
2.703125
3
[]
no_license
let checkbox = document.getElementById('checkbox'); checkbox.addEventListener('change', () => { document.querySelector(".main").classList.toggle('contrast'); document.querySelector(".btn").classList.toggle('secondary'); });
true
293f28cebbe39bc439796b139a6a9658833fcc48
JavaScript
ljnljnljn/doc
/algorithm/leetcode/54_Spiral_Matrix.js
UTF-8
1,205
3.734375
4
[]
no_license
/** * @param {number[][]} matrix * @return {number[]} */ let number var spiralOrder = function(matrix) { if (matrix.length === 0) return []; let rows = matrix.length, cols = matrix[0].length; let start = 0; number = [] while(rows > start * 2 && cols > start * 2) { printMatrix(matrix, star...
true
29fa3733b7e087308dfd13f2f886f760dee1548d
JavaScript
ashish020699/Javascript_Codes_beginner
/1. DataTypes.js
UTF-8
1,019
4.40625
4
[]
no_license
// Data types in javascript ; //1. Integer var n1 = 9 var n2 = 10 console.log(n1+n2) ; // 2. FLoat var n1 = 9.2 var n2 = 10.5 console.log(n1+n2) ; //3. String var str1 = "Dany and " var str2 = "Emilia" console.log(str1+str2); //4. Objects var marks = {ravi:34,abc :21,Aman :55} console.log(marks.A...
true
83337945a5aeb256b66f80c7208077e802eac07a
JavaScript
Ramakrishnamannam7/RegistrationPage
/Js/script.js
UTF-8
1,089
3.21875
3
[]
no_license
function getvalues() { var username=document.getElementById("user").value.trim(); var password=document.getElementById("fn").value.trim(); localStorage.getItem("USER",username); localStorage.getItem("PASS",password); return; } function validate() { var pass=document.getElementB...
true
2ccec5e9a0bdb0a7dcd518bc4207850355dabe46
JavaScript
odykyi/node-queuelib
/test/test-pushAsync.js
UTF-8
479
2.59375
3
[ "MIT" ]
permissive
var test = require('tape'); test('test pushAsync',function(t) { t.plan(1); var Q = require('../'); var queue = new Q; var list = []; queue.pushAsync(function(lib) { setTimeout(function() { list.push(1); lib.done() }, 200); }) queue.pushAsync(function(lib) { list.push(2); lib....
true
7c207bb7e7848fbdda0c5938bd6e9182d1da71ee
JavaScript
mma-90/budgety
/app.js
UTF-8
12,334
3.125
3
[]
no_license
//create module by create self invoked anynoums function var budgetController = (function () { // 1. Create suitable data structure // Item datatype var Expense = function (id, description, value) { this.id = id; this.description = description; this.value = value; this.perce...
true
1b7d5b0ec74541a783070be9e5006a2edaa7be1b
JavaScript
shmily40686/frog-jumper
/lib/background.js
UTF-8
811
3.125
3
[ "Apache-2.0" ]
permissive
class Background { constructor(ctx, image, posY, imageLength, speed) { this.image = image; this.speed = speed; this.x = 0; this.y = posY; this.imageLength = imageLength; this.ctx = ctx; } draw() { this.ctx.clearRect(0, 0, 800, 600); // this.im...
true
6df862da3c7fb1b24b440a9edfe08016288e9aeb
JavaScript
Kiki-Q/node-demo
/service/.history/servers/pubsub_20200828171036.js
UTF-8
1,147
2.78125
3
[]
no_license
//用事件发射器实现简单的发布/订阅系统 let events = require('events'); let net = require('net'); let channel = new events.EventEmitter(); channel.client = {}; channel.subscriptions = {}; channel.on('join', function(id, client) { //保存用户的client对象,以便程序可以将数据发送给用户 this.clients[id] = client; this.subscriptions[id] =...
true
5c9e43ecd4ba26f83bd8f5fd6a017d425dc9ff18
JavaScript
progroom/IBM-Node-Microservices-sep-20
/es6-apps/src/index-boolean.js
UTF-8
255
4
4
[]
no_license
//booleans let isWorking = true; let hasEnabled = false; //conditional statement if (isWorking) { console.log('Working') } else { console.log('not working') } if (hasEnabled) { console.log('Enabled') } else { console.log('not Enabled') }
true
4f1296d3e05375084b460a93261d05350df7ed48
JavaScript
TRQ1/bot-toy-project
/takeScreenshot/s3.js
UTF-8
1,037
2.703125
3
[]
no_license
'use strict'; import fs from 'fs'; import util from 'util'; import AWS from 'aws-sdk'; import dotenv from 'dotenv'; dotenv.config(); const ID = process.env.S3_ID; const SECRET = process.env.S3_SECRET; const REGION = 'ap-northeast-2'; const BUCKET_NAME = process.env.BUCKET_NAME; const s3 = new AWS.S3({ accessKeyId...
true
3200215c40f1ddc1f02aae4a505607c74c4d3a72
JavaScript
Juansanalme/tfg
/server/Trigger_Bullet.js
UTF-8
3,706
2.765625
3
[]
no_license
const p2 = require('p2'); const Trigger = require ('./EventManager'); class Bullet { constructor(angle, x, z, enemy, weapon, userAttack, world) { var self = Trigger(x, z, world); //CLASS PROPERTIES self.toRemove = false; self.lookingAt = angle; self.initialPosition = {'x':x...
true
85ba4d51c95b8be64d1f62a8d93b5dfe090280ef
JavaScript
jsanchesleao/styleme
/js/app.js
UTF-8
1,997
2.828125
3
[]
no_license
(function() { var baseStyle = '#content-wrapper { \n'+ ' position: absolute;\n' + ' width: 100%;\n' + ' height: 100%;\n' + ' background-color: #babaca;\n' + '}'; var cssEditor = ace.edit('css-content'); cssEditor.setTheme('ace/theme/monokai'); cssEditor.getSession().setMode('ace/mode/css'); var htmlEd...
true
7a362ada53e4b225affa44747878fd4950e525f4
JavaScript
ncardinale/CC_NicolaiC
/SS6_Nicolai_Cardinale/sketch.js
UTF-8
1,511
3.375
3
[]
no_license
//rejected and approves stamps //instructions: Up Arrow for Approved // Down Arrow for Denied // Space to Erase var stampedX = []; var stampedY = []; var stampNum = []; var img; var paper; var img2 //Counter for ellipse numb. var numStamped = 0; var imgNum = 1; function preload(){ // lo...
true
1270f61ea781bc0a539ad497db51917903a40097
JavaScript
Chave01/tercerEntregaPorras
/producto-index.html/app.js
UTF-8
3,768
3.265625
3
[]
no_license
/*class Carrito { // anadir producto al carrito comprarProducto (e) { e.preventDefault (); if (e.target.classList.contains ("btn")){ const producto = e.target.parentElement.parentElement; this.leerDatosProducto (producto) } } class datos { construct...
true
ec667cf34c15ef17e361fbd7fdbfb05f4a448c6b
JavaScript
varunjuneja/frame-by-frame
/extension/frame-by-frame.js
UTF-8
1,840
2.515625
3
[ "MIT" ]
permissive
fbf = {}; fbf.FRAMES_PER_SECOND = 25; fbf.PLAYER_ID = "movie_player" fbf.LEFT_SQUARE_BRACKET = 219; fbf.RIGHT_SQUARE_BRACKET = 221; fbf.prevFrame = function() { // Based on YouTube enhancer userscript, http://userscripts.org/scripts/show/33042. player = document.getElementById(fbf.PLAYER_ID); player.pause...
true
2a384b4414a69e54addfe06351ffef6469e1c504
JavaScript
byronthe123/Train-Scheduler
/assets/js/Train.js
UTF-8
1,371
3.234375
3
[]
no_license
class Train { constructor(name, destination, firstTrainTime, frequency){ this.name = name; this.destination = destination; this.firstTrainTime = firstTrainTime; this.frequency = frequency; this.id = this.setId(); // this.id = `${name.charAt(0)}${name.charAt(name.lengt...
true