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
0e30ced59120886966133010d6c1f135be6e9116
JavaScript
TossACoinToUrProgrammer/TossACoinToUrProgrammer.github.io
/DotaStats/js/players.js
UTF-8
10,463
2.78125
3
[]
no_license
import { getAllUrlParams, redirectPageWithParams } from "./workWithUrl.js"; import { getPlayerFromApi, getPlayerWinLose, getPlayerRecentMatches as getPlayerRecentMatchesFromApi, getPlayerHeroesStats, getPlayerTotals } from "./queriesToApi/playersApi.js"; import { getHeroIconUrl, getHero, getHeroByName, getHeroesFrom...
true
2dc6d6a8f9d31c179a58281ee21fbd1f1db8b282
JavaScript
charalav7/EventPlanningPlatform
/app/js/jobAdd.js
UTF-8
1,730
3.140625
3
[]
no_license
var idTask, jobTitle, jobDescription, experience; var myExecution; function submitStaff() { var x = document.cookie.split('='); idTask = Number(x[1]); jobTitle = document.getElementById('jobTitle').value; jobDescription = document.getElementById('jobDescription').value; experience = document.getEl...
true
16e3f00282ac693910e36cc3b726268e63971112
JavaScript
camazotz123/TravelGeeks
/TravelGeeks-main/screens/saved.js
UTF-8
1,669
2.546875
3
[]
no_license
import React, { useState } from "react"; import { FlatList, Button, View, Text } from "react-native"; import { globalStyles } from '../styles/global'; import Card from '../shared/card'; const Saved = ({ navigation }) => { const [data, setData] = useState(null); const getData = () => { fetch('https://michaelja...
true
9e3b8c18cd80059c2e2745a81296c3d8dc0d1901
JavaScript
Andmorales24/proyecto-ingreso-materiales
/controllerproyecto.js
UTF-8
5,261
2.609375
3
[]
no_license
var Proyectoexpo = require('./proyectoexpo'); //Obtiene todos los objetos Persona de la base de datos exports.getProyectosExpo = function(req,res){ Proyectoexpo.find( function(err,proyectoexpo) { if (err) res.send (err) res.json (proyectoexpo); //de...
true
19f00a70625ce92879ce2ae4cb6244a78ee6132f
JavaScript
alexanderfuller/ArticleFeeder
/public/js/script.js
UTF-8
794
2.953125
3
[]
no_license
//activate selected class in header navbar navigation function toggleClass(el){ var kids = document.getElementById('navbar').children; for(var i =0; i < kids.length; i++){ kids[i].className="li"; } el.className="active"; }; //set 'All' navbar link to active if logo is clicked function toggleClass2(){ var ...
true
f0eef82aaf5c3657fb4798ec57dfbf9043d0163a
JavaScript
nkartha2/backstage-calculator
/app/src/__mock__/fetch.js
UTF-8
864
2.65625
3
[]
no_license
import calculateDifference from '../calculate_difference'; const submittedNumbers = {}; export default function(inputNumber) { if(!submittedNumbers.hasOwnProperty(inputNumber)) { submittedNumbers[inputNumber] = { occurrences: 0, difference: calculateDifference(inputNumber), dateTime: new Date(...
true
edaf3313f5ad6834853b44db84ff6e60d185ad65
JavaScript
Mozartoliveira10051987/logica-senai
/atividade.js
UTF-8
2,318
3.453125
3
[]
no_license
// realizar o desenvolvimento de um sistema de cadastro para eventos que será disponibilizado para o público var dataEvento, dataAtual, idade, contadorParticipantes, limiteParticipante, participante, palestrante, maiorIdade; dataEvento = 20210918; dataAtual = 20210904; console.log("Digite sua data ...
true
2dc4b69c1dc51f158cb13bc059af9fd8617c1101
JavaScript
bgdeutsch/CatanApp
/src/utils/api.js
UTF-8
2,954
2.515625
3
[]
no_license
import axios from 'axios' function GetBaseApiUrl() { const env = process.env.NODE_ENV const devURL = process.env.REACT_APP_DEVELOPMENT_API const prodURL = process.env.REACT_APP_PRODUCTION_API return env === "development" ? devURL : prodURL } export function fetchRecentGames() { const URL = GetBaseApiUrl() ...
true
b9684f2a370da41b0f77fed9d2f3545c267fa426
JavaScript
manuuuskp/collectthebunny
/src/assets/js/libs/CustomQuery.js
UTF-8
4,401
2.734375
3
[]
no_license
import { getEaseValue } from "./EasingFunctions" class CustomQuery { constructor(el) { this.el = el this.isCollapsed this.sliding = false this.expandedStyle = this.getExpandedStyle() window.addEventListener('resize', () => { this.resizeTimer && clearTimeout(this.resizeTimer) this.resi...
true
8768493bc9e0e2a3de6a1ed4d1a887395ee5c27b
JavaScript
ericyangs/vue-koa2-login
/server/src/controllers/user.js
UTF-8
4,685
2.515625
3
[ "MIT" ]
permissive
const jwt = require('jsonwebtoken') const bcrypt = require('bcrypt') const { regexs } = require('../util') const config = require('../config/index') const UserModel = require('../init/db').User const { Op } = require('sequelize') // 校验请求参数 const validate = params => { if (typeof params !== 'object') { throw new ...
true
49d3bc7541dbf2b880e044f659f964b4063235a4
JavaScript
ma-petrovic/cucumber-demo
/index.js
UTF-8
151
2.625
3
[]
no_license
const fetch = require('node-fetch'); fetch('https://jsonplaceholder.typicode.com/users/1') .then(response => response.json()) .then(console.log);
true
d884fceb6ed0902c00dc3b56b2f3e235964d62c0
JavaScript
nimashoghi/hparch-resource-allocation
/images/random-computation/index.js
UTF-8
2,475
3.125
3
[]
no_license
const TIMELINE_FILE = "/timeline.json" const START_FILE = "/start" // const TIMELINE_FILE = "../../shared/timelines/sign-timeline.json" // const START_FILE = "../../shared/start.txt" const {timeline} = require(TIMELINE_FILE) const fs = require("fs").promises const randMatrix = () => Array.from(Array(100)).map(()...
true
7507408ca806f90ceb87e9774010f4f18b12c9a2
JavaScript
olechka-moiseenko/goit-js-hw-07
/js/task-06.js
UTF-8
411
3.328125
3
[]
no_license
const input = document.querySelector('input#validation-input'); input.addEventListener('blur', checkInput); const dataLength = Number.parseInt(input.dataset.length); function checkInput(e) { if(dataLength===e.target.value.length){ e.target.classList.add('valid'); e.target.classList.remove('invalid'); } ...
true
87ba4b89aaad73eb217446edc98c33eb59b3c950
JavaScript
irene3119/react-practice
/src/reducers/reducers.js
UTF-8
646
2.515625
3
[]
no_license
export const authorize = (username, password) => ({ type: 'AUTH_REQUEST', payload: { username, password } }); const initialState = { token: null, error: null }; const auth = (state = initialState , action) => { switch (action.type) { case 'AUTH_SUCCESS': { return {...state, to...
true
a6c22ce3f30e3db7fb3d4ee217182eca42c45003
JavaScript
Aryalekshmi402/heyoo_node
/sum.js
UTF-8
67
2.765625
3
[]
no_license
var x=10; var y=20; sum=x+y; console.log(+x); console.log(sum);
true
ea1b35b687db5f0d4878e0213aff755f889e425e
JavaScript
LWHSCoding/Plagiarism
/alchemy-node/tests.js
UTF-8
11,455
2.9375
3
[ "MIT", "Apache-2.0" ]
permissive
/** Copyright 2014 AlchemyAPI Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
true
e26dd4de4c3e1eced6066537f25b50310758fe79
JavaScript
colinjeanne/trivia-hub
/worker/src/game.js
UTF-8
2,288
2.671875
3
[]
no_license
const { Channel } = require("./channel.js"); const { countDown, getAnswerCounts, getPlayerAnswers, insertRandomlyInto, } = require("./gameUtils.js"); const { PlayerState } = require("./playerState.js"); function makeCountDown(ms, step, channel) { return () => countDown(ms, step, channel.reportCountDown.bind(...
true
0562e48067e7d47ca21c12811e1d4a5a1305525f
JavaScript
realfranser/my-jscript-compiler
/tests/test1.js
UTF-8
275
3.203125
3
[]
no_license
let number x; x = 1; let boolean a; a = true; function number Suma(boolean a, number b){ return b; } function boolean equals(number a, number b){ return a == b; } function number xor(number a, boolean b){ let boolean aux; aux = a && b; return x; }
true
f8e757e7de01fcd42837063f483ce8cf02d21b2e
JavaScript
js-tasks-ru/jsbasic-20200220_tchernovaalena
/5-module/1-task/index.js
UTF-8
1,439
3.453125
3
[]
no_license
/** * Метод устанавливает необходимые по условию аттрибуты таблице * @param {Element} table */ 'use strict'; function highlight(table) { let statusColumnIndex; //get status column index for (let tr of table.rows) { for (let td of tr.cells) { if (td.textContent === 'Status') { statusColum...
true
2a15d9643ec68667386d922629e94dbf21160840
JavaScript
Badreend/traineroverview
/models/trainer.js
UTF-8
269
2.75
3
[]
no_license
var Trainer = function(){ this.id = 0; this.firstName = ''; this.lastName = ''; this.password = ''; this.active = true; this.pictureUrl = ''; } Trainer.prototype.GetFullName = function(){ return this.firstName + ' ' + this.lastName; } module.exports = Trainer;
true
8d773aa6cd9a1231b7fedc06dc26e63012c4076a
JavaScript
alan-wu/ZincJS
/src/primitives/label.js
UTF-8
1,924
3.125
3
[ "MIT" ]
permissive
const SpriteText = require('three-spritetext').default; /** * Bitmap labels, this is used with {@link Glyph} to * provide labels. * * @param {String} textIn - Text to be displayed dwith the label. * @param {THREE.Color} colour - Colour to be set for the label. * * @class * @author Alan Wu * @return {Label}...
true
f15acecd178b3d8a08dc64099609d26f9a1dd2c7
JavaScript
whitestar417/portfolio
/guestbook/js/guestbook.js
UTF-8
3,235
2.859375
3
[]
no_license
document.getElementById("guestbookForm").onsubmit = validate; function validate() { //Create a flag variable let valid = true; //Clear all errors let errors = document.getElementsByClassName("err"); for (let i=0; i<errors.length; i++) { errors[i].style.visibility = "hidden"; ...
true
94ad2bb94d4d44f4d13411a859a98f1a27ceb559
JavaScript
mobin0/mail-man
/client/src/App.jsx
UTF-8
2,246
2.703125
3
[ "MIT" ]
permissive
import React from "react" import Frame from './components/frame.jsx' import User from './components/user.jsx' import Database from './components/database.jsx' import _ from "lodash" import $ from 'jquery' class App extends React.Component { constructor() { super() this.state = {username: null, dataUpdated: ...
true
fb2e0e4655aae70f5c9903bdff8ff3f70cb256e9
JavaScript
tsmarkov/JS-Core
/JS Fundamentals/IntroJS/Exercise/QuadraticEquation.js
UTF-8
570
3.390625
3
[]
no_license
function quadraticEquation(a, b, c) { let d = (b ** 2) - (4 * a * c); let output = []; if (d > 0) { let firstRoot = (-b + Math.sqrt(d)) / (2 * a); let secondRoot = (-b - Math.sqrt(d)) / (2 * a); output[0] = firstRoot < secondRoot ? firstRoot : secondRoot; output[1] = secon...
true
ad5ddc68ccb6ab43b81819781b7cc62e8845c222
JavaScript
arangodb/arangodb
/3rdParty/V8/v7.9.317/test/debugger/regress/regress-crbug-835973.js
UTF-8
4,246
2.671875
3
[ "bzip2-1.0.6", "BSD-3-Clause", "Apache-2.0", "SunPro", "ICU", "Zlib", "GPL-1.0-or-later", "OpenSSL", "ISC", "LicenseRef-scancode-gutenberg-2020", "MIT", "GPL-2.0-only", "CC0-1.0", "BSL-1.0", "LicenseRef-scancode-autoconf-simple-exception", "LicenseRef-scancode-pcre", "Bison-exception...
permissive
// Copyright 2018 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Test that stepping works correctly with bytecode scaling prefix. class MyClass { f(p) { this.x += p; } }; let obj = new MyClass(); function foo() {...
true
e6b373f425fccc9a53c29609f717b5cb8d5c47e3
JavaScript
youjinDev/game_project
/src/main.js
UTF-8
1,180
2.921875
3
[]
no_license
'use strict'; import GameBuilder from './game.js'; import PopUp from './popup.js'; // Builder Pattern const game = new GameBuilder() .withGameDuration(10) .withRedCarCount(5) .withGreenCarCount(5) .withTruckCount(5) .build(); const gameFinishPopup = new PopUp(); gameFinishPopup.setClickListen...
true
68ab54cf70473737b8db0c3f1d4ed3f70089f617
JavaScript
kenneth-rebello/qr-scanner
/src/components/Generator.js
UTF-8
1,328
2.734375
3
[]
no_license
import React, { useState } from 'react' import QRCode from 'qrcode.react' const Generator = () => { const [text, setText] = useState('No text entered yet'); const Changer = e => { setText(e.target.value) } const downloadQR = () => { const canvas = document.getElementById('qrcode'); ...
true
2e6ca1286173b9d00dcc23a839184b1c21675b95
JavaScript
uicoded/sandbox-js
/GoodParts/tmp.js
UTF-8
206
2.96875
3
[]
no_license
function Apple () { // body... } var apple1 = new Apple(); Apple.prototype.seeds = true; function Banana () { // body... } var banana1.prototype = Apple.prototype; console.log(banana1.seeds);
true
01d75f80bcefe7093d75df71e5952f5bbab813ec
JavaScript
anthonyprabowo/word-typing-game
/src/App.js
UTF-8
2,373
3.171875
3
[]
no_license
import React, {useState, useEffect} from 'react'; import './App.css'; import Words from './components/Words.js'; import Container from './components/Container.js'; import TypeRacer from './components/TypeRacer.js'; import Result from './components/Result.js'; function App() { const [word, setWord] = useState(Words);...
true
0f333bcae58cbec86a2ed0e8961f094787ce7420
JavaScript
laogener/react_hooks
/src/generator/index.js
UTF-8
594
3.71875
4
[]
no_license
function* g() { yield 'a'; yield 'b'; yield 'c'; yield 'ending'; } // console.log(g());//返回迭代器Iterator const gen = g(); // console.log(gen.next())//返回结果对象 {value:'a',done:false} value 是yield后面表达式的结果 // console.log(gen.next()) // console.log(gen.next()) // console.log(gen.next()) // console.log(gen.next...
true
93636084fd18e502aabbb22f28649d69db9d9f71
JavaScript
king4sam/peacock
/src/gameMessage.jsx
UTF-8
4,691
2.515625
3
[]
no_license
/* eslint-disable jsx-a11y/click-events-have-key-events */ /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ import React, { useContext } from 'react'; import PropTypes from 'prop-types'; // eslint-disable-next-line import/no-cycle import { clickContextStore, answerStatusStore } from './mainGame'; i...
true
6a07b357910150fe381451d7916d8cdee7d752fd
JavaScript
fabianfv/practica-08---Construir-Objetos-Automaticamente
/js/objetos.js
UTF-8
2,184
3.515625
4
[]
no_license
function Coche(marca, modelo, antiguedad, color, puertas) { this.marca = marca this.modelo = modelo this.antiguedad = antiguedad this.color = color this.puertas = puertas this.obt_marca = () => this.marca this.obt_modelo = () => this.modelo this.obt_antiguedad = () => this.antiguedad this.obt_color =...
true
884502bb5e9c8a750d0e63f54f480c8bb0a1e3fa
JavaScript
xinminlabs/plugin-ruby
/src/ruby/nodes/hashes.js
UTF-8
4,300
2.78125
3
[ "MIT" ]
permissive
const { concat, group, ifBreak, indent, join, line } = require("../../prettier"); const { getTrailingComma, printEmptyCollection, skipAssignIndent } = require("../../utils"); // When attempting to convert a hash rocket into a hash label, you need to take // care because only certain patterns are all...
true
94e16fdc10ee7eff16fa330ef077e70e6dfad77a
JavaScript
JRGreenfield/Chip8Emulator
/src/chip8/soundTimer.js
UTF-8
1,053
2.765625
3
[]
no_license
'use strict'; export function SoundTimer(audioRenderer){ let _register; let _audioRenderer = audioRenderer; let _active; Object.defineProperty(this,'register',{ get:function(){ return _register[0]; }, set:function(value){ _register[0]=value; } ...
true
07ff24ef7ae6935437698d7d7d62c6913f55d9f1
JavaScript
xiaoerwen/leetcode-train
/medium/#331/solution.js
UTF-8
1,384
3.609375
4
[]
no_license
/** * @file 验证二叉树 * @author xiaoerwen */ /** * 思路:用出入度来验证,根节点的出度为2,入度为0;null节点的入度为1,没有出度;其他节点入度为1,出度为2 * 一颗完整的二叉树,在没有遍历结束之前,入度不可能大于出度 * * @params {string} preorder 前序遍历序列 * @return */ const isValidSerialization = function(preorder) { if (!preorder.length) { return false; } if (preorder.le...
true
ab3928a8f513a1ec259f06ef3548e73caf697ac6
JavaScript
ripandy/ketix
/app/src/main/assets/ketix/js/mainmenu.js
UTF-8
891
2.6875
3
[]
no_license
function createMainMenu(x,y) { createjs.Container.call(this); // define attributes this.x = x; this.y = y; // ketix label var kLabel = new createjs.Text("KetiX!", "120pt sans-serif", "#ffffff"); kLabel.textAlign = "center"; kLabel.textBaseline = "middle"; kLabel.x = CANVAS_WIDTH/2; kLabel.y = CANVAS_HE...
true
d71f6ee997881c538aca25970516b7f3ab463890
JavaScript
PaulSender/Algorithms
/AlgoExpert/Easy/validSubsequence.js
UTF-8
4,297
4.1875
4
[]
no_license
// Given two non-empty arrays of integers, write a function that determiens whether the second array is a subsequence of the first one. // A subsequence of an array is a set of numbers that aren't necessarily adjacent in the array but that are in the same order as they appear in the array. // For instance, the number...
true
4aa3d2c8a339046d833f252bb6df37e176c9b2f9
JavaScript
Naixes/sin-ledger-react
/src/components/MonthPicker.js
UTF-8
3,455
2.765625
3
[]
no_license
import React from 'react'; import PropTypes from 'prop-types'; import {padLeft, range} from '../util' class MonthPicker extends React.Component { constructor(props) { super(props) // 旧版本写法为回调ref this.picker = React.createRef() this.state = { isOpen: false, se...
true
b5970c3b73e2bf93b88eb5518e65eb6fe6e4b7cd
JavaScript
dasqueel/lambda-challenges
/logicgates.js
UTF-8
770
4.09375
4
[]
no_license
function NAND(x, y) { // You can use whatever JS operators that you would like: &&, ||, ! if (x === 1 && y === 1) return 0; return 1; } function NOT(n) { // Do not use ! if (n === 0) return 1; if (n === 1) return 0; } function AND(x, y) { // Do not use &&, ||, or ! // You can use any of the functions that ...
true
7602cbec8edcea07e04ef1dab6db5b101b924e9b
JavaScript
VeselinAtanasov/todo-list-express
/app/utils/helpers/helper.js
UTF-8
4,655
2.765625
3
[]
no_license
const constants = require('./constants'); function getCurrentDate () { var time = new Date(); function fill (digit) { if (digit >= 0 && digit < 10) { return '0' + digit; } return '' + digit; } return ('' + time.getFullYear() + '-' + fill(time.getMonth() + 1) + '-' + fill(time.getDate()) + ' ...
true
8c3e056489f534d4df2e777c0c60e039c85350ca
JavaScript
vigneshvkp/JavaRestTask
/web-ui-manager/src/main/webapp/app/shared/common/directives/numberFieldDirective.js
UTF-8
8,754
2.90625
3
[]
no_license
/** * dircetive that is used for input fields which allows only numbers to be entered*/ angular.module('WebUIManagerApp').directive('numbersOnly', function(){ return { require: 'ngModel', link: function(scope, element, attrs, modelCtrl) { modelCtrl.$parsers.push(function (inputValue) { // this next if is nec...
true
15a4d62505fdd078bd6a162c6d7facde0341e616
JavaScript
federikos/ra16-diploma
/react-ui/src/reducers/product.js
UTF-8
846
2.5625
3
[]
no_license
import { FETCH_PRODUCT_REQUEST, FETCH_PRODUCT_FAILURE, FETCH_PRODUCT_SUCCESS, CLEAR_PRODUCT, } from '../actions/actionTypes'; const initialState = { product: {}, loading: false, error: null, }; export default function productReducer(state = initialState, action) { switch (action.type) { case FETCH...
true
cbbcfd2b16bf328b4e0b25c53ea0d82097b6ac6e
JavaScript
KUT-soiweb/web
/js/load.js
UTF-8
6,258
2.578125
3
[]
no_license
window.onload = function(){ //headSerect(0); onYearChange(); }; var nextFlag = 0; function onChange() { location.href = "#numLink"; var radioList = document.getElementsByName("btn"); var list = document.getElementsByName("list"); var yearList ...
true
a3b8dd5fef84a9f77b18f5bae2e89e2b234a8a13
JavaScript
raquelnishimoto/JS101-ProgrammingFoundations-Javascript
/small_problems/easy_5/easy5_6.js
UTF-8
558
4.96875
5
[]
no_license
/* Write a function that takes an array of integers as input, multiplies all of the integers together, divides the result by the number of entries in the array, and returns the result as a string with the value rounded to three decimal places. */ function multiplicativeAverage(array) { let multiplication = array.red...
true
dfb7cb9426ef91018a72ae03792de51349c284bd
JavaScript
LuisMPS/kumonapp
/app/db/students/stages/functional.js
UTF-8
212
2.78125
3
[ "MIT" ]
permissive
const curry = fn => { const arity = fn.length; return function $curry(...args) { if (args.length < arity) return $curry.bind(null, ...args); else return fn.call(null, ...args); } } exports.curry = curry;
true
309e09090c76fe759804992e84ced12b37e79440
JavaScript
kalafoods/KalaFoods
/src/components/HomePageComponents/Gallery.js
UTF-8
2,577
2.6875
3
[ "MIT" ]
permissive
import React from "react" import styled from "styled-components" import { styles, Section } from "../../utils" import { StaticQuery, graphql } from "gatsby" import Img from "gatsby-image" const query = graphql` { getImages: allFile(filter: { relativeDirectory: { eq: "homeGallery" } }) { edges { nod...
true
aeba1404f3c7e59c46aba8ca6ba1903d7ce026f5
JavaScript
MartinPetrakiev/soft-uni-js-study
/expense-tracker-nodejs-app/middlewares/expenseValidator.js
UTF-8
1,052
2.78125
3
[]
no_license
module.exports = (req, res, next) => { const { merchant, total, category, description } = req.body; if (!merchant || !description || !category || !total) { const error = 'Expense merchant, total, category and description are required fields.'; return res.render('expenses/create', { notification...
true
130ef749ba414f306b8c44a985e47c35eb1dad7c
JavaScript
yibele/javascript
/test.js
UTF-8
2,154
3.390625
3
[]
no_license
var a = ['A','B','C','D']; /* var m = new Map([['name','yibu'],['age',20]]); m.forEach(function(value, key, map){ console.log(`${key} = ${value}`); }); */ /* * var a = function(){ for(i =1;i<10;i++){ console.log(i) } }; a(); console.log(i+1); */ /* var scope = 'golbal'; function chescop...
true
23ccde61521e6a9b475e95b840cdf6c3a15a8814
JavaScript
ArseniiLyzenko/problems-and-solutions
/HammingDistance/tests.js
UTF-8
224
2.734375
3
[ "MIT" ]
permissive
describe("calcHammingDistance()", function() { it("1, 4 → 2", function() { assert.equal(calcHammingDistance(1, 4), 2); }); it("4, 8 → 2", function() { assert.equal(calcHammingDistance(4, 8), 2); }); });
true
d3ff814b9fc7bbce10d7c6a00a1ced99bb819552
JavaScript
Metwas/broadleaf
/lib/utils/utils.js
UTF-8
32,886
2.71875
3
[ "MIT" ]
permissive
"use strict"; /* MIT License Copyright (c) 2020 Metwas Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights t...
true
184ed1713c7231db1e4f66c9a632ba929260130f
JavaScript
desdamo/HomeMade-kanban
/app/test.js
UTF-8
200
2.890625
3
[]
no_license
const sanitizer = require('sanitizer'); const str = '<script>alert("tu as été piraté")</script>'; const sanitizedString = sanitizer.escape(str); console.log(str); console.log(sanitizedString);
true
77ece65ee91794eb7c0e8ca821a8df01e73cb57c
JavaScript
thisistaimur/Course
/02-Programming-Basics/2020-09-10-Basic-String-Methods_Intro-Functions/functions/02-declaration_notation.js
UTF-8
247
3.34375
3
[]
no_license
// function FUNCTION_NAME(PARAMETER, ...) { // FUNCTION_BODY; // } // // FUNCTION_NAME(PARAMETER, ...); // NOTE: hoisting is possible => better readability result = pow(2, 4); console.log(result); function pow(x, y) { return x ** y; }
true
bf8adc4ad3cd0273d016b9cb3f4bd77374b3b1a7
JavaScript
blujan/tools
/gmail-apps-script/Archive Inbox/Code.gs
UTF-8
496
2.703125
3
[ "MIT" ]
permissive
// // Automatically archive anything in the inbox older the x number of days // function ArchiveInbox() { var delayDays = 90 // Enter # of days before messages are moved to archive var maxDate = new Date(); maxDate.setDate(maxDate.getDate()-delayDays); var label = GmailApp.getInboxThreads(); var threads = lab...
true
942c9bb1d0710070c44bbcdd91872168f67118a8
JavaScript
mikaelvesavuori/cloudrun-googlesheets-feature-toggles
/src/GoogleSheetsFeatureToggles.mjs
UTF-8
5,290
2.984375
3
[]
no_license
import Sheets from 'google-spreadsheet'; const { GoogleSpreadsheet } = Sheets; /** * @description Use Google Sheets to host feature toggles, and let this application process and bring them to your users * @example * const featureToggles = new GoogleSheetsFeatureToggles(request.query); * const toggles = await feat...
true
9a4620effaa65102de6ffbafbe43a8679e712244
JavaScript
cecilioalvarez/escuelaTallerJunio
/Karolinne/spec2/funciones5.js
UTF-8
209
2.640625
3
[]
no_license
var mediaarray= function mediaarray (array1) { var suma=0; var media=0; for (var i=0;i<array1.length;i++){ suma=suma+array1[i]; } media=suma/array1.length; return media; }; exports.mediaarray=mediaarray;
true
41d67be9fc82a3a1f0e5af91a4fd19ddfd2516dc
JavaScript
karaivanska/JavaScript-Fundamentals
/2. Control flow logic-Lab/12. primeNumberChecker.js
UTF-8
527
4.375
4
[ "MIT" ]
permissive
/* Write a JS function to check if a number is prime (only wholly divisible by itself and one). The input comes as a single number argument. The output should be the return value of your function. Return true for prime number and false otherwise. */ 'use strict'; function primeNumber(number) { let prime = true; ...
true
b89ff257127693d1fc874e5027b549ebd6bd040c
JavaScript
rvegas/resume
/js/resumeBuilder.js
UTF-8
6,882
2.625
3
[]
no_license
//BIO var bio = { name: "Maria Andreina Vargas", role: "Marketing Specialist", biopic: "https://media.licdn.com/mpr/mpr/shrinknp_400_400/p/7/000/1f1/38e/3af4dee.jpg", welcomeMessage: "Bachelor degree in Business and Administration with a lot of experience in digital marketing, what are you waiting for, hire me!", ...
true
7782d7639258960312790145184842b7224c7a51
JavaScript
azu/strict-eval
/test/strict-eval-test.js
UTF-8
366
2.625
3
[ "MIT" ]
permissive
// LICENSE : MIT "use strict"; const assert = require("assert"); const strictEval = require("../lib/strict-eval"); // const in strict mode strictEval(` const assert = require("assert"); assert(true); `); // throw error try { strictEval(` const assert = require("assert"); assert(false); `); } catch (...
true
9023046e3fe77f75eb5f592f792dc27328c21e35
JavaScript
Sheilf/MathUI
/app/src/components/Assistant/Assistant.js
UTF-8
2,685
2.671875
3
[]
no_license
import React, { Component } from 'react'; import './Assistant.css'; import Lectio from '../Lectio/Lectio'; import Tabula from '../Tabula/Tabula'; import Exempli from '../Exempli/Exempli'; import Teacher from '../Teacher/Teacher'; import '../../styles/flexborder.css'; class Assistant extends Component { //to do ...
true
bfd3b848545ed95c08ec33554e258c52b6bbc830
JavaScript
rodineiti/course-react-native-part-1
/src/components/TodoItem.js
UTF-8
2,529
2.53125
3
[]
no_license
import React, { Component } from 'react' import { Text, View, TouchableHighlight, StyleSheet, Button } from 'react-native' export default class TodoItem extends Component { constructor(props) { super(props); this.state = { done: (this.props.data.done == '1') ? styles.done : styles.undon...
true
bdbfe6c21a38ec712c7a182139561318750dc7b7
JavaScript
manavg005/BACKEND-THAs
/THA 9/routes/users.js
UTF-8
1,340
2.765625
3
[]
no_license
var express = require('express'); const fs = require('fs'); const path = require("path"); var router = express.Router(); router.get('/file/:filename(*$)', (req, res) => { const filename = req.params.filename const fullPath = path.join(__dirname,"../public/images") // res.send(fullPath) //res.sendFile(path.join(...
true
7a69a8f65fa122f856c25bdfe01d6aedcad72d28
JavaScript
mmolasy/NodeJS-learning
/call bind apply/index.js
UTF-8
585
3.75
4
[]
no_license
function Name(name){ this.name = name; } function sum(a, b, c){ console.log(a+b+c); console.log(this.name); } /* sum.call(this, 1, 2, 3); sum.apply(this, [1, 2, 3]); */ var name = new Name("Mati"); var name2 = new Name("Gosia"); //sum.call(name, 1, 2, 3); //sum.apply(name2, [1, 2, 3]); var sumBind = s...
true
1a085c17915e9417904312a45c33249eac92422a
JavaScript
karuaan/CS-546-Web-Programming
/Labs/lab_4/todo.js
UTF-8
2,035
2.828125
3
[]
no_license
/** Karan Shah CS 546 I pledge my honor that I have abided by the Stevens Honors System. **/ const mongoCollections = require("./mongoConnections"); const tasks = mongoCollections.tasks; const id = require("node-uuid"); module.exports = { async createTask(title, description) { if (!title) { throw "No T...
true
f4c23d9c5dfcf5a1c337b9912f72a3ea736d2d31
JavaScript
tkt989/atcoder-calendar
/public/index.js
UTF-8
940
2.796875
3
[ "MIT" ]
permissive
const url = "https://atcoder-calendar.tkt989.info/calendar" const abc = document.querySelector("#abc") const agc = document.querySelector("#agc") const unknown = document.querySelector("#unknown") const copy = document.querySelector("#copy") const text = document.querySelector("#text") abc.checked = true agc.checked...
true
f163412f09cdef9544357f552f932f560483ebfa
JavaScript
jvastola/Coding-Practice
/firstDigit.js
UTF-8
77
2.78125
3
[]
no_license
function firstDigit(inputString) { return inputString.match(/\d+/)[0][0] }
true
117f86c2e45b56b482bca025e21dc37588c4c566
JavaScript
tuandai/flow-web
/src/packages/i18n/tests/i18n.spec.js
UTF-8
5,211
2.59375
3
[ "Apache-2.0" ]
permissive
import createResource from '../index' describe('i18n function', function () { it ('should be a function & has createChild props', () => { const i18n = createResource({}) expect(i18n).to.be.a('function') expect(i18n.createChild).to.be.a('function') // expect(i18n.loadResource).to.be.a('function') }...
true
b4dd1efd941739033b3582463a4bf055bf1b5ca4
JavaScript
sqoor/github-api-project
/server.js
UTF-8
590
2.578125
3
[]
no_license
const cors = require("cors"); const axios = require("axios"); const express = require("express"); const app = express(); app.use(cors()); app.get("/repos/:username", async (req, res) => { const username = req.params.username; try { const githubResponse = await axios.get( `https://api.github.com/users/${...
true
5ce096f20f76c810c6b60521a2a5d1f980452b18
JavaScript
vjr12/CodeFights
/Arcade/Intro/17_arrayChange.js
UTF-8
295
3.28125
3
[]
no_license
function arrayChange(inputArray) { var moves = 0; for (var i = 1; i < inputArray.length; i++) { if (inputArray[i-1] >= inputArray[i]) { moves += ((inputArray[i-1] + 1) - inputArray[i]); inputArray[i] = inputArray[i-1] + 1; } } return moves; }
true
c047176859c97bcec637e09e304d8cc7931e15e3
JavaScript
401Repo/data-structures-and-algorithms
/challenges/linkedList/linkedList.js
UTF-8
6,203
3.8125
4
[ "MIT" ]
permissive
'use strict'; // User defined class node class Node { // constructor constructor(data) // need to ALWAYS use 'data' { this.data = data; this.next = null } } class LinkedList { constructor() { this.head = null; this.size = 0; } insert(data) { ...
true
0aa2ceffae564b5f7f83fdef87d0a9740fff97a0
JavaScript
igks/node-api
/app.js
UTF-8
1,890
2.921875
3
[]
no_license
// import dependencies needed const express = require('express'); const mongoose = require('mongoose'); const bodyParser = require('body-parser'); // initialize express var app = express(); app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json()); // connect to database mongoose.connect( 'mong...
true
ed4493bca473d4a2d36ba818707b3a0b1a6ecb56
JavaScript
KubaJarmolowicz/nawyki
/js/view/intersectionObservers.js
UTF-8
676
2.625
3
[]
no_license
import { nextBtn, prevBtn } from "../DOMRefferences.js"; function showBtn(btn) { btn.style.display = "block"; } function hideBtn(btn) { btn.style.display = "none"; } function adjustToStartView(entries) { if (entries[0].isIntersecting) { hideBtn(prevBtn); } else { showBtn(prevBtn); } } function adjustToEndV...
true
401306f83615fc830d28899dbd43f41549c9cccb
JavaScript
rahmat-andika/front-end
/javascript lanjutan/prototype/script.js
UTF-8
906
4
4
[]
no_license
// prototype // function Mahasiswa(nama, energi){ // this.nama = nama; // this.energi = energi; // } // Mahasiswa.prototype.makan = function(porsi){ // this.energi += porsi; // return `selamat makan ${this.nama}`; // } // Mahasiswa.prototype.main = function(jam){ // this.energi -= jam; // return `selamat bermai...
true
f717c4921b3c8616874dae737cb727470d9d91af
JavaScript
Shadowru/road_parse
/src/GeoGenerator.js
UTF-8
3,376
2.625
3
[]
no_license
import fs_extra from "fs-extra"; import * as turf from '@turf/turf'; export default class GeoGenerator { constructor() { this._initDict(); } _initDict() { const road_dict = fs_extra.readJsonSync( './data/geo_roads.json' ); this._road_dict = road_dict; } ...
true
6effd0650be3b9e37d0e383cf51dc352529ac3b3
JavaScript
mayrapoport/PixelShape
/test/reducers/tools.spec.js
UTF-8
1,372
2.5625
3
[ "MIT" ]
permissive
import test from 'blue-tape'; import sinon from 'sinon'; import tools from '../../src/reducers/tools'; import { setTool, setColor, setSize } from '../../src/actions/tools'; const initialState = { tool: 'Brush', color: '#1B2631', size: 1 }; test('tools =>', (expect) => { expect.test('::Initial state', (...
true
23690f8c9e0c0f28260fa427b09e0b5cec9936ce
JavaScript
fartem/codewars-javascript
/src/kyu6/stringarrayduplicates.js
UTF-8
177
2.609375
3
[]
no_license
// https://www.codewars.com/kata/59f08f89a5e129c543000069 function solution (strings) { return strings.map(s => s.replace(/(.)\1+/g, '$1')) } module.exports = { solution }
true
b2a3ded1320032bdab2c3a56f0914343fed9f6e5
JavaScript
Cycling74/miraweb
/packages/xebra.js/src/nodes/liveDisplayValueMixin.js
UTF-8
5,853
2.703125
3
[ "MIT" ]
permissive
import { LIVE_VALUE_TYPES, LIVE_UNIT_STYLES } from "../lib/constants.js"; import { PARAMETER_ATTR } from "../lib/objectList.js"; import { sprintf } from "sprintf-js"; function stringForLiveValue(liveValue, unitStyle, paramValueType, customUnit) { if (liveValue === undefined || unitStyle === undefined) return ""; le...
true
e4050d7408f42ecdce414f1972a5b86f4f213e8a
JavaScript
mathiuskormasela12/belajar-javascript
/es6/latihan/src/index.js
UTF-8
2,794
4.03125
4
[]
no_license
// // import * as App from './app'; // // // import {UserAbstract} from './app/UserAbstract'; // // const mathius = new App.Admin('mathius123','123','admin'); // // mathius.getUsername(); // // Fitur-Fitur Arrow Function // // 1. Return secara otomatis // // 2. Shorthand Function // const coba = () => 'hello'; // co...
true
1d2d323ce7f43e8736723cd265ad257316ff0691
JavaScript
TylerBiggert/tamparoster
/src/App.js
UTF-8
818
2.578125
3
[]
no_license
import React, { Component } from 'react'; import CardList from './CardList'; import { players } from './Players'; import SearchBox from './SearchBox'; //app comonent with two states class App extends Component { constructor() { super(); this.state = { players: players, searchfield: '' } } onSearchCha...
true
445660fdd08902346404f2339653af56985a4524
JavaScript
yearofthewhopper/3d-workshop
/js/quaternion.js
UTF-8
8,678
2.515625
3
[]
no_license
var renderer, camera; var cameraDistance; var scene, element; var ambient, point; var aspectRatio, windowHalf; var mouse, time; var mouseX = 0; var mouseY = 0; var skyLight; var groundPlane; var obj; var objRotation, objQuaternion, rotationDelta = 0.03; var path, interpolation; function init() { element = docume...
true
6f101f58c3d8c2213f06a2465e407134fce7f02e
JavaScript
tuansaker1412/bookmanager
/app.js
UTF-8
4,355
2.578125
3
[]
no_license
const electron = require('electron') const path = require('path') const url = require('url') const mysql = require('mysql') // SET ENV process.env.NODE_ENV = 'development' // Add the credentials to access your database var connection = mysql.createConnection({ host: 'localhost', user: 'root', password: '', da...
true
ffb25d9de27b0be8eb9170753942b31618c75c4b
JavaScript
Erick95s/HCTest
/controllers/saveScheduleEmail.js
UTF-8
1,044
2.609375
3
[]
no_license
const { PersistData } = require('../drivers/driver'); const numberEmails = 4; async function shceduleEmails() { let persistData = new PersistData(); let userArrayPeristed = await persistData.read({ collectionName: "users", filters: { email_address: { $ne: "" }, consent: "Y" } }); const shcheduleEmails = [...
true
0a590c08eeb628f0d654e040d760ebb38ad8fb2c
JavaScript
yegorb21/3-Project
/public/js/index.js
UTF-8
440
2.75
3
[]
no_license
$(document).ready(function () { $("#info-btn").click(function(){ console.log("clicked") window.location.href = "/info"; }) $(".start-btn").click(function(){ console.log("clicked") var userInput = prompt("Please enter the game password to continue!") if (userInput == "123") { consol...
true
1d8a56a39836f9848fafe3d3b23ea79817e6ddae
JavaScript
sunita10/datastructures
/quicksort.js
UTF-8
973
3.28125
3
[]
no_license
/** * Created by Dunna on 4/1/2016. */ function quickSort(arr, sindex,eindex){ console.log('given array'+arr,sindex,eindex); var len = arr.length,partid,pivot; if(sindex<eindex){ pivot = eindex; partid = part(arr,pivot,sindex,eindex); console.log('part'+partid); quickSort(a...
true
20b16ec71ad955f666459a56cb8d5df08d7851af
JavaScript
d-easton/culina
/release/culina/src/components/pages/Calendar/constants.js
UTF-8
2,942
2.515625
3
[]
no_license
// data modes const CALENDAR = 0; const RECIPE = 1; // axios URLs const getCalendarURL = "https://cors-anywhere.herokuapp.com/http://35.193.28.175:8085/getGroceryList"; const getRecipeURL = "https://cors-anywhere.herokuapp.com/http://35.193.28.175:8085/getRecipeForUser"; const recipe1 = { "title": "4-Hour Chili"...
true
207ec22ba05e860622e6ac3c3be711c29693f60f
JavaScript
rogeruwayezu/Coding_challenges
/coding_challenge_two.js
UTF-8
930
3.53125
4
[]
no_license
/********************************* * CODING CHALLENGE 2 */ /* John and Mike both play basketball in different teams. in the latest 3 games, John's team scored 89, 120 and 103 points , while Mike's team scored 116, 94 and 123 points. 1. Calculate the average score for each team 2. Decide which teams wins in average...
true
13a1b4ec1b60f9f58c8de2b967bdc7ffcbadaaff
JavaScript
zendesk/samson
/app/assets/javascripts/underscore_mixins.js
UTF-8
765
3.1875
3
[ "Apache-2.0" ]
permissive
//Underscore mixins used across the javascript code _.mixin({ /* Utility function to check if the object is undefined or empty */ isUndefinedOrEmpty: function(object) { return _.isUndefined(object) || _.isEmpty(object); }, /* Utility function to check if the object is not undefined nor empty *...
true
88ad6fb56cef94a237980a1334f9c1c5b3f28409
JavaScript
thebopshoobop/assignment_data_structures_node
/spec/queueSpec.js
UTF-8
1,037
3.640625
4
[]
no_license
const Queue = require("../queue"); describe("The Queue class", () => { let queue; beforeEach(() => { queue = new Queue(); }); it("can enqueue and dequeue values", () => { queue.enqueue(44); queue.enqueue(false); queue.enqueue("potato"); expect(queue.dequeue()).toEqual(44); expect(queu...
true
a78607b3bb2b0884428fdebe176d779b5ba74c3e
JavaScript
chnbohwr/leetcode
/src/letter-combinations-of-a-phone-number.js
UTF-8
682
3.21875
3
[]
no_license
/** * @param {string} digits * @return {string[]} */ var letterCombinations = function (digits) { const mapper = { '2': ['a', 'b', 'c'], '3': ['d', 'e', 'f'], '4': ['g', 'h', 'i'], '5': ['j', 'k', 'l'], '6': ['m', 'n', 'o'], '7': ['p', 'q', 'r', 's'], '8': ['t', 'u', 'v'], '9': ['w'...
true
37ef0dc217dfba3eab020f77a3eeb421972bead2
JavaScript
chelm/Terraformer
/examples/counties/viewer.js
UTF-8
2,681
2.890625
3
[ "MIT" ]
permissive
/*globals counties*/ require([ "dojo/query", "terraformer/terraformer", "terraformer/arcgis", "terraformer/geostore", "terraformer/rtree", "terraformer/Store/Memory", "esri/map" ], function (query, Terraformer, ArcGIS, GeoStore, RTree, MemoryStore) { var map = new esri.Map("map", { basemap: "gray"...
true
b1303111193a770925ca38d7f07b9ebf3c790f7c
JavaScript
Apbh/finalproject
/scripts/seedDB-walls.js
UTF-8
1,544
2.609375
3
[]
no_license
const mongoose = require("mongoose"); const db = require("../models"); // This file empties the Books collection and inserts the books below mongoose.connect( process.env.MONGODB_URI || "mongodb://localhost:27017/WallofKindness" ); const wallSeed = [ { firstName: "Aboozar", middleName: "Aboo", lastNa...
true
c5f6cf61b9e57274f21d50f0fed9e356f5a08f3c
JavaScript
qiuwenwu/mm_maths
/math/array/sumproduct/index.js
UTF-8
239
3.171875
3
[]
no_license
/** * 求数组之和 * @param {Array} arr 数组 * @return {Number} 返回数值 */ module.exports = function sumproduct(arr) { var num = 1; var len = arr.length; for (var i = 0; i < len; i++) { num *= arr[i]; } return num; };
true
f3dea1a9bd08c95cd5cfc33b7fd7939b5d91c550
JavaScript
loverxp/LeetCode
/JavaScript/src/Solved/Minimum Difficulty of a Job Schedule.js
UTF-8
1,322
2.96875
3
[]
no_license
// https://leetcode-cn.com/problems/minimum-difficulty-of-a-job-schedule/ var Test = require('../Common/Test'); var { Matrix } = require('../Common/Matrix'); var minDifficulty = function (jobDifficulty, d) { const n = jobDifficulty.length; if (n < d) return -1; const difficulties = Array.from({ length: n }...
true
c8915036e3de78785de90c91e3d852d70a028364
JavaScript
JMRedford/matrix
/client/index.js
UTF-8
3,185
2.796875
3
[]
no_license
//swap these for local test - heroku deploy var webSock = new WebSocket('ws://mvp-mks18-redford.herokuapp.com'); //var webSock = new WebSocket('ws://127.0.0.1:3000') var NUM_COLS = Math.floor(window.innerWidth/16); var NUM_ROWS = Math.floor(window.innerHeight/22); var sockOpen = false; var columnArray = []; var pId =...
true
f569be9c77828828eb53ac43e3ed9bea6aadfc7f
JavaScript
Alhadis/MA-Mobile
/src/js/lib/gestures.js
UTF-8
3,072
2.890625
3
[ "MIT" ]
permissive
(function(){ "use strict"; var html = document.documentElement; var touchEnabled = "ontouchstart" in html; /** Event types */ var START = touchEnabled ? "touchstart" : "mousedown"; var MOVE = touchEnabled ? "touchmove" : "mousemove"; var END = touchEnabled ? "touchend" : "mouseup...
true
13d490f0fae977cf97e28d7d3dff7d6615b3824a
JavaScript
tnodland/sweater_weather_express
/routes/api/v1/forecast.js
UTF-8
1,341
2.59375
3
[]
no_license
var express = require("express"); var router = express.Router(); var User = require('../../../models').User; var fetch = require("node-fetch"); require('dotenv').config(); router.get("/", async (req, res, next) => { try { let user = await User.findOne({ where: {api_key: req.body.api_key}}) if(!user) { ...
true
2be759ee42499435d2526de15cd177c6a4e51974
JavaScript
amandayehh/portfolio-site
/src/pages/flag.js
UTF-8
3,388
2.515625
3
[ "MIT" ]
permissive
import React from "react"; import Header from "../components/header"; import Hero from "../components/project-detail/hero"; import Content from "../components/project-detail/content"; import Back from "../components/back-button"; import Connect from "../components/connect/connect"; import ImgHero from "../imgs/flag/he...
true
bc10d1996278ef66c7f2fa182620cee8bd7da267
JavaScript
bd86/greact
/app/EmailForm.js
UTF-8
1,437
2.796875
3
[]
no_license
import React from 'react'; class EmailForm extends React.Component { constructor(props) { super(props); this.state = { isGoing: true, numberOfGuest: 2, email: 'Email' }; // this.handleChange = this.handleChange.bind(this); this.handleSubmit = this.handleSubmit.bind(this); ...
true
0a65c3d55c5c10f33a4bc7164dcd6fcbab57170b
JavaScript
OzGhost/minorthesis
/src/engine/common/DeepController.js
UTF-8
585
2.796875
3
[]
no_license
class DeepController { depth = 10 getNextDeepLevel = () => { this.depth++ return this.depth } pushElement = element => { const target = this.findFloatingObject(element) if (target) target.style.zIndex = this.getNextDeepLevel() else console.log('cout << Target not found!') }...
true
c8b9541498deebbf7974168cfaa8b1973b6962ea
JavaScript
Jonathan2703/GestionInventarioBaseDatos2
/dashboard/js/cargarUbicacion.js
UTF-8
940
2.859375
3
[]
no_license
const boton = document.getElementById('ubicacion').onclick = arrancar var id=document.getElementById('id') function arrancar(){ console.log('entra a ver ubicacion id') fetch('https://heroku-demochris.herokuapp.com/api/producto/nombre/'+id.value) .then(res => res.json()) .then(data => { console....
true
4efe01f08cc6ac18df63827c4e7358c1f2f78aea
JavaScript
rreneau17/group_strength_backend
/public/javascripts/main.js
UTF-8
306
2.65625
3
[]
no_license
// run the login modal function loginMod() { $('#myModal').modal('show'); console.log('modal function ran'); } function main() { // run login modal if directed to the login route if (window.location.href === 'https://groupstrengthsf.com:3000/login') { loginMod(); } } main();
true