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
fd29f1e42571b4e5169d5399ff867a314cee030e
JavaScript
magfurulabeer/cognito-demo
/scripts/confirmation.js
UTF-8
618
2.625
3
[]
no_license
document.getElementById('confirm-submit').addEventListener('click', (e) => { e.preventDefault() var confirmationCode = document.getElementById('confirm-code').value var email = document.getElementById('confirm-email').value var userData = { Username: email, Pool: userPool } ...
true
f9736b89ca2dfd05509c715de545be7ddecdeeec
JavaScript
aalokgupta/node-chat-app
/server/utils/users.test.js
UTF-8
1,735
2.953125
3
[]
no_license
var expect = require('expect'); var {Users} = require('./users'); describe('Users', function() { var users; beforeEach(function() { users = new Users(); users.users = [{id: 1, name: 'aalok', room: 'NodeJs Course' }, { id: 2, ...
true
c0b513ca25a4eb5849d24b893f54acb99d38824b
JavaScript
extheor/Day01
/demo09.js
UTF-8
132
3.03125
3
[ "MIT" ]
permissive
var message = false if (message == true) { console.log("该变量为true") } else { console.log("该变量为false") }
true
b3621471913f9c35f5c0132532e90ac3bde62bc8
JavaScript
DavidPolonkai/Webtechnologies_I
/js/loadCars.js
UTF-8
904
3.015625
3
[]
no_license
$(document).ready(function () { $.getJSON("https://webtechcars.herokuapp.com/api/cars", function(data){ filltable(data); }) }) function filltable(data){ let table = $("table"); $.each(data,function(key,value){ fillrows(table,key,value); }) } function fillrows(table...
true
84ae680343d62328fc9df4159be8e9dca50803a6
JavaScript
ywCN/LeetCodeES6
/119. Pascal's Triangle II.js
UTF-8
1,383
3.625
4
[]
no_license
/** * Given an index k, return the kth row of the Pascal's triangle. 1----------0 * For example, given k = 3, 1 1---------1 * Return [1,3,3,1]. 1 2 1--------2 * Note: ...
true
1680b9019c2878cc41e111d940fe4aaa8bee879b
JavaScript
acperez/inmoversis
/resources/www/private/admin/static/js/project_admin.js
UTF-8
6,135
2.6875
3
[]
no_license
'use strict'; function loadComments(page, callback) { var url = '/admin/comments/' + projectId + '/' + page; HttpClient.sendRequest(url, 'GET', null, function(status, statusText, response) { if (status == 200) { showComments(response.comments, response.pages); if (callback) callback(); } else {...
true
2c96e1edcf9e288547a10f723abfb47225ccf6bd
JavaScript
LarissaCouto14/Serratec_2021
/Fase 5/triangular.js
UTF-8
846
4.15625
4
[]
no_license
//O programa “Triangular” lê as medidas do triângulo, e informa se ele é equilátero, isósceles ou escaleno. //Escaleno: todos os lados apresentarem medidas diferente //Equilátero: todos os lados iguais //Isósceles: Dois lados iguais e um diferente const ler = require("prompt-sync")(); var a = parseFloat(ler("Digite...
true
fab076f5f0617c374a0ce8520fbe6f22b69f7600
JavaScript
sdeli/social-network
/app/front-end-tmp/js/moduls/sign-in/sign-in.js
UTF-8
1,710
2.609375
3
[]
no_license
const {setCookie, returnObjFromJson, clearFormFields} = require('../../utils/utils.js'); function signIn() { let signInForm = document.querySelector('form#sign_in_form'); let signInBtn = document.querySelector('form#sign_in_form input[type=\"button\"]'); let usrEmailField = document.querySelector('input#us...
true
bcf793eece740d976a1042f9db7e1f22d357fe69
JavaScript
baobao-666/2019-11
/src/store/modules/Cartmess.js
UTF-8
3,278
2.59375
3
[]
no_license
import { getCartMessSort, getCityId ,getFrom} from '@/services/index' let state = { desclist: {}, // 元数据 current: '全部', // 当前选择年份 year: ['全部'], // 所有的年份 currentList: [], // 当前年份的车款数据 arrs: [], FromList:[], cityCurrent:'201' //城市北京ID } // 给车款排序 function sortCarList(list) { ...
true
c903c4f9a05eb85702b972070a259cc1ca5e9348
JavaScript
KristineStateler/Question-Answer-Platform
/src/containers/FAQContainer.js
UTF-8
3,517
2.765625
3
[]
no_license
import React from 'react'; import Question from '../components/Question'; import QuestionForm from './QuestionForm'; class FAQContainer extends React.Component { constructor(props){ super(props) this.state = { selectedQuestion: null, questions: [], question: '', answer: ...
true
b683da7a6c33e13c5d94233c7b273e3e3f0c9abb
JavaScript
welchtr/locals-only-district
/src/components/pages/about.js
UTF-8
1,196
2.671875
3
[]
no_license
import React, { Component } from 'react'; import { Card, CardImg, CardText, CardBody, CardTitle, CardSubtitle, Button } from 'reactstrap'; class About extends Component { state = { event_name: "", event_date: "", event_venue: "", event_time: "", event_photo: "", }; // When the component mounts, lo...
true
377a8ea5bc9e678f8441f00d955c763c9381dbe0
JavaScript
ariasdrea/Social-Network
/src/onlineUsers.js
UTF-8
1,906
2.625
3
[]
no_license
import React from "react"; import { connect } from "react-redux"; import { allOnlineUsers } from "./actions"; class OnlineUsers extends React.Component { constructor(props) { super(props); } componentDidMount() { this.props.dispatch(allOnlineUsers()); } render() { const { ...
true
cdfe146f71c5917d0b18eca97b4880025a9108fb
JavaScript
xrtlibrary/xrtlibrary-async
/examples/synchronize/event-flags/slim/2.js
UTF-8
1,079
2.59375
3
[ "BSD-3-Clause" ]
permissive
// // Copyright 2017 - 2020 The XRT Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE.md file. // // // Note(s): // [1] This example demostrates how to customize slim event flags wait // condition. // // // Imports. // // ...
true
44d3d19cc996c06a2a6d3585f38cd81d83d6c611
JavaScript
monicaferrarig/petshop-backend-grupo4
/src/utils/manejoArchivoFirebase.js
UTF-8
1,724
2.875
3
[]
no_license
const {Storage} = require("@google-cloud/storage"); // Inicializo mi objeto de Firebase para pder conectarme con mi Bucket const credenciales = { projectId: "backend-petshop-imagen", keyFilename: "./credenciales_firebase_petshop.json", }; const storage = new Storage(credenciales); // Se crea la variable bucket que ...
true
7323c2ff353a6e72127c2f31e644c22a1b6e2c39
JavaScript
NikolajTaskin/repository0922
/src/components/registerForm.js
UTF-8
2,308
2.578125
3
[]
no_license
import {generateForm} from '../library/generateForm'; import {loginForm} from './loginForm'; import {mount} from '../library/mount'; export function registerForm() { return generateForm(inputs, buttons, register); } function register(e) { e.preventDefault(); const credentials = {}; inputs.forEach(inputData ...
true
4479e2ffa8900c06e77e460b5c2c63b0ff384616
JavaScript
3salles/FoxGame
/scripts/cenas/gameover.js
UTF-8
524
2.890625
3
[ "MIT" ]
permissive
class GameOver { constructor() {} draw() { this._imagemDeFundo(); this._texto(); this._botao(); } _imagemDeFundo() { background(0); image(imgGameOver, width / 2 - 200, height-600); fill("fff"); } _texto() { textFont(fonteGameOver); textAlign(CENTER); textSize(100); ...
true
b7a82598c8f29e5fef914c0b4897ac6154e02d69
JavaScript
Newbit13/demo
/js/interview/index.js
UTF-8
605
4.03125
4
[]
no_license
// 写一个 es6 的继承过程,要实现 extends 的功能。 const createExtends = function(sons, ssuper) { // TODO sons.__proto__ = ssuper;//继承静态属性 sons.prototype.__proto__ = ssuper.prototype;//继承动态属性 } class Human{ static ha = 1 static la = 2 speak() { console.log('i am human') } } class Man{ static zz = 3 static la ...
true
df4e92c5621e675d9dbfc19ac4a900d6fdc18134
JavaScript
udelblue/express-hello-world
/index.js
UTF-8
316
2.8125
3
[]
no_license
const chalk = require('chalk'); var express = require('express') var app = express() const port = 3000; app.get('/', function (req, res) { res.send('Hello World!') }) app.listen(port, function () { console.log(chalk.green("Running at Port " + port )); console.log(chalk.green('Press CTRL-C to stop')); })
true
8062472fd3cc8d04ca7f333bbb89df063d674232
JavaScript
MorganConrad/runequest-discordbot
/commands/ability_results.js
UTF-8
1,598
3.359375
3
[ "MIT" ]
permissive
/** * Command to determine the result of a die roll * args = [ability% (e.g. 95), die roll (e.g. 18)] * */ const CRITICAL = "Critical"; const SPECIAL = "Special"; const NORMAL = "Normal"; const FAILURE = "Failure"; const FUMBLE = "Fumble"; function doHandle(userCommand, args, utils, commandIgnored) { if (arg...
true
9f850477d7d25410b8139e767962b54e0fa07850
JavaScript
sriharibalgam/fc-booking-server
/routes/seats.js
UTF-8
977
2.5625
3
[]
no_license
var express = require('express'); var router = express.Router(); var seatController = require('../public/javascripts/seatController'); /** * GET all seats for a given fcId and slotId */ router.get('/getAllSeats/fc=:fcId/slot=:slotId', function(req, res, next) { var fcId = req.param('fcId'); var slotId = req...
true
f4d6bb88a3141f0ab50d1d07d5b89084b77367ae
JavaScript
girishkamat/filmsApp
/main/routes/FilmRoute.js
UTF-8
746
2.515625
3
[]
no_license
"use strict" var log4js = require('log4js'); var logger = log4js.getLogger(__filename); class FilmsRoute { constructor() { this._filmRepository = require("../repository/FilmRepository"); this._router = require('express').Router(); this.registerPaths(); } get router() { return this._router; } set rout...
true
1d29300702d4ea99c7738e45d025983cc028ef91
JavaScript
YashKumarVerma/refactor-simulator
/test/test.andGate.js
UTF-8
2,058
2.546875
3
[]
no_license
/* eslint-disable import/extensions */ import { AndGate } from './../modules/andGate.js'; import globalScope from './../modules/scopes.js'; const assert = chai.assert; describe('Testing : Component :: AndGate ', () => { const andGate = new AndGate(10, 10, globalScope); it('andGate object should be defined'...
true
46b87fa51ff630e4739ff715f729521418356a0c
JavaScript
xiaoshuai255/myReact
/project/src/redux/action-creators/category.js
UTF-8
1,087
2.53125
3
[]
no_license
import { reqGetCategories, addCategory, updateCategory } from "../../api" import { GET_CATEGORIES_SUCCESS, ADD_CATEGORIES_SUCCESS, UPDATE_CATEGORY_SUCCESS } from '../action-types/category' const getCategoriesSuccess = (categories) => ({ type: GET_CATEGORIES_SUCCESS, data: categories }) const addCategoriesSuccess...
true
244671debb7d5a03a99acd0997f70ac9358c58ca
JavaScript
yang-le0802/redux_demo
/src/redux/reducer.js
UTF-8
785
2.625
3
[]
no_license
import {INCREMENT,DECREMENT} from './action-types' import {combineReducers} from 'redux' function count (state=2,action){ switch(action.type){ case INCREMENT: return state + action.data case DECREMENT: return state - action.data default: return state } r...
true
6904a1d7451c81f77cc81b420ecbddd2f98b5058
JavaScript
gruberjl/gitbit
/build/get-image-dimensions.js
UTF-8
1,245
2.71875
3
[]
no_license
const sizeOf = require('image-size') const url = require('url') const http = require('http') const https = require('https') const stringify = require('json-stable-stringify') const debug = require('debug')('gitbit:get-image-dimensions') const getImageDimensions = async (imageUrl) => { debug(`Getting image dimensions...
true
fdf81ee7f67be4679923b4a4cba8f8df8e158df6
JavaScript
astarks11/d3_Treemap
/main.js
UTF-8
5,876
2.828125
3
[]
no_license
// HINT: Consider starting with a smaller, hand-written version of a tree, instead // of the one in flare.js. var data = flare; ////////////////////////////////////////////////////////////////////////////// function setTreeSize(tree) { if (tree.children !== undefined) { var size = 0; for (var i=0...
true
173525ae1a0495641afd06c69bd5e35f69cca894
JavaScript
montuckymike/intro_to_react
/src/MapAndFilter/MappingAndFiltering.js
UTF-8
1,280
3.203125
3
[]
no_license
// import React import React from "react"; const NamesList = (props) => { const nameItems = props.names.filter(function(name){ return name.length === 4; }) .map(function(name, index){ return <li key={index}> { name } </li> }); return ( <div> <h3> Names </h3> <ul> { nameItems } </ul...
true
2c68b631bb51451b42bc923e7ba4fc12ba10e64b
JavaScript
2372019/simple
/public/js/js-ghichu.js
UTF-8
1,724
2.546875
3
[]
no_license
//add ckeditor CKEDITOR.replace('noiDung',editor()); function taoTrTatCa(data, linkEdit, linkDelete) { var html = ""; $.each(data["items"], function(i, value) { var select = $('<select id="trangThai" name="trangThai" class="trangThai" onchange="updateTrangThai(this)"><option value="dangXuLy">Đang Xử Lý</option>...
true
0fad2fb33cc42ef13bd56dc29394896782b1c926
JavaScript
gissellegutierrez/giphy
/Untitled1.js
UTF-8
267
2.75
3
[]
no_license
var searchTerm; $("#submit").click(function() { searchTerm = $("#input").val(); $.getJSON( "https://api.giphy.com/v1/gifs/search?q= " + searchTerm +"&api_key=dc6zaTOxFJmzC", function(response) { console.log(response); } ) });
true
a93975f81e6316f0e20e7b788023efe5a9c6f0db
JavaScript
Mego/Cheddar
/src/stdlib/ns/Buffer.es6
UTF-8
791
2.78125
3
[ "Apache-2.0" ]
permissive
export default function(cheddar) { return class Buffer extends cheddar.class { static Name = "Buffer"; init(bytestream) { // If the buffer is not a buffer // assume it is a Cheddar object // therefore throw an error as a // buffer cannot directly ...
true
1b2a09e55e935983918b87dbce25058de024c33f
JavaScript
perezm27/About-Me
/js/app.js
UTF-8
4,759
4.28125
4
[ "MIT" ]
permissive
'use strict'; //sets counter that will keep track of questions answered correctly var counter = 0; var correctAns = ['1.yes ','2.no ','3.no ','4.yes ','5.yes ','6.The number I was thinking of was Seven']; //Begining of Minigame var username = prompt('What is your name?'); var usernameMessage = 'Hey there ' + username...
true
d1c9587e12cf2a1eb318c31ef9c29913c41b8c58
JavaScript
cityheroes/sushi
/src/common/Tools.js
UTF-8
623
2.90625
3
[]
no_license
const isArray = (value) => { return Array.isArray(value); }; const isObject = (obj) => { return Object.prototype.toString.call(obj) === '[object Object]'; }; const isObjectish = (obj) => { return obj === Object(obj); }; const omit = (obj, keys) => { if (!isObject(obj)) { return obj; } keys = !isArray(keys...
true
ba086d33ad78c688124dd8cbef2c957a5ade3aad
JavaScript
Chimoha31/Web_Parts2
/samples/chapter03/sample06/sample01.js
UTF-8
652
3.421875
3
[]
no_license
"use strict"; var Book = /** @class */ (function () { function Book() { this._name = ''; } Object.defineProperty(Book.prototype, "name", { get: function () { return this._name; }, set: function (value) { if (value === '') { c...
true
5f951d9e05f6edd38054c8c9c49cd487b58dbbc6
JavaScript
d198129/dzx_fullstack
/你不知道的JavaScript/闭包/1.js
UTF-8
179
3.03125
3
[]
no_license
function test() { var arr = [] for (var i = o; i < 10; i++) { arr[i] = function() { console.log(i); } } return arr } var myarr = test()
true
1af9ca6babfe47906c066caebf1d442153f63d40
JavaScript
joeytrapp/pretender-fixtures
/dist/agent.js
UTF-8
96,848
2.71875
3
[ "MIT" ]
permissive
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports...
true
d014024f0b82ccd537af29991ed9dec5a206afae
JavaScript
rajusingh41/vscodeRepo
/1-6FirstNode/app.js
UTF-8
351
2.5625
3
[]
no_license
// // self invoking funcion express // (function sayHi(){ // console.log('hi') // })() // // name function express // var a =function hi(){ // return 2; // } // // anonymous function express // var c =function(){ // return 5; // } var secondjs= require('./secondModule') console.log(secondjs(['raju...
true
0e810ab53b3435ccde6c21528404dd77413f8d20
JavaScript
mrp301/pocketaReference
/0153_加速度センサー/index.js
UTF-8
421
2.703125
3
[]
no_license
window.addEventListener("devicemotion", function(evt){ var ele = document.getElementById("result"); var x = evt.acceleration.x; var y = evt.acceleration.y; var z = evt.acceleration.z; var gx = evt.accelerationIncludingGravity.x; var gy = evt.accelerationIncludingGravity.y; var gz = evt.accelerationIncludi...
true
88da842b44fc13b4f8f7bc6c76db97c016d5ff44
JavaScript
jwplayer/shaka-player
/lib/util/string_utils.js
UTF-8
11,297
2.578125
3
[ "MIT", "Apache-2.0" ]
permissive
/*! @license * Shaka Player * Copyright 2016 Google LLC * SPDX-License-Identifier: Apache-2.0 */ goog.provide('shaka.util.StringUtils'); goog.require('goog.asserts'); goog.require('shaka.log'); goog.require('shaka.util.BufferUtils'); goog.require('shaka.util.Error'); goog.require('shaka.util.Lazy'); goog.require(...
true
21fb34b569227c30c17bdab04a9a99e72802a86c
JavaScript
acerklaus/BlackJack
/index.js
UTF-8
5,688
2.828125
3
[]
no_license
"use strict"; const startButton = document.getElementById("dealCards"); const hit = document.getElementById("hitButton"); const stand = document.getElementById("standButton"); var gameScreen = document.getElementById("gameScreen"); const betWindow = document.getElementById("betScreen"); var bankroll = 2500; cons...
true
3d446ab40ae52e99dbeb3ef9b1b54c1a6913580b
JavaScript
krlol/a5-poo-kalm
/sketch.js
UTF-8
2,925
3.671875
4
[]
no_license
var snake; var snake2; var scayle = 20; var food; function setup() { /* Antes, canvas cuadrado, aburrido :( createCanvas(600, 600); */ //Ahora, canvas del tamaño pantalla completa con un pequeño margen a los lados, arriba y abajo. Divertido :D createCanvas(window.innerWidth - (window.innerWidth *...
true
e23d74bfffefac12273de4c63d4836c99363b012
JavaScript
roman-osadchuk/Configuration-Board
/client/components/groupsComponents/ModalTableEditInfo.js
UTF-8
16,986
2.609375
3
[]
no_license
import React, {Component} from 'react' import { connect } from 'react-redux' import axios from 'axios' import * as ActionCreators from '../../actions/mainStoreActions' class ModalTableEditInfo extends Component { constructor(props) { super(props); this.state = { inputsStack: this.pro...
true
25475ef06f1e4ccaa295c4e01b1444206c3e2390
JavaScript
vluv99/train_database
/src/site/js/worker_management.js
UTF-8
2,006
2.84375
3
[]
no_license
var template = document.getElementById('worker-list__row'); var form = document.getElementById("worker-add"); document.getElementById('worker-list--thead').style.display = 'none'; var tbody = document.getElementById('worker-list'); function createRow(data) { var clone = template.content.cloneNode(true); var ...
true
06b49ba52f1753f73649970bf2407c7ba426442b
JavaScript
acuervoa/wikipedia_viewer
/scripts.js
UTF-8
1,693
2.734375
3
[]
no_license
$(document).ready(function() { var sendQuery = function(queryData) { var wikipediaAPIURL = "https://es.wikipedia.org/w/api.php?action=query&format=json&prop=extracts&titles=&generator=search&utf8=1&exsentences=1&exlimit=max&exintro=1&explaintext=1&gsrnamespace=0&gsrlimit=10&gsrsearch="; $.ajax({ ...
true
6ff9ff61ca1fd884b9afc94af9cac59d9ce9873d
JavaScript
Wayne-Bai/AST-normalize
/data/maryrosecook/coquette/demos/box2d-physics/src/drawer.js
UTF-8
3,394
2.8125
3
[]
no_license
;(function(exports) { exports.Drawer = function(game, ctx) { this.game = game; this.ctx = ctx; }; exports.Drawer.prototype = { startClip: function(ctx) { ctx.save(); ctx.beginPath(); ctx.arc(this.game.c.renderer.getViewCenter().x, this.game.c.renderer.getViewCenter().y...
true
b9cc2ffbd93ef2799fcb5530f95e56dc93eeb266
JavaScript
alexjane19/Kashangram
/routes/db.js
UTF-8
1,346
2.640625
3
[]
no_license
var express = require('express'); var pg = require('pg'); var path = require('path'); const connectionString = process.env.DATABASE_URL || 'postgres://postgres:110595@localhost:5432/kashangram'; var router = express.Router(); router.post('/', function(req, res, next) { const results = []; // Grab data from http re...
true
583e529a91a84a08c277f495614ee3d32a1e93a7
JavaScript
TheREALJones/gamedev1project2
/js/player.js
UTF-8
18,586
2.609375
3
[]
no_license
// Javascript classes are a lie, but the lie is better than the truth. class Player extends Phaser.Group { // Must be called after assets are loaded. // There's probably a better way to do this, // but that can be said about many things including Javascript itself. constructor(x, y) { super(game); this.left...
true
8bd4f64d5160bffb51cd3dffe86cb50796e535ed
JavaScript
mozilla-it/www-archive.mozilla.org
/projects/svg/wrappers.js
UTF-8
6,428
2.671875
3
[]
no_license
/** * SVG script wrappers, updated 2005-11-01 * Maintained at http://www.mozilla.org/projects/svg/wrappers.js * * Copyright (c) 2005, Jonathan Watt, http://jwatt.org/contact * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the...
true
4c5a8b38ffb94dadabcf01e2d095eda6cb1318e9
JavaScript
Drewbie345/rockpaperscissors
/script2.js
UTF-8
3,502
3.234375
3
[]
no_license
$(document).ready(function(){ $('#start').click(function(event){ event.preventDefault(); $('.rules').show(); playGame(); }); $('#play-again').click(function(event){ event.preventDefault(); $('#rock1-p').removeClass('border-p'); $('#paper1-p').removeClass('border-p'); $('#scissors1-p').removeClass('...
true
89e66413fb85c099ada5ee02de437f8cb40a0dc7
JavaScript
Brahyam08/reactor
/3/ej1/src/App.js
UTF-8
494
2.5625
3
[]
no_license
import "./App.css"; import { BrowserRouter, Route, Link } from "react-router-dom"; import { useState } from "react"; function App() { let [nombres, setNombres] = useState(["Paco", "Maria", "Alex"]); return ( <BrowserRouter> <Route exact path="/"> <h1>Rutas en React</h1> </Route> <Rou...
true
7b0ea38f8d512171b96b6e36e5a7a5aa8b708d01
JavaScript
Ayoub-Zahir/react-e-sports
/src/leagues/LeagueList.js
UTF-8
1,752
2.578125
3
[]
no_license
import React, { Component } from 'react'; import { Typography } from '@material-ui/core'; import Pagination from '@material-ui/lab/Pagination'; import League from './League'; import LeagueAPI from './LeagueAPI'; class LeagueList extends Component { constructor(props) { super(props); this.state = { leag...
true
902d0e628ed8d413c0b84316ea538be1f23ce3f2
JavaScript
YagizcanErdogan/forkifyapp
/src/js/index.js
UTF-8
250
2.65625
3
[]
no_license
import axios from "axios"; async function getResults(query) { const res = await axios(`https://forkify-api.herokuapp.com/api/search?&q=${this.query}`); const recipes = res.data.recipes; console.log(recipes); } getResults("pizza");
true
d3d2c2c987df892b023dc6418647e736f2b4be00
JavaScript
Xotabu4/startit_movie_finder
/pageObjects/CategoryPage.js
UTF-8
652
2.8125
3
[]
no_license
let AbstractPage = require('./AbstractPage.js').AbstractPage class CategoryPage extends AbstractPage { constructor(categoryTitle, url) { this.URL = url this.categoryTitle = categoryTitle } getMov } let categoriesMap = { 'adventure': {title: 'Adventure', url: 'genre...
true
932631e777d96d5bbeafa6e724407d820446af19
JavaScript
zulfadzlie/fincalcgrowth
/main.js
UTF-8
4,221
3.0625
3
[]
no_license
let mode = "PMT" let input_PMT = checkInput(document.getElementById("input-value-PMT").value) let input_RATE = checkInput(document.getElementById("input-value-RATE").value) let input_GROW = checkInput(document.getElementById("input-value-GROW").value) let input_NPER = checkInput(document.getElementById("input-value...
true
bc4cd695f73df70e9e283971b44628835c79b66a
JavaScript
chrisgreg/martian-aliens
/src/instructions.js
UTF-8
2,245
3.328125
3
[]
no_license
const lostCoordinates = []; function moveForward(currentState, worldSizeCoordinates) { let { x, y, orientation } = currentState; let lost = false; let newY = y let newX = x; switch (orientation) { case 'N': newY = y + 1; if (newY > worldSizeCoordinates.y) { lost = true; } ...
true
01dfe10862ab03eeed6530c849f8cbaedfa91655
JavaScript
AveraG/chirpAPI
/client/app.js
UTF-8
676
3.265625
3
[]
no_license
$(document).ready(function () { $("#send").click(function () { //send to post route (fetch) const chirp = { user: $("#user").val(), message: $("#message").val()} postChirp(chirp) addChirp(chirp) }); getChirps() }); function addChirp(chirps) { console.log(chirps) $('#chirps').append(`<h4> $...
true
d9a962ab58b1c6e450fe44184baf0af144ad18ca
JavaScript
Awlexus/wao---discord-bot
/lib/Utils.js
UTF-8
4,074
2.703125
3
[]
no_license
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _emoticons = require('emoticon-data/emoticons'); var _emoticons2 = _interopRequireDefault(_emoticons); var _custom_emojis = require('../custom_emojis'); var _custom_emojis2 = _interopRequireDefault(_custom_emojis); function _intero...
true
c20de78d2e8629e73c7d4d046adba1b10a429147
JavaScript
andmarku/Hobby_project_First_website_and_first_NN_Bot
/threeInRow/selfPlay/r3SelfAi.js
UTF-8
4,248
3.046875
3
[]
no_license
function selfNetwork() { return createPerceptron(numInputlayer=9,numHiddenLayer=[16],numOutputLayer=9) } function r3SelfPlay(network, iterations) { let learningRate = 0.3, aiIsPlayer for (let i = 0; i < iterations; i++) { do{ state = r3NewGame() aiIsPlayer = Math.round(Math.random()) * 2 - 1 // either +1 or...
true
174f194a41b59f75a5debb4d4068ba649c162c14
JavaScript
ChiaYunn/wp108b
/js/max.js
UTF-8
111
3.09375
3
[]
no_license
function max(a,b){ if(a>b) return a; else return b; } m=max(9,5); console.log("max(9,5)="+m);
true
fe9b0d4ffe895d43cc2fa2157c689745836cf561
JavaScript
MatKarp/Javascript-Training
/ButtonsController.js
UTF-8
1,395
2.859375
3
[]
no_license
function ButtonsController() { this.displayButtons = function (buttonNames) { var htmlButtons = this.createHtmlOnClickButtons( 'widgetController', 'displayFromCurrentNodeTo', buttonNames ); document.getElementById('buttons').innerHTML = htmlButtons; }...
true
bad358fce0e67000e83dba5ec2f6acf4132efe40
JavaScript
sofiavieraf/practicing-js
/concepts/person.js
UTF-8
1,041
3.296875
3
[]
no_license
class Person { constructor (...args) { if (args.length === 1) { const datos = args[0]; if (datos.name === undefined || datos.birthdate === undefined) { throw new Exception("No name no birthdate"); } this.name = datos.name; this.birthdate = datos.birthdate; this.cellphone = datos.cellphone;...
true
c82b5cdedf2dd40236064e0db51607e50db7a812
JavaScript
changwng/principles-object-oriented-javascript
/app/scripts/controllers/listofbooks.js
UTF-8
1,027
2.515625
3
[ "MIT" ]
permissive
'use strict'; /** * @ngdoc function * @name oojsNotesApp.controller:ListofbooksCtrl * @description * # ListofbooksCtrl * Controller of the oojsNotesApp */ angular.module('oojsNotesApp') .controller('ListofbooksCtrl', ['$scope', function ($scope) { $scope.books = [ { id: 'oojs', ...
true
af1ca7e600a35175152aaa73c5ac2de49331795e
JavaScript
llabati/dominoes
/src/services/calculations.js
UTF-8
2,555
3.125
3
[]
no_license
import { store } from '../store.js' export default { state: store.state, // désigne la valeur gauche du domino placé à l'extrémité gauche du tapis de jeu calculateHead: function(){ let head = this.state.board[0].value[0] return head }, // désigne la valeur droite du domino plac...
true
97e09e264270322829b266a889bdd3d9915115b9
JavaScript
Hemanth998/travelforum
/client/src/components/entities/PostPage.js
UTF-8
5,717
2.53125
3
[]
no_license
import React, { Component } from "react"; import { Link } from "react-router-dom"; import axios from "axios"; class PostPage extends Component { state = { token: null, post: {}, postedUser: {}, loggedUser: {}, commentText: "", comments: [], places: [], errors : [] }; componentWil...
true
81d7370148eb9b987449fa487c8d8c290bc215ec
JavaScript
r31415smith/r31415smith.github.io
/WavesSIM/lib/output.js
UTF-8
1,527
3.09375
3
[]
no_license
function output(left,top,width,height){ this.htmlElement = document.createElement("input"); this.value = ""; //define default input values this.height = height; this.width = width; this.top = top; this.left = left; /*=====================================================================...
true
58dc020cdd13d5ed4680cf136d5c55e9f433c2fb
JavaScript
C3SC0-V4113/Laboratorio-de-LIC
/Guia 10 JSON localStorage y sessionStorage/Discusion de Resultados/Ejercicio 1/js/sesionStorage.js
UTF-8
3,099
3.171875
3
[]
no_license
var ArregloPersonas=[]; var TiempoRestante=0; function init(){ var Boton=document.getElementById("EnvioPapu"); var Recibo=document.getElementById("ReciboPapu"); var Parrafo=document.getElementById("countabajo"); TiempoRestante=5; var Cuenta=setInterval(function(){ if (TiempoRestante<=0) { ...
true
7dd3dee6848bc884bfd62ef7995f811dcadc6840
JavaScript
Kemelbek/javascript
/js/Chapter 1/task_29_1.js
UTF-8
457
3.421875
3
[]
no_license
function findFirstChar(str){ var arrOfStr = str.split(""); for(var k = 0;k<str.length;k++){ var arrLen = arrOfStr.length; for(var j = 1; j<str.length;j++){ if(arrOfStr[0]==arrOfStr[j]){ arrOfStr.splice(j,1); j--; } } if( arrOfStr.length<arrLen){ a...
true
779787dce6c9e6f7123b5689220a2ce142da4418
JavaScript
Pankaj-j-ux/win_update
/ReactJs/dg-clock/src/App.js
UTF-8
1,298
3.0625
3
[]
no_license
import React, { useState } from 'react'; function App() { const [fullname,upname] = useState({ fname : "", sname : "" }); const [dis, updis] = useState(""); const upvalue = (event) => { var name = event.target.name; console.log(event.target.name); upname((pre) =>{ if( name === "...
true
a672eae2810a59e8f318c0c12333277d8d15c699
JavaScript
superpowerranger/antirise
/js/custom.js
UTF-8
1,055
2.703125
3
[]
no_license
// // When the user scrolls the page, execute myFunction // window.onscroll = function() {myFunction()}; // // Get the header // var header = document.getElementById("bottom-header"); // // Get the offset position of the navbar // var sticky = header.offsetTop; // // Add the sticky class to the header when ...
true
a42fd1b3dcaf55b202d502b750cdefda3c81ceee
JavaScript
toannguyen132/react_blog_client
/src/containers/Home/reducer.js
UTF-8
764
2.65625
3
[]
no_license
import { STATUS_LOADING, STATUS_SUCCESS, STATUS_ERROR } from 'containers/Home/constants'; const defaultState = { isLoading: false, hasErrors: false, errors: null, articles: [] } const homeReducer = (state = defaultState, action) => { switch (action.type) { case STATUS_LOADING: return { ...
true
231b0c2fa0a2ab39623efb39b50bcbe9fe4d85a4
JavaScript
lixingjuan/mini-vue
/core/array.js
UTF-8
1,811
3.046875
3
[]
no_license
// import Observer from './observe.js'; /* * not type checking this file because flow doesn't play well with * dynamically accessing methods on Array prototype */ // import { def } from '../util/index' const arrayProto = Array.prototype; const arrayMethods = Object.create(arrayProto); const arrayKeys = Object.ge...
true
ec94865e5c21f04ece4f8ce354c2730ddbf2d6e5
JavaScript
francescoferilli95/js-jsnacks-blocco-1
/js/main.js
UTF-8
2,996
4.5
4
[]
no_license
/** * * SNACK 5 * 1. GENERATE TWO ARRAY FILLED WITH NUMBERS OF DIFFERENT LENGTH * 2. ADD ELEMENTS TO THE SHORTEST ONE UNTIL HE BECOMES EQUAL TO THE OTHER ONE * /**/ // VARIABLES var container = [15, 59, 84, 20, 90]; console.log(container); var numbers = [75, 99]; console.log(numbers); //EVENTS if( contai...
true
0b9555c17064bcf73b8f539a6a38da04591a5b64
JavaScript
tbabic/new-targalad-web
/js/model/buffEffect.js
UTF-8
11,609
2.671875
3
[]
no_license
function BuffEffect(name, activate, deactivate) { this.name = name; this.activate = activate; this.deactivate = deactivate; } BuffsFactory = { bless : new BuffEffect("Bless", function() { this.bonusEffectList = new BonusEffectList(this); this.bonusEffectList.add(new Bonus([BonusCategory.TO_HI...
true
fd819ed603074d7b5292dc82cbdd0349a4dcc01c
JavaScript
rajendrasnagar/smartfactory
/src/main/webapp/resources/module/MBI/view/form/builder/ConditionBuilder.js
UTF-8
2,106
2.671875
3
[]
no_license
/** * @class MBI.view.form.builder.ConditionBuilder * @author kyunghyang. * 설정 벙보로 condition 속성을 설정하여 조건 컨트롤러들을 생성한다. * * @example * Ext.define('BaseFomeTest',{ * extend : 'Ext.panel.Panel', * title : 'Condition Test', * * initComponent : function() { * this.callParent(); * this....
true
85439ca1fda60e29881ee9aebabe024281eafc9f
JavaScript
timothymorrise/v-school-assignments
/exercises/end-of-the-world/index.js
UTF-8
1,070
3.125
3
[]
no_license
// let countdown = document.getElementById("countdown") let end = document.getElementById("end"); let counter = 20300 let setTimer = (date) => { let timer = new Date(date); let hour = timer.getUTCHours(); dispHour = hour < 10 ? `0${hour}` : hour let min = timer.getUTCMinutes(); dispMin =...
true
6f4b9c75c1b85bdbae7dac377339d0357b88aef8
JavaScript
ustas-v/cucumber-js
/lib/cucumber/ast/step.js
UTF-8
969
2.65625
3
[ "MIT" ]
permissive
var Step = function(keyword, name, line) { var docString; var self = { getKeyword: function getKeyword() { return keyword; }, getName: function getName() { return name; }, getLine: function getLine() { return line; }, hasDocString: function hasDocString() { re...
true
558b150b4cba2e913109e2800873b4db58a29d17
JavaScript
luocfa/grad-project
/WebContent/js/jquery.plugins.js
UTF-8
33,246
2.53125
3
[ "MIT" ]
permissive
(function($){ /* jquery公共插件 依赖文件:jquery.js */ $.fn.extend({ /************** name:jquery.slide.js description:轮播图插件(可自定义动画方式、主题样式、轮播图尺寸、支持全屏幻灯片) author:gzd date:2014.4.4 update:2014.6.4-增加全屏模式下窗口自适应宽度 参数设定:1、data(必须)-图片的url(地址)、href(链接)、title(描述)、target(链接打开方式),desc(图片描述,必须设置参数de...
true
34b5a17bb69befa65a7587b56128d50a38b7c24e
JavaScript
ayonkov1/HanTang-Chinese-Eindhoven-School-Website
/js/custom-scripts/username-input-validation.js
UTF-8
857
3.40625
3
[]
no_license
// input validation script for login.html and register.html var usrInput = document.getElementById("usrname"); // When the user clicks on the password field, show the message box usrInput.onfocus = function () { document.getElementById("message-user").style.display = "block"; } // When the user clicks o...
true
438fc20faca5a56cfc7886eb0bf68389430e1535
JavaScript
xanderLum/SMARTHire
/webapps/js/old/index.js
UTF-8
3,254
2.71875
3
[ "BSD-3-Clause", "MIT" ]
permissive
var posDrug = document.getElementById("posDrug").value; var negDrug = document.getElementById("negDrug").value; var posGun = document.getElementById("posGun").value; var negGun = document.getElementById("negGun").value; var posAlcohol = document.getElementById("posAlcohol").value; var negAlcohol = document.getElementBy...
true
ae4bb0101c00676a54c12bdabf8b0f6c573f4bd1
JavaScript
MarceeloDominguez/Shopping-Cart
/app.js
UTF-8
6,360
2.953125
3
[]
no_license
import slider from './slider.js' slider() document.addEventListener('DOMContentLoaded', getProducts) const container = document.querySelector('.container') const cartItems = document.querySelector('.cart-items') const cartContainer = document.querySelector('.cart-container') const cartDom = document.querySelector('....
true
47c9242233a4c02a2c7cfbdac8cf132f77393ed6
JavaScript
sidazhou/react_rails_skeleton
/app/assets/javascripts/components/widgets/Widgets6.jsx
UTF-8
2,526
2.65625
3
[]
no_license
import React from 'react'; import { connect } from 'react-redux'; import Widgets6button from './Widgets6button.jsx'; import Widgets6listItem from './Widgets6listItem.jsx'; import { addTodo, toggleTodo, getDataFromApi, setInputValue } from '../../actions/WidgetActions.js'; function mapStateToProps(state) { // react-r...
true
592451addda0233a4f7e8ca7244c16ce800580b1
JavaScript
zhang-yang-a/fe-code
/react/demo/src/Touch/index.js
UTF-8
4,249
2.515625
3
[]
no_license
import React, { useState, useEffect, useRef } from 'react'; function sleep(delay) { return new Promise((resolve, reject) => { setTimeout(resolve, delay); }) } function Touch() { const ref = useRef(null); const startTouchRef = useRef({x: 0, y: 0}) useEffect(() => { // const...
true
6c841515e626d618079603d3721b3f2b732fe3ad
JavaScript
GeekTrainer/hack-njit
/index.js
UTF-8
640
3.578125
4
[]
no_license
const dogs = [ // { name: 'Sammy' }, // { name: 'Roscoe' }, // { name: 'Artichoke' } ]; main(); async function main() { await loadDogs(); displayDogs(); } async function loadDogs() { const response = await fetch('/api/dogs'); const json = await response.json(); for(const dog of json.d...
true
08f0607369610106f019a752ba322f46b79ccec6
JavaScript
lhlhlihui/LeetCode
/004-MedianOfTwoSortedArrays.js
UTF-8
299
3.578125
4
[]
no_license
var findMedianSortedArrays = function(nums1, nums2) { var array = nums1.concat(nums2).sort((a, b) => a - b); if (array.length % 2 === 0) { return (array[array.length / 2 - 1] + array[array.length / 2]) / 2; } else { return array[(array.length - 1) / 2]; } };
true
477cf97168f9a258d6b4769e2e21d82e5a5a22b9
JavaScript
brettz9/eslint-plugin-query
/tests/lib/rules/no-missing-syntax.js
UTF-8
1,567
2.59375
3
[ "MIT" ]
permissive
/** * @file Use arbitrary selectors to require that specific * structures are present * @author Brett Zamir */ 'use strict'; // // Requirements // const {RuleTester} = require('eslint'); const rules = require('../../../lib/'); const rule = rules.rules['no-missing-syntax']; // // Tests // const ruleTeste...
true
2368b0a52647adec2b790dac6253ba4e9ab54ccb
JavaScript
raecharles/SWAPI
/PlattCodingChallenge/wwwroot/js/site.js
UTF-8
4,294
2.78125
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. //card view for long values let movies = document.querySelectorAll('.movie'); let icons = docu...
true
07dd4f70da5df02732e49808960c79a7d425acea
JavaScript
delagit/retos-master-en-code-g2
/Ejercicio_EstructurasDeDatos/7_Ejercicios_Computer_Science/linkedList.js
UTF-8
372
2.6875
3
[]
no_license
/* 3.- Un conductor maneja de un pueblo origen a un pueblo destino, pasando por varios pueblos. Una vez en el pueblo destino, el conductor debe regresar a casa por el mismo camino. Muestre el camino recorrido tanto de ida como de vuelta.  Recorrido: Pueblo Origen → pueblo 1 → pueblo 2 → destino Regreso: destino → pueb...
true
7e1a7ceba716c78a71b8b74313d475e43d0e90c1
JavaScript
KameronsCodeSpace/Pursuit-Core-npm-and-Modules-Lab
/MyModule/math-module.js
UTF-8
312
3.03125
3
[]
no_license
function sum (num1, num2) { return num1 + num2; } function multiply (num1, num2) { return num1 * num2 } function divide (num1, num2) { return num1 / num2 } function square (num, squareNum) { return Math.pow(num, squareNum) } module.exports = { sum, multiply, divide, square, }
true
7b209cb0a8bafa3e0592afeb61aa9a912b44a871
JavaScript
harunnasrullah/Tech-Academy-Projects
/C#,ASP.NET/MVC/BundlingMinificationExample/BundlingMinificationExample/Scripts/JavaScript8.js
UTF-8
162
2.75
3
[ "MIT" ]
permissive
// This is the click event handler for // button8. $('#button8').click(function () { var myMessage = "button8"; alert('Hello from: ' + myMessage); });
true
0676b28ab5011480353aca97aeb87673b794c324
JavaScript
awaghadsangita/node
/Algorithms/ToBinary.js
UTF-8
1,001
3.25
3
[]
no_license
/*************************************************************************************************************** * @purpose :outputs the binary (base 2) representation of the decimal number typed as the input * * @author :sangita awaghad * @since :24-08-2019 * @version :1.0 * **********************************...
true
fb6fac8ea99da415ba1a8e9031f0896741d364c1
JavaScript
helenhao888/GifTastic
/assets/javascript/api.js
UTF-8
8,183
3.03125
3
[]
no_license
var topics=["rabbit","panda","dog","bird","cat","monkey","kangaroo","koala","giraffe","tiger","cougar","fox","wolf","chicken","pig","dinosaur","goose","duck","elephant","hippo"]; //the extTopics is extened topics which includes the initial topics and the user added topics var extTopics=topics; var animalDupFlg=false; v...
true
5d100a77251abab07ba3166112f3bc7ef6421727
JavaScript
Behroozz/DataStructure
/Graph.js
UTF-8
3,872
3.484375
3
[]
no_license
class Graph { constructor(noOfVert) { this.noOfVert = noOfVert; this.AdjList = new Map(); } addVertex(v) { this.AdjList.set(v, []); } addEdge(v, w) { this.AdjList.get(v).push(w); this.AdjList.get(w).push(v); } printGraph() { let keys = this.AdjList.keys(); for(let key of keys)...
true
0d33f00ccfdc1214631f91a70ca7c1a2a40290fb
JavaScript
gomstory/problem-solving
/has-path.js
UTF-8
592
3.4375
3
[]
no_license
const graph = { f: ['g', 'i'], g: ['h'], h: [], i: ['g', 'k'], j: ['i'], k: [] }; // Implementation // Using Stack and Graph fundamental // Using Depth first search travesal const hasPath = (graph, src, dst) => { // Handle best case if (src === dst) return true;; const stack = [ src ]; while...
true
1f3b3fb1e380cc82093172cc6143743047f6ae61
JavaScript
aliwatters/sandbox
/2018/es6-refresher/iterators/iterators.js
UTF-8
202
3.390625
3
[]
no_license
let array = [1, 2, 3]; console.log(typeof array[Symbol.iterator]); let it = array[Symbol.iterator](); console.log(it.next()); console.log(it.next()); console.log(it.next()); console.log(it.next());
true
d90d24a8a75b597377bddcdb6cc5bfbf88d4e8f7
JavaScript
jaybobo/jaybobo.github.io
/projects/rap-name-gen/js/script.js
UTF-8
3,232
3.359375
3
[ "Apache-2.0" ]
permissive
$(document).ready(function() { /** * RAP NAME GENERATOR is a plug & play name generator. * Insert two arrays and it will output several possible names including... * "[user first initial] last name" * "[user first name acronymized] last name" * "title [user first name...
true
ae3cba279010a4ec5c0ebe6e718586ba9b60049d
JavaScript
yamaxim137/lesson14
/faq.js
UTF-8
2,488
2.65625
3
[]
no_license
class Faq{ constructor(containerFaq, listFAQ){ this.containerFaq = document.querySelector(containerFaq); this.listFAQ = listFAQ; this.create(); } create(){ // this.catalogCounter.addEventListener('click', function(){ cart.containerFaq.style.display = 'block'; ...
true
4d468c667c4ba474780f7c8b712f645e77622f1d
JavaScript
DanielGibsonOrchid/techdegree-project-10
/client/src/components/Header.js
UTF-8
1,078
2.5625
3
[]
no_license
import React from 'react'; import { Link } from 'react-router-dom'; /* Header menu */ const Header = () => { /* Check if the user is logged in - if Yes then return a different menu */ if(JSON.parse(localStorage.getItem('IsLoggedIn'))){ return ( <div className="header"> <div className="bounds">...
true
1390131af17f1fb24aad6035553e937ea72d7b1c
JavaScript
GAR-for-GATC/convertFunction
/Example.js
UTF-8
347
2.921875
3
[]
no_license
var Convert = require('./convertFunction.js'); try{ //example inputs: 15 lb to tons, 12c to f, 1500um to ft var input = "5'6ft to cm"; var output = Convert.convert(input); console.log(output); } catch(e){ console.log( '\tname: ' + e.name + ' message: ' + e.message + ' at: ' + e.at + ' text: ' + e...
true
0bfbc5ef481c577e4a65b6fd0dae21d0ae08da76
JavaScript
andersonguimaraes9/Exercicios_HTML_CSS_JAVASCRIPT
/Calculadora_e_IMC/public_html/imc.js
UTF-8
442
3.03125
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. */ function imc(){ var peso= parseFloat(document.querySelector("#peso").value); var altura= parseFloat(document.querySelector("#a...
true
0de85e0889c8001b046e0ea00b64cd93498cf034
JavaScript
ryanmccombe/jsExperiments
/codeWars_JS/_ghettoBenchmark - Copy.js
UTF-8
345
2.75
3
[]
no_license
// JavaScript Source Code var str = cleanse(function () {/*! <p>Line 1</p> <span>Line 2</span> <h2>Line 3</h2> */}); function cleanse(m) { return m.toString() //.replace(/^[^\/]+\/\*!?/, "") //.replace(/\*\/[^\/]+$/, "") .replace(/(\r\n|\n|\r)/g, "") } console.log(str)...
true
17642d3883ae4aa08b49ebca1023d16025476fb6
JavaScript
Ephemera/timezone
/test/test.js
UTF-8
1,185
2.796875
3
[]
no_license
test('.tz()', function() { expect(7); var now = new Date(); var min = now.getMinutes(); var copiedNow = new Date(now.getTime()); copiedNow.setHours(now.getHours() - 8); copiedNow.setMinutes(min); equal(now.tz('PST')[0].split('T')[1], copiedNow.toISOString().split('T')[1], 'PST'); copiedNow.setHours(...
true