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
a4ca8352a786a8207930d6394cff471ec71001fb
JavaScript
carloseduardoe/ReactJS4Dummies
/src/components/tutorials/advanced/ReactHTTP/PostHTTP.js
UTF-8
1,499
2.984375
3
[]
no_license
import React, { Component } from 'react'; import axios from 'axios'; export default class Post extends Component { constructor(props) { super(props); this.state = {}; this.result = React.createRef(); this.url = "https://jsonplaceholder.typicode.com/posts"; } changeHandl...
true
6c0564619b0c3d9f3129249f4bddab78329bb482
JavaScript
starrajane/CMSC141_DivisibilityAutomata
/browser/DFA.js
UTF-8
5,754
2.515625
3
[]
no_license
var input; var divisor; var transitions = []; var paths = [] function main() { input = document.getElementById("input").value; divisor = document.getElementById("divisor").value; var dictionary = []; var list = []; // alert("Input: " + input + 2\nDivi10sor); // for (var i = 2; i < 10; i++) { ...
true
dc4e52929e42ac96ea08af31e3e31b4ae3cc57d8
JavaScript
reyhenry38/trainTime
/assets/javascript/app.js
UTF-8
3,123
3.234375
3
[ "MIT" ]
permissive
// Initialize Firebase var config = { apiKey: "AIzaSyBfEhonJjJLXHswoUbKYvGDBw8_H0rP_2g", authDomain: "my-train-schedule-app.firebaseapp.com", databaseURL: "https://my-train-schedule-app.firebaseio.com", storageBucket: "my-train-schedule-app.appspot.com", messagingSenderId: "119131371906" }; firebase...
true
47c2584302cc8bae76b1c26b1b7d3af57a415925
JavaScript
damianciancio/hoy-pago-yo
/static/js/add-order-items.js
UTF-8
1,209
2.640625
3
[ "CC0-1.0" ]
permissive
jQuery(document).ready(() => { new Vue({ el: '#products-list', delimiters: ['{$','$}'], data() { return { products: [], searchText: "", productsFiltered: [] } }, ...
true
da1a9d121d632d17c4e1bfb1fc77e8e1d32099ab
JavaScript
Eva195/ChallengeJS
/challengeJS.js
UTF-8
5,435
4.21875
4
[]
no_license
// Bienvenue à ce premier challenge. // Vous afficherez les resultats dans le terminal avec la commande: // 'node <nom du ficher>' // Pour que les resultats soient visible dans le terminal, vous utiliserez // la fonction 'console.log' // ex: console.log('simplon'); // ex: console.log(fonction()); // ex: console.log(nom...
true
8c099f6f6af5a7f6115cf7d10601af0d1a88aa8c
JavaScript
jalasem/fsopen-blog_server
/src/utils/list_helper.js
UTF-8
1,484
3.125
3
[ "Apache-2.0" ]
permissive
export const dummy = (blogs) => 1 export const totalLikes = (blogs) => { if (!blogs || !(Array.isArray(blogs)) || !blogs.length) return 0 return blogs.reduce((sum, blog) => sum + blog.likes, 0) } export const favoriteBlog = (blogs) => { const maxLikes = Math.max(...blogs.map(blog => blog.likes)) return blog...
true
0bb4d431f87054a1ccc61b0944ee8c069a765b85
JavaScript
gguelber/Star-Wars-Api-React
/src/App.js
UTF-8
2,109
3.96875
4
[]
no_license
//Imports to use React Hooks import React, { useState, useEffect } from 'react'; import './App.css'; // Main component, "functional component" export default function App() { //Initial states and their default values const [ isLoading, setIsLoading ] = useState(true); const [ number, setNumber ] = useState(Math....
true
e437996b2d122b76f0e716c77d14be7730033939
JavaScript
cbitstech/usability_timer
/js/views/usability_entries_index.js
UTF-8
2,930
2.515625
3
[]
no_license
UsabilityTimer.Views.UsabilityEntriesIndex = Backbone.View.extend({ template: function() { return _.template($("script#usability-entries").html()); }, initialize: function() { _.bindAll(this); this.collection.on('add', this.render); this.collection.on('remove', this.render); this.sortAttri...
true
4f9b25442705a1462cb825087e31ce04649bd974
JavaScript
abe33/typography-fixer
/src/rules/es-ES/index.js
UTF-8
2,698
2.515625
3
[ "MIT" ]
permissive
import {rule, group} from '../../typography-fixer'; import {currenciesRegExp} from '../../constants'; import punctuations from '../punctuations'; import fractions from '../fractions'; import symbols from '../symbols'; import units from '../units'; /** * The ruleset for spanish typography. * * This ruleset includes:...
true
755fec7e30520922202a87716a7aa603b948899a
JavaScript
ramafebri/futsalapp
/app/screens/detail-screen/time-function.js
UTF-8
1,907
2.828125
3
[ "MIT" ]
permissive
import moment from 'moment-timezone'; const convertTimeZone = (date) => { const format = 'YYYY-MM-DD'; return moment.tz(date, 'Asia/Jakarta').format(format); }; // Check if Tanggal Main is greater than equal today export const greaterFromToday = (tglMain) => { const today = moment(new Date()).format('Y...
true
26a84b5a7ba06e7957506382ad7e00087731726e
JavaScript
sdswoc/Fizzika
/Lib/CollisionInfo.js
UTF-8
965
3.234375
3
[]
no_license
// Defines a Class for representing Collision Information function CollisionInfo() { this.mDepth = 0; this.mNormal = new Vec2(0, 0); this.mStart = new Vec2(0, 0); this.mEnd = new Vec2(0, 0); } //Used to set the normal direction of collision CollisionInfo.prototype.setNormal = function (s) { this.mNormal = s;...
true
b286f23987c177a8846181303ff7c0e0aa31a080
JavaScript
ludekarts/comet
/src/tools/travrs.js
UTF-8
3,021
2.921875
3
[]
no_license
// travrs.js v 0.2.1 // // An utility to help create DOM structure/elements from 'templateString'. // by Wojciech Ludwin 2017, ludekarts@gmail.com // USAGE: // const div = createElement('div#divId.classOne.classTwo[title="My Title" data-hello="world"]', 'This is content'); // REFERENCES: // Using '@referen...
true
a8de28d792c70c6d08357d9fd8c39f7dc8bfc0be
JavaScript
john12458/homePage
/src/pages/pikaBall_old/ball_backup.js
UTF-8
1,591
2.65625
3
[]
no_license
import React from 'react'; import './pikaBall.css'; export default class Ball extends React.Component { constructor(props) { super(props); this.state = { y: 500, x: 100, speedx:-7, speedy:10, } this.limitValidate= thi...
true
be070b8f58c02e5d240cfe4e52271b5488936528
JavaScript
huangzhixin2019/Q_house
/js/documentCookie.js
UTF-8
1,749
2.625
3
[]
no_license
$(function(){ $.ajax({ type:'post', url:'php/hasLogin.php', success:function(data){ var user=data.unum; var isExit=getCookieVal('PHPSESID'); if(isExit!=10){ $('ul.register a span:contains("登录")').map(function(){ if($(th...
true
0c0c8a4ccc31c903f24d59c945519420168bd674
JavaScript
vatokato/react-03.03
/DmitryNikutev/src/components/Input/Input.jsx
UTF-8
1,338
2.5625
3
[ "MIT" ]
permissive
import React, {useRef, useEffect} from "react"; import {useInput, enterKeyToSubmit} from "../../utils/InputUtils"; import TextField from '@material-ui/core/TextField'; import Button from '@material-ui/core/Button'; import SendIcon from '@material-ui/icons/Send'; import "./Input.css"; export const Input = ({addMessa...
true
d5b49ce4eb67d79a9f33c0f316123e2e8393b884
JavaScript
szpakm/redux-store-templates
/src/.internals/helpers.js
UTF-8
1,570
2.734375
3
[ "MIT" ]
permissive
export const pick = (source = {}, what) => { if (typeof what === 'string') { return source[what]; } if (Array.isArray(what)) { return what.reduce((acc, curr) => { acc[curr] = source[curr]; return acc; }, {}); } // else return all return source; }; export const makeActionCreator =...
true
c76857874de33d6236a9619acac559b86f6d9c5d
JavaScript
Neev901/Virtual-Pet-3
/Virtual-Pet--3/sketch.js
UTF-8
5,474
2.765625
3
[]
no_license
//Create variables here var dog_sprite, dog, happyDog, DB, foodS; var foodObj; var foodStock; var h, r, c; var pet_name_input, pet_name_btn, instruct; var Name, dog_new_pos_x, dog_new_pos_y; var pet_name = ""; var gameState= ""; var gameState_reader; var bedroom_img, garden_img, washroom_img; var last_fed_text; var DB_...
true
1bdde4d743f28121f9947109a5b2d9b286c51e76
JavaScript
kishdeemu/AF-Final
/FRONTEND/src/components/Categories/AddCategory.jsx
UTF-8
3,043
3
3
[]
no_license
import React, { useEffect, useState } from "react"; import Select from "react-select"; //Importing service files from 'services' folder import CategoriesService from "../../services/CategoryService"; import RoomsService from "../../services/RoomService"; const AddCategory = () => { const [enteredName, setEnteredNam...
true
da8b63861f759c9c2191cc6ed23dd2eda7201c06
JavaScript
Denis-Medvedev/ignite-web-driver
/src/main/webapp/lib/index.js
UTF-8
1,103
2.53125
3
[]
no_license
$( document ).ready(function() { function process(result) { $('#progressBar').hide(); var temp = jQuery.parseJSON( result ); if (temp) { $("#resultCode").html(temp.code); $("#resultText").html(temp.text); $("#resultField").html(temp.total); } }...
true
a57b82a12e41410f02a7ae9580c93325f6542cc3
JavaScript
hkbarton/algorithm
/deprecated/LeetCode/KMPSubStringFinding.js
UTF-8
1,694
3.625
4
[]
no_license
// Implement strStr(). // Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack. // use KMP algorithm, http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm (function main(){ var sInput = ""; process.stdin.resume(); process.stdin.setEncodin...
true
f0eb742b4fa3594204d47dd1df123fda4c55a0bf
JavaScript
jonschacter/national-park-tracker-frontend
/src/actions/currentUser.js
UTF-8
2,808
2.59375
3
[ "MIT" ]
permissive
// actions import { getVisits } from './visits.js' // root string for API URL import API_ROOT from '../apiRoot.js' export const setCurrentUser = user => { return { type: "SET_CURRENT_USER", user } } export const clearCurrentUser = () => { return { type: "CLEAR_CURRENT_USER" } }...
true
1991a812f22f8e01ad429f4a3a62421d7a00bfb4
JavaScript
luciagirasoles/track-hours
/app/javascript/src/reducer/UserReducer.jsx
UTF-8
402
2.890625
3
[]
no_license
function init() { return { role: null, name: null }; } export default function reducer(state = init(), action) { switch (action.type) { case "setUser": return { ...state, role: action.payload.role, name: action.payload.name }; case "reset": return init(); defau...
true
72f888f4f7cdb3b7c71697f0a298f7d1f87a38a2
JavaScript
victorsplat/border-radius-generator
/js/slider.js
UTF-8
779
3.109375
3
[]
no_license
$('body').on('load', () =>{ $('p.range-value').html('0%') }) $('input[type=range]').on('input', function () { const RangeId = $(this).attr("sliderId") const actualRange =$(`p.range-value[rangeNumber=${RangeId}]`) actualRange.html($(this).val() + "%") const finalString = getSliderId() $('div.box').css("bord...
true
6d6bed4458624542c451b849f361c502e01a8d7e
JavaScript
stjordanis/compromise
/src/World/match-syntax/index.js
UTF-8
3,635
2.921875
3
[ "MIT" ]
permissive
const parseToken = require('./01-parseToken') const postProcess = require('./02-postProcess') const hasReg = /[^[a-z]]\//g const isArray = function (arr) { return Object.prototype.toString.call(arr) === '[object Array]' } // don't split up a regular expression const mergeRegexes = function (arr) { arr.forEach((s,...
true
74deef8d455849790ea768e7fb4d2fac575a4254
JavaScript
trose16/news-summary-app
/spec/articleListSpec.js
UTF-8
483
3
3
[]
no_license
(function testArticleListExists() { var articleList = new ArticleList(); console.log( "testArticleListExists returned: " + articleList.seeArticles() ); assert.isTrue( articleList.seeArticles() instanceof Array ); })(); (function testArticleListHasArticle() { var articleList = new ArticleList(); articleList....
true
8312dbb54089e546d4ee4de83f9e48c9f0747cdc
JavaScript
guidrop17/Gama-project-JS
/solucoes/exec13.js
UTF-8
2,255
3.5
4
[ "MIT" ]
permissive
//13. Ticket médio por departamento (similar ao item anterior, // porém retornando uma lista de objetos que contenha o nome do // departamento e o seu ticket médio). Este é um exercícios difícil, // porém é descomplicado de ser realizado tendo claro as demais // saídas até então. Verifique a possibilidade de reutil...
true
2d0577c54cca003f80e4599d6bc70ebdbbcae4a3
JavaScript
ginsuown/JS-projects
/js-practice/U6/hw5.js
UTF-8
228
4
4
[]
no_license
// Reverse words in a string function rWords(input) { return input .split(" ") .reverse() .join(" "); } // cannot do it in-place because strings are immutable let a = "hi my name is bob"; console.log(rWords(a));
true
d3f6a2568af37c0f9b9613fca348b6f2bdb1caf8
JavaScript
tvbarnette999/nc-ftc-inspection
/NC FTC Inspection/Resources/Resources/multi_select.js
UTF-8
3,653
3.109375
3
[]
no_license
function add(){ //TODO fix index number on add and remove var team = event.target.parentNode.id; event.target.parentNode.parentNode.removeChild(event.target.parentNode); var count = document.getElementById("in").childNodes.length - 1; var newTr = document.createElement("tr"); newTr.setAttribute("id", team); ...
true
8fda1801a678b005f5c1947d59c9927619e9ecc9
JavaScript
swc-project/swc
/crates/swc/tests/tsc-references/constEnum2.2.minified.js
UTF-8
534
3.03125
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
//// [constEnum2.ts] // An enum declaration that specifies a const modifier is a constant enum declaration. // In a constant enum declaration, all members must have constant values and // it is an error for a member declaration to specify an expression that isn't classified as a constant enum expression. // Error : not...
true
5ca1f0e84446c96d8769ed89d3fca5fdb683fbbf
JavaScript
boggzer/moredogs
/src/components/DogImage.js
UTF-8
2,401
2.75
3
[]
no_license
import React, { Component } from 'react'; import { View, ImageBackground, StyleSheet } from 'react-native'; import Colors from '../constants/colors'; /** * Component that renders (dog) images, both icons in home screen and play screen. */ class DogImage extends Component { constructor(props) { super(prop...
true
e16af8c9e0bcc7f892dcc95a8a65572a91c51959
JavaScript
Nathan-Grobler/Side_Projects
/Lexigon ordering/sketch.js
UTF-8
927
3.703125
4
[]
no_license
var vals = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; function setup(){ createCanvas(400,300); } function draw(){ background(0); console.log(vals); var largestI = -1; for(var i = 0; i< vals.length-1;i++){ if(vals[i] < vals[i+1]){ largestI = i } } if(larg...
true
531508b0b58d7bb7167e38f98a724a039dc65827
JavaScript
Torolfr/bbbs_frontend
/src/hooks/useCities.js
UTF-8
589
2.59375
3
[]
no_license
import { useEffect, useState } from 'react'; import getCities from '../api/cities'; import { DEFAULT_CITY } from '../config/constants'; const useCities = () => { const [cities, setCities] = useState(null); const [defaultCity, setDefaultCity] = useState({}); useEffect(() => { getCities() .then((citiesD...
true
061245d79665356656fc620af31e090ea70d7375
JavaScript
etcroot/LadyBug-Bot
/commands/Utility/math.js
UTF-8
1,094
2.703125
3
[ "MIT" ]
permissive
const { Command, util: { codeBlock } } = require("klasa"); const math = require("mathjs"); const mathEval = math.eval; math.import({ import: () => { throw new Error("Function import is disabled"); }, createUnit: () => { throw new Error("Function createUnit is disabled"); }, eval: () => { throw new Error("Functio...
true
5239ac1b9b4955131d59581670c318db6112d50c
JavaScript
Satevg/girls-beer-punkrock
/src/modules/home/components/SearchForm/index.jsx
UTF-8
1,351
2.546875
3
[]
no_license
import React, { Component } from 'react'; import PropTypes from 'prop-types'; export default class SearchForm extends Component { constructor(props) { super(props); this.timeout = 0; } handleChange = event => { event.preventDefault(); const searchText = event.target.value; ...
true
5da1c116a889687489e35cfec8f480074a865e7d
JavaScript
Mabeth3105/jamjobs
/js/startCommand.js
UTF-8
2,162
2.734375
3
[]
no_license
var voices; window.speechSynthesis.onvoiceschanged = function () { voices = window.speechSynthesis.getVoices(); console.log(voices); }; //Inicializamos utter. var utter = new SpeechSynthesisUtterance(); utter.rate = 1; utter.pitch = 0.8; utter.lang = 'es-AR'; ...
true
6a87ee045653f3e09432f96ac236e3a846a07d4e
JavaScript
desyarmariena/learning-phase0
/week3/w3-exercise9.js
UTF-8
782
4.3125
4
[]
no_license
/* Exercise 9 - Mencari Mean */ /* Diberikan sebuah function cariMean(arr) yang menerima sebuah array angka. Function akan me-return mean dari array atau deret angka tersebut. Mean adalah angka rata-rata dari deret bilangan tersebut. Contoh, mean atau rata-rata dari [1, 2, 3, 4, 5] adalah 3. Kita perlu kemudi...
true
854270855d69e9d1c3ec0ddd0d742ba64be25a5c
JavaScript
kingcwt/nodeStudy
/cookie/3 expressCookie.js
UTF-8
766
2.6875
3
[]
no_license
let express = require('express'), app = express(), cookieParser=require('cookie-parser'); app.listen(3000, () => console.log(`Server at 3000`)); app.use(cookieParser()); /* 多两个方法属性 */ app.get('/',(req,res)=>{ //req.cookies 指的是用户提交过来的的cookie对象 let isVisited=req.cookies.isVisisted; if...
true
3c35b1b4af35d661c977e280b9670dcdf0ad6632
JavaScript
chb921029cj/javascript
/moyu1023/js/register.js
UTF-8
952
2.71875
3
[]
no_license
(function(){ var account = document.getElementById("account"); var upwd = document.getElementById("upwd"); account.onbluer = function(){ ajax(type:"post",url:"data/routes/checkName.php",data:"account="+account.value.trim(),dataType:"text") .then(function(txt){if(txt=="true"){ console.log("账户名可以注册") }else{al...
true
43ffcb23609a6041649c95e85a4081c276c8381a
JavaScript
deepcr7/stc-mgmt-portal-backend
/src/api/handlers/userAuth.js
UTF-8
4,294
2.59375
3
[]
no_license
const User = require('../../models/user') const bcrypt = require('bcryptjs') const jwt = require('jsonwebtoken') var otpGenerator = require('otp-generator'); const nodemailer = require('nodemailer') //signup function async function signupFunction(req,res) { //firstly salt the hashing for the password //genSalt ...
true
929fd0e9d01b2032a03e1f8c469fb901957a11dc
JavaScript
diobando93/citoapp
/main.js
UTF-8
1,861
2.53125
3
[ "MIT" ]
permissive
const electron = require('electron') const Pool = require('pg').Pool const {app, BrowserWindow, ipcMain} = electron let win const pool = new Pool({ user: 'sammy', host: 'localhost', database: 'sammy', password: 'hola', port: 5432, }) app.on('ready', ()=>{ win = new BrowserWindow({ height : 10...
true
7334c22fc4ee1cc3b22476b359c9c15513817bd5
JavaScript
cyberspacedk/NodeJS
/authentification/csrf.js
UTF-8
2,770
2.84375
3
[]
no_license
const csrf = require('csurf'); const express = require('express'); const cookieParser = require('cookie-parser'); const cors = require('cors'); const app = express(); app.use(cors()); app.use(cookieParser()); const csrfProtection = csrf({cookie: true}); app.get("/transaction", csrfProtection, (req, res)=> { co...
true
a81a6bf36954fbc29225ed1b7532bbd246e72a49
JavaScript
dtytarenko/codeMuJS
/Loop/for.js
UTF-8
752
3.8125
4
[]
no_license
// for (let i = 0; i <= 100; i++){ // console.log(i); // } // for (let i = 11; i <= 33; i++){ // console.log(i); // } // for (let i = 0; i <= 100; i++){ // if (i % 2 !== 0){ // console.log(i); // } // } // for (let i = 0; i <= 100; i++){ // if (i % 2 !== 0){ // console.log(i); // ...
true
371df6f536392b8d9729879af9d4cc17fafa16c0
JavaScript
Pupperoni/FWaze_services
/users_ms/controllers/users/users_controller.js
UTF-8
9,638
2.515625
3
[]
no_license
const CONSTANTS = require("../../constants"); const bcrypt = require("bcryptjs"); const shortid = require("shortid"); // // Query responsibility // const controller = function(queryHandler, CommonCommandHandler) { const Handler = { // Get all user info getAllUsers(req, res, next) { queryHandler ...
true
03808300bf9c506bcc66a16402050e2cb3135bc8
JavaScript
zoopoetics/algorithms
/number/is-prime/index.js
UTF-8
282
3.15625
3
[]
no_license
export default (input) => { /* A prime number is a number greater than 1 that has no positive divisors other than 1 and itself. */ let divisor = 2; while (input > divisor) { if (input % divisor === 0) { return false; } divisor++; } return true; };
true
cee9df15ff18831bb822f68ad09dffd49834310a
JavaScript
karenw0870/late-night-chat
/_server/functions/filehandler.js
UTF-8
996
2.640625
3
[]
no_license
var fs = require('fs'); module.exports.getGroupsFromFile = function(callback) { // Get data from file fs.readFile('data/groupdata.json', 'utf-8', function(err, data) { if (err) throw err; var groups = JSON.parse(data); callback(groups); }); } module.exports.writeGroupsToFile = funct...
true
7fa181528e5de72a180431b3d7fe09048dae99fa
JavaScript
Kamihara/oaiso
/html/js/nakano.js
UTF-8
1,390
2.53125
3
[ "MIT" ]
permissive
// // nakano.js // var NAKANO = {}; NAKANO.TOP = {}; NAKANO.conditions = {}; NAKANO.conditions.isIE = navigator.userAgent.indexOf('MSIE') != -1; NAKANO.conditions.isMobile = false; NAKANO.conditions.isTablet = false; NAKANO.conditions.isIOS = false; var ua = window.navigator.userAgent.toLowerCase(); if (ua.indexOf('i...
true
364c84869f406abab03de27410b8d6503e6e5b99
JavaScript
metrorailings/MetroRailings
/validators/checkOrder/search.js
UTF-8
2,306
2.875
3
[]
no_license
/** * The validator model for an order search */ // ----------------- EXTERNAL MODULES -------------------------- var formValidator = global.OwlStakes.require('shared/formValidator'), validatorUtility = global.OwlStakes.require('validators/validatorUtility'); // ----------------- ENUM/CONSTANTS ------------------...
true
7dedc789c112876dcb02ead93047b38053aa7237
JavaScript
MjchaelTjen/Tranningreact
/src/DataBinding/DataBinDing.js
UTF-8
1,386
2.640625
3
[]
no_license
import React from 'react' export default function DataBinDing() { //Binding biến (đối tượng, các biến cơ bản) const title = "CyberSoft"; const imgSrc = "https://picsum.photos/200/200"; const sinhVien = { maSV: "SV01", tenSinhVien: "Vũ Văn Tiến", hinhAnh: "https://picsum.photos/2...
true
831aaa281da431b975d60321ba7254841313ee6a
JavaScript
WidesVs2/brick-breaker-demo
/js/index.js
UTF-8
733
3.140625
3
[]
no_license
import Game from "./Game.js" let GAME_WIDTH = 1200 let GAME_HEIGHT = 550 let canvas = document.getElementById("gameScreen") let ctx = canvas.getContext("2d") canvas.setAttribute("height", GAME_HEIGHT) canvas.setAttribute("width", GAME_WIDTH) ctx.clearRect(0, 0, GAME_WIDTH, GAME_HEIGHT) setInterval(() => { canvas...
true
766388a10ca8761d167d5e6ebbaca7de3822d1bf
JavaScript
Abascal-jorge/node-curso-js
/08-fundamentos sockets/server/sockets/sockets.js
UTF-8
861
2.5625
3
[]
no_license
const { io } = require("../server"); io.on("connection", (client) => { console.log("Cliente conectado"); //Detectar una desconecion de un usuario client.on("disconnect", () => { console.log("===========Usuario desconectado==============="); }); //Escuchar el mensaje dewl froent clien...
true
146b17418aa5b35f4ea3108eddd70023644822e6
JavaScript
smajaas/Restcountries
/printforeach.js
UTF-8
578
2.875
3
[]
no_license
const getRegion = () => { const xhr = new XMLHttpRequest(); xhr.open("GET", "https://restcountries.com/v3.1/all",true); xhr.responseType= "json"; // xhr.send(); xhr.onload=()=> { const country = xhr.response; country.forEach(data => { ...
true
dfb4adf6df365e50eb9ab57f109fea776ef311ee
JavaScript
Tansuture/social-net
/src/state/usersReducer.js
UTF-8
4,121
2.5625
3
[]
no_license
import { usersAPI } from "../api/api" const FOLLOW = "FOLLOW" const UNFOLLOW = "UNFOLLOW" const SET_USERS = "SET_USERS" const SET_TOTAL_COUNT="SET_TOTAL_COUNT" const SET_CURRENT_PAGE = "SET_CURRENT_PAGE" const SET_LOADING = "SET_LOADING" const TOGGLE_BTN = "TOGGLE_BTN" const initialState = { users: [], posts...
true
6f871b9900b5f78e6de45e2dc8182aef9eaf1cda
JavaScript
brightleydeveloped/acronym
/src/acronym.js
UTF-8
2,210
3.734375
4
[ "MIT" ]
permissive
import words from 'more-words' import capitalize from 'lodash.capitalize' import lowercase from 'lodash.lowercase' import defaults from 'lodash.defaults' // Dictionary of words // This is indexed by first letter. // dictionary.a = [ 'apricots', 'always', ...] const dictionary = {} // Helper Functions const isString...
true
683f9e2988657643feef3ba8a97bbaf643bd0fb1
JavaScript
fakkelf/snakeopdracht
/Dev3/snake/js/draw.js
UTF-8
2,078
3.53125
4
[]
no_license
/*************************************************************************** ** functies voor het tekenen van de elementen van het canvas ** ***************************************************************************/ var draw = (function() { var drawElement = function(element, canvas) { ...
true
85cd8cf7a6f28bfa8c2553b75f0bbc385eec1fb0
JavaScript
bkaczmarczik28/javascript-challenge
/UFO_Level_1/static/js/app.js
UTF-8
1,234
3.4375
3
[]
no_license
// from data.js var tableData = data; // Select the button var button = d3.select("#filter-btn"); button.on("click", function() { //Delete any table in the body portion on the webpage to clear previous results var tablebody = d3.select("tbody"); tablebody.html(""); // Select the input element and ...
true
f42e2e15390477adc84fb2ed4cda0c535be3d526
JavaScript
szsed/firka-frontend
/src/redux/actions/current-game-actions.js
UTF-8
2,115
2.640625
3
[]
no_license
import { sendImageToFirestore, sendGuessToFirestore, sendScoreToFirestore, startGameInFirestore } from "../../services/firebase/firebase-services" import store from "../store"; import { NEXT_ROUND, SEND_DRAWING, STOP_GAME, GAME_STATUS_CHANGE, SEND_GUESS, SEND_CHOICE } from "./types"; import { gameStatus } from "../../c...
true
3fd73ae4bd6ed23e4aa0671b8d5b391ab8cd4771
JavaScript
Macro80-20/js-deli-counter-js-apply-000
/index.js
UTF-8
2,194
4.46875
4
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
//Add elements to an array //Return items from an array //Iterate through an array //Pass an array as a function parameter function takeANumber(arr,name){ // I will push the name into the array .and then figure out the index , which could be var queuePosition ; arr.push(name) // insert out name into the queue /* I...
true
6746e373cb6d185379a1f93e711805f837d1766f
JavaScript
lpontegc/web-platform-zqn4wb
/script.js
UTF-8
3,544
2.859375
3
[]
no_license
/* Funcionalidad de las pestañas*/ function openTab(evt, tab) { // Declare all variables var i, tabscontent, tabs; // Get all elements with class="tabscontent" and hide them tabscontent = document.getElementsByClassName("tabscontent"); for (i = 0; i < tabscontent.length; i++) { tabscontent[i].s...
true
c0819064e3141ba655748b9edb50e49b2d2e72a1
JavaScript
rft2014/buelow_web
/lernstand/schueler/rbcheck.js
UTF-8
517
2.734375
3
[]
no_license
function rbcheck(spalte,zeile,fachanzahl) { /*Test der Radiobutton ob Fragen beantwortet sind der Schuelereingabe*/ var checked_number = 0; for(var j=0;j<spalte;j++){ var geklickt = document.getElementsByName(zeile+"Frage"+j); for (var i = 0; i<4;i++){ if(geklickt[i].checked == true) { che...
true
583774e9d91b50c326ed65c153ac6fc6075a7bdb
JavaScript
JohnAustinDev/xulsword
/src/__tests__/location.js
UTF-8
2,923
2.5625
3
[]
no_license
/* eslint-disable no-continue */ import LibSword from '../main/components/libsword'; import C from '../constant'; const Location = { modname: null, modvsys: null, book: null, chapter: null, verse: null, lastverse: null, convertLocation(vsys1, xsref, vsys2) { if (!vsys1 || !xsref || !vsys2) return nu...
true
29de83a0d09793e65bdad792d91fe9a17a0449e8
JavaScript
CIS-Projects-in-CS-S21/pro-creature-habits
/src/redux/coinBalance.js
UTF-8
287
2.625
3
[]
no_license
export const BUY = 'BUY'; export const REWARD = 'REWARD'; const balanceReducer = (state = 100, action) => { switch (action.type) { case BUY: return state - action.data; case REWARD: return state + action.data; default: return state; } } export default balanceReducer;
true
dbc6c1d40e33ab1d66dedb1595c602c4661716ee
JavaScript
adnan832/hyf-homework
/javascript/javascript3/week1/weather/index.js
UTF-8
3,572
3.6875
4
[]
no_license
const iconElement = document.querySelector(".weather-icon"); const tempElement = document.querySelector(".temperature-value p"); const descElement = document.querySelector(".temperature-description p"); const locationElement = document.querySelector(".location p"); const notificationElement = document.querySelector(".n...
true
cf9b810947cdefb3e41791ea895ded4e06c0b6b8
JavaScript
nigelgomesot/dsap
/data_structures/techiedelight/src/14_chess_knight_shortest_path.test.js
UTF-8
1,824
3.703125
4
[]
no_license
// REF: https://www.techiedelight.com/chess-knight-problem-find-shortest-path-source-destination/ import Queue from './queue.js'; const MAX_ROWS = 8; const KNGHT_VALID_MOVES_X = [2, 2, -2, -2, 1, 1, -1, -1]; const KNGHT_VALID_MOVES_Y = [-1, 1, 1, -1, 2, -2, 2, -2]; class Node { constructor(x, y, dist = 0) { th...
true
ca3464dd6bec8552ffac136d5e9c67bce299752d
JavaScript
BogdanSinitsa/NodeJSAsyncPart2
/00_generator.js
UTF-8
386
3.765625
4
[]
no_license
function* doSth() { yield "Hello world"; yield "Hello world 2"; return 'Finally done'; } let it = doSth(); let result = it.next(); console.log(result); //{ value: 'Hello world', done: false } let result2 = it.next(); console.log(result2); //{ value: 'Hello world 2', done: false } let result3 = it.next...
true
f098bcf1291eea59044eb047365ff0f3488ae163
JavaScript
SanjayLavingia/Travelist
/client/reducers/formReducer.js
UTF-8
2,174
2.71875
3
[]
no_license
import axios from 'axios'; import * as types from '../constants/actionTypes'; const initialState = { signUp: { firstName: '', email: '', username: '', password: '', confirmedPassword: '', }, login: { username: '', password: '', validated: false, loginAttempts: 0, }, }; cons...
true
2fffef508b4b662fc9d1b8a013b8d67963f6ef6f
JavaScript
UnknownMonk/codewarsKatas
/howGoodAreYoureally.js
UTF-8
417
3.515625
4
[]
no_license
function betterThanAverage(classPoints, yourPoints) { // Your code here let sum = 0; classPoints.push(yourPoints); console.log(classPoints); for (let i = 0; i < classPoints.length; i++) { const element = classPoints[i]; sum += element; } sum = sum / classPoints.length; return yourP...
true
a95541222f939a87132b4f651a133661850294d4
JavaScript
lucascalsilva/camunda-webapp-custom
/camunda-bpm-webapp/ui/cockpit/client/scripts/filters/duration.js
UTF-8
1,181
3.109375
3
[ "Apache-2.0" ]
permissive
/** Defines a filter to convert given milliseconds into human readable time lapse. @name duration @memberof cam.cockpit.filter @type angular.filter @author Roman Smirnov <roman.smirnov@camunda.com> */ 'use strict'; var Filter = function() { return function(duration) { if (!duration) { ...
true
b614f608392b741e55f9a53d00f436c0100626de
JavaScript
andreeahanson/animal-rescue
/src/apiCalls.js
UTF-8
1,270
2.875
3
[]
no_license
export const fetchAnimals = async () => { const url = 'http://localhost:3001/api/v1/rescue-animals'; try { const response = await fetch(url) if(!response.ok){ throw new Error('There was an error fetching the animals.') } const animals = await response.json(); return animals; } catch (err...
true
840915029e94c5372321026fff32f2cfe1ce6b00
JavaScript
brianchz/bookliker-practice-challenge
/js/index.js
UTF-8
3,884
2.921875
3
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
document.addEventListener("DOMContentLoaded", function() { getBooks() }); const getBooks = () => { fetch('http://localhost:3000/books') .then(res => res.json()) .then(books => { books.forEach(book => { renderBookTitle(book) }); }) } const getUsers = () => { fetch('http:...
true
6b76abc37cba1178d5ce700c32f6f56af09eccbe
JavaScript
Aathii-123/project5
/java/cal.js
UTF-8
231
3.125
3
[]
no_license
function calculate(num1,num2,oprtr){ if(oprtr=="+"){ console.log("num1+num2") } else if(oprtr=="-"){ console.log("num1-num2") } return result } let data=calculate(10,9,"+") console.log(data) console.log(calculate(10,9,"-"))
true
f9bd8ebe35b63a84ea741f5f3029f2126d6c11c8
JavaScript
1nspect0r/diploma
/src/scripts/testing.js
UTF-8
110
2.625
3
[]
no_license
// FOR TESTING PURPOSES: btnTest.addEventListener(`click`, btnTestFunction); function btnTestFunction() { }
true
41249aeae9aaf7020441be1d579c6d124b2f22e4
JavaScript
mlarrubia/lab-react-ironcontacts
/starter-code/src/App.js
UTF-8
3,439
2.765625
3
[]
no_license
import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; import contactsJSON from './contacts.json' import IronContact from './components/contact/IronContact.js'; class App extends Component { constructor(props) { super(props) this.state = { activeContacts: [], ...
true
e37a9fce8422621d66af44a529fac618097c7912
JavaScript
protolabo/zenkai
/src/dom/dom-stat.js
UTF-8
351
2.71875
3
[ "MIT" ]
permissive
/** * Gets the window's width * @memberof DOM */ export const windowWidth = () => window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; /** * Gets the window's height * @memberof DOM */ export const windowHeight = () => window.innerHeight || document.documentElement.clientHeight...
true
e8dbce64ef72432575d3c669860a61b945abad47
JavaScript
spdlnavvnavpthap/simpleCalculator
/script.js
UTF-8
5,198
3.46875
3
[]
no_license
let displayString = ""; let value = 0; const displayValue = document.querySelector("#display"); let answerOut = false; let decimalAvail = true; let backSpaceAvail = false; displayValue.innerHTML = displayString; let displayFontSize; let operatorAvail = true; document.querySelectorAll(".buttons").forEach (function(butt...
true
58db5f2a5fb67c276b7f4ee603eef62035473dd4
JavaScript
L-Luciano/Formation-React
/Formation-React/src/reducers/rentingReducer.js
UTF-8
651
2.59375
3
[]
no_license
import {ADD_RENTING, DELETE_RENTING, LOAD_RENTING} from "../actions/rentingActions"; const rentingReducer = (previousState = [], action) => { switch (action.type) { case ADD_RENTING: const renting = action.payload.renting; return [...previousState, Object.assign({}, renting)]; case DELETE_RENTING...
true
952fa2138e71ee0dd48f1ded31a7578dd43a2b80
JavaScript
rao-karthik/masai-local
/Unit-4/Week-19-20/05-13 node modules/optionsMenu/MenuOptions/index.js
UTF-8
3,014
3.0625
3
[]
no_license
const EventEmitter = require('events'); const eventEmitter = new EventEmitter(); const readline = require("readline"); const books = require('./booksList') const inpOut = readline.createInterface({ input: process.stdin, output: process.stdout }) eventEmitter.on("bookList", books.bookList); eventEmitter.on(...
true
554f1df0d3af4860e008d5685544f02d5f3623c9
JavaScript
prezi/debate
/test/ws-test.js
UTF-8
2,335
3.1875
3
[]
no_license
var WebSocket = require('ws'); var numJob = process.argv[3]; // simple login var simpleLoginTest = function(ws, numJob) { message(ws, null, "LOGIN test" + numJob + " pass" + numJob, null); message(ws, "test" + numJob, "MSG hello there", "Lobby"); message(ws, "test" + numJob, "LOGOUT", "Lobby"); } // l...
true
eecc2fea12b86aa2d20fbfa67cef7793d0880d96
JavaScript
dangscha/Interface_Design
/AR/mercury.js
UTF-8
2,975
2.796875
3
[]
no_license
let container; let camera; let controls; let renderer; let scene; function init() { container = document.querySelector('#scene-container'); scene = new THREE.Scene(); createCamera(); createControls(); createLights(); loadModels(); createRenderer(); renderer.setAnimationLoop(() => ...
true
4d9d01d75334067dfdd729acdb7e543f6b651800
JavaScript
akhayoon/book-worm-react-native
/redux/reducers/booksReducer.js
UTF-8
2,546
2.84375
3
[]
no_license
const initialState = { books: [], booksReading: [], booksRead: [], isLoadingBooks: true, image: null }; const books = (state = initialState, action) => { switch (action.type) { case 'LOAD_BOOKS_FROM_SERVER': return { ...state, books: action.payload, booksReading: action.pa...
true
c1d38ae51367aee49b7c1d839ced1d7590235cf7
JavaScript
ludimila/TCC-flask
/static/js/dashboard.js
UTF-8
717
3.03125
3
[ "MIT" ]
permissive
function sort_dict(cores_dashboard) { // Create items array var items = Object.keys(cores_dashboard).map(function(key) { return [key, cores_dashboard[key]]; }); // Sort the array based on the second element items.sort(function(first, second) { return second[1] - first[1]; }); // Create a new array with ...
true
d262a6def62c6c42831faa5c14f191ca25967f9a
JavaScript
seung-seok/LiveChat
/static/js/index.js
UTF-8
948
3.5
4
[]
no_license
var socket = io() // 접속 되었을 때 실행 socket.on('connect', function () { var name = prompt('반갑습니다!', '') // 이름이 빈칸인 경우 if (!name) { name = '익명' } // 서버에 새로운 유저가 왔다고 알림 socket.emit('newUser', name) }) socket.on('update', function (data) { console.log(`${data.name}: ${data.message}`) c...
true
d6383e83687b8adeba420d7a61bad185126db26c
JavaScript
srijanshetty/code-snippets
/.sheets/node-gist-clone-all.js
UTF-8
1,699
2.734375
3
[ "MIT" ]
permissive
#!/usr/local/bin/env node var fs = require('fs'), https = require('https'), exec = require('child_process').exec; // Get the username var user = process.argv[2]; if (!user) { console.log('ERROR: Enter username'); } function fetch(page, callback) { https.get({ host: 'api.github.com', path: '/use...
true
9af9eae3b1311c01b52a31e562dcf79861269401
JavaScript
NerRox/exercises
/Codewars/factorial.js
UTF-8
137
3.265625
3
[]
no_license
function fact(n) { if (n <= 0) { return 1 } let acc = n while (n > 1) { acc = acc * (n - 1) n-- } return acc }
true
e1e2e402455f4cdde58e00b7a3e6840a3381df87
JavaScript
cmurphy227WM/pokedex
/types.js
UTF-8
5,638
3.625
4
[]
no_license
//Capitalization const capitalize = (s) => { if (typeof s !== 'string') return '' return s.charAt(0).toUpperCase() + s.slice(1) } ////////////////Use Dom to select get and post button///////////// const getBtn = document.getElementById('get-btn'); ///////create callback function thats used when button clic...
true
363e9af1e87c0c5311d8afaac8cb09400bd87b6d
JavaScript
ilyaus/learning-d3
/sec_06/index.js
UTF-8
454
2.5625
3
[]
no_license
const update = (data) => { // 1. update scales if they rely on data y.domain([0, d3.max(data, d => d.orders)]); // 2. join updated data to elements const rect = graph.selectAll('rect').data(data); // 3. remove unwanted (if any) shapes using the exit select rects.exit().remove(); // 4. update current ...
true
04a4e71b12a2fa70a449e23a2eccff139c567a91
JavaScript
danielschwartz/3DStacks
/resources/js/nodeClient.js
UTF-8
2,466
2.625
3
[]
no_license
HB.nodeClient = (function() { var socket; function handleMessage(data){ // evil eval msg = eval('(' + data + ')'); //console.log(msg); switch (msg.type) { case 'new': //console.log("New Player Hass Arrived With SessionID: " + msg.session); $("body").prepend('<d...
true
32eac02eedab50da7ad23810243334da0c7369b7
JavaScript
danielsvane/notebook
/client/functions.js
UTF-8
601
2.578125
3
[]
no_license
callSage = function(formula, latexDiv){ if(latexDiv == undefined) latexDiv = document.getElementById("katex"); $.post('http://aleph.sagemath.org/service?accepted_tos=true', {code: formula}, function(data) { console.log("Calculation result: ", data.stdout); katex.render(data.stdout, latexDiv); ...
true
721e00e086eb7c0856e193a84d65d873588fc19e
JavaScript
SCBook/SCBook
/public/javascripts/scrapView/lobby/Scene.js
UTF-8
4,854
2.53125
3
[]
no_license
/** * Created by redball on 15. 5. 6. */ SCRAP.LOBBY.Scene = function() { var SceneManager = new Object(); SceneManager.CSSScene; SceneManager.CSSRenderer; SceneManager._scroll = 0; SceneManager._curTime = getCurTime(); SceneManager._freezeFlag = false; SceneManager._freeze = function(...
true
a506f5e3c15555f0f8166e0a8a6103cd7f75d761
JavaScript
MLateralus/RandomStuff
/Euler_of_arctan.js
UTF-8
367
3.515625
4
[]
no_license
/* Michał Czerwień * 22/03/2017 * * Euler method for * x(t) = arctan(t + C) */ var approxEuler = [0]; var actual = [0]; var step = 0.2; var endPoint = 40; for (var i = 0; i < endPoint; i++) { var xnApprox = approxEuler[i] + Math.pow(Math.cos(approxEuler[i]), 2) * step; var xnActual = Math.atan(step * i) ...
true
151606cd2a9eb03402ba9783a73a510c781f4197
JavaScript
amiller2978/UdacityTravelApp
/src/client/js/tripApp.js
UTF-8
9,370
2.671875
3
[]
no_license
/* Global Variables */ const addTripDataURL = 'http://localhost:3000/addTripData' const getPixabayURL = 'http://localhost:3000/pixabay' const projDataURL = '/all' mapboxgl.accessToken = `pk.eyJ1IjoiYW1pbGxlcm1hcGJveCIsImEiOiJjazV5bGVka2owMm5zM2dvNGUzM3Z4eGU3In0.fTOD3XRE5dAnUz5Uqx4npQ` const darkSkyForcastURL = 'http:/...
true
fe7fb651b4af7882adc4de4be2e87c3acbbea615
JavaScript
amardeeppatil/Edusmart
/SourceCode/SourceCode/EduSmartWebsite/EduSmartWebsite/Web/js/edu.js
UTF-8
3,050
2.640625
3
[ "MIT" ]
permissive
var reg = /^[a-zA-Z]+$/; var emailreg = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; var regex_malasia = /\+60[-]\d{2,4}[-]?\d{6,9}\b/; var mobile_pattern = /^\d{10}$/; var password_full_pattern = /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[&%...
true
a7eebe8cf8e3e3286ee0897424aab973f724ffe4
JavaScript
Fjord82/test-project-fun
/src/messaging/mqttHandler.js
UTF-8
3,636
2.6875
3
[ "MIT" ]
permissive
let mqtt = require('mqtt'); SensorData = require('../models/sensorDataModel'); // ----- Socket IO Setup ----- let dictSingleData = {}; const io = require('socket.io')(3002); io.on('connection', socketSendDefault); io.on('newListener', socketSendDefault); function socketSendDefault(socket) { console.log('A client ...
true
65e3df0797e8050813e9202812978aa78a0eacbf
JavaScript
srejitk/neogcamp-mark-twelve-triangle-app
/src/tri-angle/tri-angle.js
UTF-8
858
3.578125
4
[]
no_license
import "./tri-angle.css"; const angle_one = document.querySelector("#angle-1"); const angle_two = document.querySelector("#angle-2"); const angle_three = document.querySelector("#angle-3"); const chkBtn = document.querySelector("#chk"); const output = document.querySelector("#output-id"); chkBtn.addEventListe...
true
45ddbef87590bb8180087425d7e18b618789a649
JavaScript
j0h4x0r/woho
/js/search.js
UTF-8
450
2.5625
3
[]
no_license
function handleStateChangeAddFriend() { if (xmlHttp.readyState == 4) if (xmlHttp.status == 200) { if (xmlHttp.responseText == 'success') { alert('添加成功!'); } else { alert('添加失败!不能添加自己或已经是好友'); } } } function addFriend(tag) { var id = tag.parentNode.parentNode.id; var paras = 'mail=' + id; start...
true
1d5a17fe86c15d13feb5d527bd40f5d02afb7b3f
JavaScript
spo587/Recorderjs
/scripts/composition_functions.js
UTF-8
10,315
3.359375
3
[ "MIT" ]
permissive
// //the next three functions are some very basic composing algorithms based on scale degrees. // // nothing exciting here //let's take a top-down approach function makeHarmonyLevel4(level3Line){ //grab the melody 2-dimensional array var melody = line.melody; } function makeLineRhythmsFirst(beatsPer...
true
c773df7868d0d2568daeabf9b4464bcfbdd8b740
JavaScript
4cadia-foundation/holon-validator-webapp
/src/components/DataCategory/DataCategory.js
UTF-8
1,180
2.671875
3
[]
no_license
import React, { Component } from 'react'; import './DataCategory.css'; class DataCategory extends Component { constructor(props) { super(props); this.setCategory = this.setCategory.bind(this); this.state = { values: [ { key: "0", value: 0, text: 'For Free' ...
true
d7d7844c01156c0e53a27f75a9dbfa20cf6dd773
JavaScript
claudiaanjos/cubos-academy
/back-end/aula02/classe-01/index.js
UTF-8
770
3.671875
4
[]
no_license
const jogada1 = "pedra" const jogada2 = "tesoura" //seu código aqui if (jogada1 === "pedra"){ if (jogada2 === "tesoura"){ console.log("pedra") } else if (jogada2 === "pedra"){ console.log("empate") } else if (jogada2 === "papel"){ console.log("papel") } } else if (jogada1 === "t...
true
8d60e9da8466b05d102765b10bdc33ce6a8482c9
JavaScript
runnerty/runnerty
/lib/depends-process.js
UTF-8
12,258
2.8125
3
[ "MIT" ]
permissive
'use strict'; const recursiveObjectInterpreter = require('./utils.js').recursiveObjectInterpreter; const standardizeDependsProcesses = require('./utils.js').standardizeDependsProcesses; /** * Check if key is equal to value. * @param key * @param value * @returns {boolean} * @private */ function _eq(key, value) ...
true
1c9ea12421d1860f1fcf1de9c6cbeafbca751477
JavaScript
azizulhasan/AlgoDS.js
/vowels/index.js
UTF-8
527
3.546875
4
[]
no_license
const vowels1 = require('./vowels1'), vowels2 = require('./vowels2'); // Strings const str1 = 'Hello There!'; const str2 = 'How are you?'; const str3 = 'My name is Akkas'; // vowels1 console.log(`'${str1} has ${vowels1(str1)} vowels'`); console.log(`'${str2} has ${vowels1(str2)} vowels'`); console.log(`'${str3}...
true
2cb27b448e5817da007cee33725c624f08e9cd7b
JavaScript
zavadsckij/social-network
/src/components/Profile/ProfileInfo/Status.jsx
UTF-8
1,202
2.609375
3
[]
no_license
import React from "react"; class Status extends React.Component { state = { updateMode: false, status: this.props.status }; componentDidUpdate(prevProps, prevState) { if (prevProps.status !== this.props.status) { this.setState({ status: this.props.status }); } } activeUp...
true