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
b2227773662d7dcd80fc4261641f6e05e8b34e11
JavaScript
data-doge/condenser-cli
/index.js
UTF-8
725
2.578125
3
[]
no_license
#!/usr/bin/env node var GoogleSpreadsheet = require('google-spreadsheet') var creds = require('./.credentials.json') var doc = new GoogleSpreadsheet(creds.spreadsheet_key) var type = process.argv[2] var text = process.argv[3] switch (type) { case '+': type = 'positive'; break case '-': type = 'negative';...
true
819ac7d0eb1971cbd1b0062ed9ae92b8b4577d7d
JavaScript
develovers/eCoacher_server
/handler/apphandler.js
UTF-8
1,602
2.515625
3
[]
no_license
var express = require('express'); // call express var bodyParser = require('body-parser'); module.exports = { APPHandler : function (pRouterPrefix, pRouterHandler, pPort) { var app = express(); // define our app using express var that = this; var router = pRout...
true
2afa39e8e06af082608a11fc21c21d00f3b539d1
JavaScript
wiktoriasalamon/Study-Buddy
/studybuddy-front/src/helpers/gradesAvg.js
UTF-8
202
2.828125
3
[]
no_license
export const getGradesAvg = (grades) => { if (!grades.length) return '0.0'; const sum = grades.reduce((grade, acc) => { return acc += grade; }, 0); return (sum/grades.length).toFixed(1); };
true
83246f02405a658e1473b07c5d7413a33e441b50
JavaScript
hpi-swa-lab/BP2019RH1
/components/bp2019-legend-widget.js
UTF-8
2,587
2.75
3
[ "MIT" ]
permissive
import Morph from 'src/components/widgets/lively-morph.js' import { ColorAction } from '../src/internal/individuals-as-points/common/actions.js' export default class LegendWidget extends Morph { async initialize() { this.legendElementsContainer = this.get('#legend-elements-container') } // ----------...
true
bd20de30fd2f7e8c319ce009baf23f58b2aec443
JavaScript
WallaceCS21/checkpoint1Front
/js/script.js
UTF-8
2,452
4
4
[]
no_license
let idade = document.getElementsByName('maior'); let btn = document.querySelector('#btn'); btn.addEventListener('click', cadastrar); function cadastrar(event) { event.preventDefault(); let condTxt = 'Leu e aceitou'; // trata radio de maioridade let idd; for (let maior of idade) { if (maior.checked) { ...
true
dcf192afd81c67ae20ec3534e3e4232e31fedd54
JavaScript
Saberwode/todomvc
/service/service.js
UTF-8
2,009
2.890625
3
[]
no_license
const connection = require('./database'); class UserService{ // 接收数据 async addList(list){ // console.log(list); const {id,value,clickStatus} = list; // console.log(id,value,clickStatus); const statement = ` INSERT INTO list (id,value,clickStatus) VALUES (?,?,?); ` const result = await ...
true
5360858b7e55c5af8a72df258616e0a41e4deb67
JavaScript
KantaPaul/react-practise-2
/src/playground/es6-1.js
UTF-8
2,153
3.609375
4
[ "MIT" ]
permissive
let appTemplate = ( <div> hi i am es6 </div> ); class Person { constructor(name = 'Unknown Person') { // console.log('test'); // this.name = name || 'Other Person'; this.name = name; } getContent() { // return 'Hi I am ' + this.name + '!'; return `Hi I ...
true
ab937020c833ea84c4cd3f64d8730cbe89f8278a
JavaScript
PandaContainer/VueStudy
/VueInAction/WebContent/components/number-input/input-number.js
UTF-8
1,902
3.1875
3
[]
no_license
/** * 数字输入框组件js */ function isValueNumber(value) { return (/(^-?[0-9]+\.{1}\d+$)|(^-?[1-9][0-9]*$)|(^-?0{1}$)/).test(value + ''); } Vue.component('input-number', { props: { max: { type: Number, default: Infinity }, min: { type: Number, default: -Infinity }, step: { type: Number, default...
true
c109aca35e16fe0405100634e618a5b237af988e
JavaScript
UMN-LATIS/elevator
/assets/js/scrollAssets.js
UTF-8
676
2.515625
3
[]
no_license
$(document).ready(function() { $(window).scroll(function(){ if ($(document).height() - 50 <= $(window).scrollTop() + $(window).height()) { if(!loading) { loadResults(offset + 100); } } }); }); var loading = false; function loadResults(offsetValue) { offset = offsetValue; loadin...
true
fb4d813c0f779da0105d68c3c330b4f0d65b2685
JavaScript
Tyhjis/SimpleChat
/client-src/js/socket-service.js
UTF-8
1,456
2.96875
3
[]
no_license
var socket = io(); /** * Returns the public interface for the socket service. */ function socketService() { return { sendMessage: sendMessage, onReceive: onReceive, joinChannel: joinChannel, leaveChannel: leaveChannel, onChannelJoin: onChannelJoin, onChannelLeave: onChannelLeave, onRegiste...
true
47928799f46d5cf94ec04fd447d1aae05e57d59e
JavaScript
Kekuatan/backend-pre-interview
/index.js
UTF-8
971
3.46875
3
[]
no_license
// Define variable const { getData } = require("./js/GetData"); const { sum } = require("./js/Calculation"); const { printBoard, solve } = require("./js/Sudoku"); let summary = {}; try { let filterData = getData(); for (const property in filterData) { console.log(""); console.log(`-------- ${property} ----...
true
c874acd665b778945d608858f80ef1c278f7ddb2
JavaScript
ChristiaanScheermeijer/configurator.js
/src/core/core.js
UTF-8
625
2.625
3
[ "MIT" ]
permissive
/** * Main configurator function * * @param [tree] * @returns {ObjectNode} */ function configurator(tree) { if (tree && Object.prototype.toString.call(tree) === '[object Array]') { return new ObjectNode('root', tree, null); } return new ObjectNode('root', null, null); } configurator.StringNode = String...
true
559078cb0c940d86fb2240c1c57834a5ddffcc28
JavaScript
joao-guerra91/flappyBird
/Obstacle.js
UTF-8
495
3.171875
3
[]
no_license
class Obstacle { constructor(x, y, width, height, position) { this.x = x; this.y = y; this.width = width; this.height = height; this.position = position; } draw() { const pipeImage = new Image(); if(this.position === 'up') { pipeImage.src = './images/upper-...
true
5ed8fdc914525714db1f735d98a7471df530931b
JavaScript
eLburro/InfoVis
/assignments/4/sketch.js
UTF-8
4,738
3.046875
3
[]
no_license
var COL_HEADER_AUTHOR_NAMES = "Deduped.author.names"; var COL_HEADER_AUTHOR_KEYWORDS = "Author.Keywords"; var COL_HEADER_YEAR = "Year"; var MAX_PUBLISHING_YEAR = 2015; var canvasWidth = 1000; var canvasHeight = 1000; var table; var author2Topic = {}; // drawing var CENTER_X = 400; var CENTER_Y = 400; var RAD = 80; ...
true
6249f4fc2df0b90fa0907110c61f4217f4246ae0
JavaScript
hernanfarruggia/waes-text-highlighter
/src/components-app/filter/filter.js
UTF-8
3,295
2.765625
3
[]
no_license
// Libraries import React from 'react'; import { connect } from 'react-redux'; // Components import Button from '../../components-ui/button'; // Actions import { FILTER_ACTIONS, setFilter } from './filter-actions'; class Filter extends React.Component { constructor () { super(); // Bind methods...
true
f72074f3f1932cae51c9afb348894140916fdca9
JavaScript
IFadeev/star-db
/src/components/item-list/item-list.jsx
UTF-8
1,051
2.546875
3
[]
no_license
import React, { Component } from 'react'; import './item-list.css'; import SwapiService from '../../services/swapi-services'; import Spinner from '../spinner/spinner'; export default class ItemList extends Component { constructor(){ super() this.swapiService = new SwapiService(); this.state = { ...
true
c446885e2787ea4b4bbe76e41b6c1a8a180acc86
JavaScript
melipefelgaco/10-days-of-javascript
/createAButton/js/button.js
UTF-8
127
2.8125
3
[ "MIT" ]
permissive
var btn = document.getElementById('btn'); btn.onclick = function() { btn.innerHTML = parseInt(btn.innerHTML, 0) + 1; }
true
460c72fb3a2e602ff5a5de96c603bde45e35527c
JavaScript
dprincecoder/facebook-clone-master
/src/PostInput.js
UTF-8
2,502
2.609375
3
[]
no_license
import { Avatar } from '@material-ui/core'; import React, { useState } from 'react'; import './PostInput.css'; import TelegramIcon from '@material-ui/icons/Telegram'; import VideocamIcon from '@material-ui/icons/Videocam'; import PhotoLibraryIcon from '@material-ui/icons/PhotoLibrary'; import EmojiEmotionsIcon from '@m...
true
790d601e0c1f97aba47a5cbabca947350e8451ee
JavaScript
GurovaAnna/GurovaAnna.github.io
/HW3and4js/js/script.js
UTF-8
2,943
2.6875
3
[ "MIT" ]
permissive
var test = { bodyBackground : function () { document.body.style.background = 'grey'; }, wrapper : function () { var testWrapper = document.createElement ('div'); testWrapper.className = 'container'; testWrapper.style.background = 'white'; testWrapper.style.border = '1px solid black'; t...
true
8048f144d2c212c3a5d8149b70bd24432019572b
JavaScript
HuyVanChu/Js-Basic
/lesson_21_reNhanh_Switch/main.js
UTF-8
316
3.1875
3
[]
no_license
// su dung if else khi so sanh, switch khi biet trc gia tri var day = 8; // phan biet int vs string switch (day) { case 8: console.log('Hom nay la chu nhat') break; // neu khong break, neu day = 8, nos se lay tiep cac case ben duoi default: console.log('khong biet') break; }
true
86763805a8fa2df647e0cafe27c912ff195cf8f7
JavaScript
etaybarzilay89/mobx-kickstart-excel
/src/components/Store/Store.js
UTF-8
1,646
2.6875
3
[]
no_license
import * as mobx from 'mobx'; const {observable} = mobx; const Store = observable({ sheet: observable.map({}), selectedCell: '', getCellFormula(row, column) { return this.sheet.get(this.cellIndexToString(row, column)) || ''; }, cellIndexToString(row, column) { return row + '_' + column; }, cellS...
true
6f6cf63aad07e4226b5033e7b9a48331c8b6dc35
JavaScript
terasum/mdict
/ripemd128.js
UTF-8
4,596
3.125
3
[ "MIT" ]
permissive
/* * A pure JavaScript implementation of RIPEMD128 using Uint8Array as input/output. * By Feng Dihai <fengdh@gmail.com>, 2015/07/09 * * Based on coiscir/jsdigest (https://github.com/coiscir/jsdigest/blob/master/src/hash/ripemd128.js) * * ripemd128.js is free software released under terms of the MIT License. * Y...
true
d1530ff43c8b59a8b4051f206f5d3f3e1ef117fe
JavaScript
Pcon27/Team_Profile_Generator
/__tests__/toDeleteLater.js
UTF-8
1,426
3.15625
3
[ "MIT" ]
permissive
const Child = require("../child"); describe("Child", () => { describe("Initialization", () => { it("should create an object with a name and age if provided valid arguments", () => { const child = new Child("Sarah", 3); expect(child.name).toEqual("Sarah"); expect(child.age).toEqual(3); }); ...
true
1c124aae67817ec6630ffef9628efc253d3eead1
JavaScript
Rosanaftv/Genie-Cook-Back-End
/api/controllers/auth.controller.js
UTF-8
1,205
2.53125
3
[ "MIT" ]
permissive
const bcrypt = require('bcrypt') const jwt = require('jsonwebtoken') const userModel = require('../models/user.model') function userSignup (req, res) { const encryptedPasswd = bcrypt.hashSync(req.body.password, 10) userModel .create({ name: req.body.name, email: req.body.email, password: encr...
true
335d44c66de75c608ab54f1f60ba51b6470c6d8a
JavaScript
adelacruz1738/Revitalize
/client/src/components/layout/Checklist.js
UTF-8
1,275
3.25
3
[]
no_license
import React, { Component } from "react"; // Goals checklist component export default class Checklist extends Component { constructor(props) { super(props); // The user's input is empty then put into a list this.state = { userInput: "", list: [], }; } // The user's input will be pas...
true
12324b03c8998c6f78e46fbd2d955bacc8d64ace
JavaScript
bae-sh/BOJ
/4158/4158.js
UTF-8
1,005
3.625
4
[]
no_license
const fs = require('fs'); const input = fs.readFileSync('input.txt').toString().split('\n'); const binarySearch = (target, data) => { let low = 0; let high = data.length - 1; while (low <= high) { let mid = Math.floor((low + high) / 2); if (target === data[mid]) { return mid; } else if (target...
true
d4927e16806dd12be6bd1464973e11ec28e632a6
JavaScript
SilviaFerrari/javascript-exercices
/Nuova cartella/es-promise.js
UTF-8
333
2.59375
3
[]
no_license
const fs = require("fs") const util = require("util") const read = util.promisify(fs.readFile) const write = util.promisify(fs.writeFile) let t1,t2,t3; Promise.all([ t1 = read("./1.txt","utf8"), t2 = read("./2.txt","utf8"), t3 = read("./3.txt","utf8") ]) .then((data)=>{ write("./4.txt", data.j...
true
1722ed0a5a524867e66546981503c9ceebbb62b0
JavaScript
hjzheng/ccms-svg-icons
/src/svgs/utils/index.js
UTF-8
472
2.53125
3
[]
no_license
/** * Created by hjzheng on 2019/1/22. */ export default function insertCSSRule() { const styleTag = document.getElementById('svg-icon'); if (styleTag && styleTag.nodeName.toLowerCase() === 'style') { return; } const style = document.createElement('style'); style.type = 'text/css'; style.id = 'svg-icon'; ...
true
5207002d27dbb96395ceb844fd6cf08550a21542
JavaScript
joanlamrack/Uberfox-Hacktiv8-Phase0
/Phase0/h8-p0-w2/Exercise13_Logic_Challenge_X_dan_O_JavaScript.js
UTF-8
636
4.71875
5
[]
no_license
//Exercise 13 X dan O /*Diberikan sebuah function xo(str) yang menerima satu parameter berupa string. Function akan me-return true jika jumlah karakter x sama dengan jumlah karakter o, dan false jika tidak.*/ function xo(str) { // you can only write your code here! var x=0, o=0; for(counter=0;counter<str.length...
true
9c1d1333efb165bc0854652542d8eac66c8fc8d4
JavaScript
Skarlit/algorithm
/des/des.js
UTF-8
12,060
2.875
3
[]
no_license
// compareTo (a, b) : -1 a < b, 0 a == b, 1 a > b var EventHeap = function(compareTo, hash, filter) { this.array = [null]; this.last = 0; this.compareTo = compareTo; this.memo = {}; this.hash = hash; this.filter = filter; }; EventHeap.prototype._swap = function(i, j) { var tmp = this.a...
true
d710014837a4c9d73767e48a2385e92ecd67130f
JavaScript
CodingDojo-MEAN-04-18/joao_mean_0418
/express/epic_button/routes/index.js
UTF-8
575
2.546875
3
[]
no_license
module.exports = function Route(app, server){ // this gets the socket.io module var io = require('socket.io').listen(server) // root route to render the index.ejs view app.get('/', function(req, res) { res.render("index"); }) //listen to connection event from the client side io.sockets.on('connection', funct...
true
9184dbd5249e9e2f0df2f7644d6d7b6593917ed0
JavaScript
sikang99/js-example
/canvas/draw/drawImage.js
UTF-8
1,613
2.890625
3
[]
no_license
var blob = new Blob([ ` let bitmap = undefined; let canvas = undefined; let ctx = undefined; let postAMessage=self.postMessage; self.onmessage = function(ev) { if(ev.data.msg === 'bitmap' && canvas != undefined) { bitmap = ev.data.imageB; console.log("Received an ImageBitmap next!"); while (t...
true
9f40f63fa76ac5822207ba11abe490f15c2e1ef6
JavaScript
JoeWrightNC/nytReactApp
/client/src/pages/Articles/Articles.js
UTF-8
7,319
2.84375
3
[]
no_license
import React, { Component } from "react"; import API from "../../utils/API"; import { Article } from "../../components/Article" export default class Articles extends Component { state = { searchTerm: "", startYear: "", endYear: "", page: "0", previousSearch: {}, results: [], noResults: f...
true
f4846b591ed2e0b44553259775e7430e2ed823c6
JavaScript
ppfei03/Geosoft2DiscoveryService
/pixelValue/pixelValue.js
UTF-8
8,093
2.828125
3
[ "MIT" ]
permissive
// This file contains the logic to get original pixel values const cmd = require('node-cmd'); const dir = require('node-dir'); const parser = require('xml2json'); const fs = require('fs-extra') const config = require('../config/config').config; /** * Wrapper for getting pixel value * @param promObj * @returns {Pr...
true
9a1ea521955569498b90331d703b75a1233552a9
JavaScript
yifoo/webpack-demo
/src/common/lib/store/Subject.js
UTF-8
1,417
3.03125
3
[ "MIT" ]
permissive
class Subject { constructor() { this.eventList = [] } /** * 订阅主题 * @param {string} name 事件名称 * @param {function} fn 事件方法 */ subscribe(name, fn) { if (!this.eventList.hasOwnProperty(name)) { this.eventList[name] = [] } this.eventList[name].push(fn) console.log('this.eventLis...
true
f50b257072cf177601ca686a5cf95a7e1b88bb33
JavaScript
c2017/snacks
/弹幕/1.js
UTF-8
2,893
3.28125
3
[]
no_license
/* 制作一个弹幕demo @param 参数是一个对象 @param.box 显示弹幕的盒子选择器 @param.input 弹幕的输入框选择器 @param.add 弹幕添加按钮选择器 @param.clear 弹幕清除按钮选择器 */ function Danmu(param){ this.box=this.getDom(param.box); this.input=this.getDom(param.input); this.add=this.getDom(param.add); this.clear=this.getDom(param.clear); this.lists=this.listsF(...
true
46e3619e6b51704b08f024ceb792b740145e3411
JavaScript
thought-machine/http-admin
/js/chart-renderer.js
UTF-8
1,430
2.71875
3
[ "Apache-2.0" ]
permissive
/* global $ */ /* global google */ function ChartRenderer(element, title) { const header = $('<h5></h5>') .addClass('text-center') .text(title); const chartDiv = $('<div></div>')[0]; $(element) .empty() .append(header); $(element).append(chartDiv); this.columns = {}; this.chart = new goo...
true
90c85a19bff797bd691b7d1a66d6e197ca9e41bf
JavaScript
microceptedutech/class-html-css
/js/custom.js
UTF-8
1,133
3.171875
3
[]
no_license
var date1 = new Date(); var day = date1.getDate(); var month = date1.getMonth(); var year = date1.getFullYear(); // if(month == 2){ // month = 'March'; // } // document.getElementById('date').innerHTML = day +" "+ month+" " + year; function submitForm(){ var name = document.getElementById('name').value; var...
true
0263cd0dfb06473179aab79d03afc43358d54cd9
JavaScript
stain88/exercism
/javascript/phone-number/phone-number.js
UTF-8
609
3.015625
3
[]
no_license
var PhoneNumber = function(input) { number = input; }; PhoneNumber.prototype.number = function() { clean_num = number.split("").filter(function(x) { return x.match(/\d/); }); if (clean_num.length == 10) { return clean_num.join(""); } else if (clean_num.length == 11 && clean_num[0] == 1) { return clean_num....
true
926eb57da35c7b64d61c84e8991f6ebfec4414a0
JavaScript
ilyaSy/movies-explorer-frontend
/src/components/MoviesCard/MoviesCard.js
UTF-8
2,451
2.546875
3
[]
no_license
import { useLocation } from 'react-router-dom'; import { savedMoviesURL } from '../../utils/constants'; import movieSavedPic from '../../images/save.svg'; import movieDeletePic from '../../images/delete.svg'; import MainApi from '../../utils/MainApi'; import './MoviesCard.css'; export default function MoviesCard({ mov...
true
479e65a4d9d3e7ee8e32b1f5ee5fd773c0d1a949
JavaScript
brooksco/recursion
/js/app.js
UTF-8
7,761
2.6875
3
[]
no_license
$(document).foundation(); // Firebase reference for users var ref = new Firebase("https://recursionvar.firebaseio.com/responses"); // Add event listener for form var form = document.getElementById("responseForm"); if (form.addEventListener) { form.addEventListener("submit", processForm, false); //Modern browser...
true
51baf04d0c31a1f515741a804108b488a9f3112c
JavaScript
dr0l3/TwitchGameStats
/test.js
UTF-8
263
2.984375
3
[]
no_license
/** * Created by Rune on 04-05-2016. */ var date = new Date(1462351721*1000) var utc_date = Date.UTC(date.getFullYear(), date.getMonth(), date.getDay(), date.getHours()+2, date.getMinutes()) console.log(date); console.log(utc_date); console.log("hello world");
true
9bf9ad345c3a67084715ce5efd83013249c2dc34
JavaScript
carlosrojaso/websms
/includes/user.js
ISO-8859-1
5,868
2.765625
3
[ "Apache-2.0" ]
permissive
//Mostrar o no <show=true | false> una capa <layer> en un modo determinado <disply_mode> function showLayer(show,layer,display_mode){ if(show){ if(document.forma.terms_of_use!=undefined){ if(document.forma.terms_of_use.checked) document.getElementById(layer).style.display=display_mode; else docume...
true
98bf53566661ec183d04b2d81359d2a2ed6b7a33
JavaScript
hobrien17/realloc
/frontend/static/assets/js/frm.js
UTF-8
4,278
2.59375
3
[ "MIT" ]
permissive
function click() { var str = "<div class='class-box'><div class=\"field quater first\"> \ <input name=\"name\" id=\"name\" type=\"text\" placeholder=\"Class\"> \ </div> \ <div class=\"field quater first\"> \ <select> \ <option selected disabled>Weekday</option> \ <option value=\"mon\">Mon</o...
true
1183f5b7974ae834ea13dc0c91c24fb17be251b3
JavaScript
george-pearson/website-gatsby
/src/components/posts/cupcakeDrawself/cupcakeDrawself.js
UTF-8
1,707
2.53125
3
[]
no_license
import React, { useLayoutEffect, useRef } from "react"; import Cupcake from "../../../../static/cupcake.inline.svg"; import * as style from "./style.module.css"; const CupcakeDrawSelf = () => { const animations = useRef(); useLayoutEffect(() => { animations.current = createAnimations(); }); return ( <...
true
c7d843b364fce9e8711ae123fd530efac7f0f0ce
JavaScript
PavelMacias/NoDeudas
/src/lib/helpers.js
UTF-8
781
2.828125
3
[]
no_license
const bcrypt = require('bcrypt'); const helpers = {}; helpers.encryptPassword = async (password)=>{ console.log(password) const salt = await bcrypt.genSalt(10); const hash = await bcrypt.hash(password,salt); return hash; } helpers.matchPassword = async (password,savedPassword) =>{ console.log(pas...
true
ffee7714435392a2e9e4a74b1b20d305f9ce41f0
JavaScript
landitnow1/landitnow
/index_edgeActions.js
UTF-8
3,746
2.546875
3
[]
no_license
/*********************** * Adobe Edge Animate Composition Actions * * Edit this file with caution, being careful to preserve * function signatures and comments starting with 'Edge' to maintain the * ability to interact with these actions from within Adobe Edge Animate * ***********************/ (function($, Edge, com...
true
6b98cf906f01bb80b258f941d50c6960f2ad5e2a
JavaScript
akshayr20/Weather-Node-App
/app.js
UTF-8
643
2.875
3
[]
no_license
const request = require("request"); const yargs = require("yargs"); const geocode = require("./geoCode/geoCode"); const weather = require("./weather/weather"); const argv = yargs .options({ a: { demand: true, alias: "address", description: "Address to fetch weather for", string: true } }) .help() .a...
true
0f4983b53e313ab0c083419f94756e7ee13166ee
JavaScript
JulianaBre/classifieds
/src/components/tabber.jsx
UTF-8
2,705
2.828125
3
[]
no_license
import React, { Component, cloneElement, Children } from "react"; import PropTypes from "prop-types"; import Tab from "./tabber-tab"; import Controls from "./tabber-controls"; import Container from "./tabber-container"; import Content from "./tabber-content"; /** * Parent container level tabber component. * This ...
true
f1344205b9a4f3fd4d4149f564b8c99b2a20127d
JavaScript
stevejay/react-bar-charts-compared
/src/components/examples/d3kit-hybrid/canvas-bar.js
UTF-8
1,353
2.734375
3
[ "MIT" ]
permissive
export default class CanvasBar { constructor(datum, innerHeight, xScale, yScale) { this._key = datum.key; this._current = this._calculateBarDim( datum, true, innerHeight, xScale, yScale ); this._target = null; } get key() { return this._key; } setTarget(datum,...
true
0f2dd40ce06bd71b01e243d0967fe0edf3dffeae
JavaScript
BogdanLionte/PCD
/H4/front/web-site/scripts/controllers/ShowItemsController.js
UTF-8
1,792
2.578125
3
[ "MIT" ]
permissive
import ContainerController from '../../cardinal/controllers/base-controllers/ContainerController.js'; var model = { items: [] }; export default class ShowItemsController extends ContainerController { constructor(element) { super(element); var xhttp = new XMLHttpRequest(); xhttp.open(...
true
530860cd84ae2ef141f901be59e1a34f24613ba7
JavaScript
miaur/javascript-fundamentals
/object.test.js
UTF-8
5,626
3.640625
4
[]
no_license
const PUT_ANSWER_HERE = Symbol(); describe('Objects', () => { it('Should get the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.', () => { //1st variant function get(obj, path) { var keys = path.split('.'); for (let ...
true
cdeab4f979eb474a348ac4214e72add50b466d7b
JavaScript
marcogualtieri/angular_hci
/js/mock_data_provider.js
UTF-8
1,755
2.515625
3
[]
no_license
DataProvider = (function() { var workOrderStatuses = { TODO: 0, DONE: 1, FAIL: 2 }; var WorkOrder = function(index, lat, lng, name, description, service, phone) { this.index = index; this.lat = lat; this.lng = lng; this.name = name; ...
true
bf54eae3864f4b78579366014956d01b838900b0
JavaScript
pandey623/print-triangle-diamond-square-number-patterns-in-javascript
/pyramid_even_rows.js
UTF-8
795
4
4
[]
no_license
//1, 3, 5,7,9.. ---> Odd number series (stars and spaces inside not OUTER i.e STARSPACESTAR*) appear in pyramid pattern //1, 2, 3,4,5.. ----> Counter (number of rows) //For every each counter there exist 2*n-1 value // * // * * STARSPACESTAR // * * * // * * * * // * * * * * function pyramid(n...
true
385096ae41f98ddc0507d4474f2546d941caed00
JavaScript
ArmanZarei/Constellations_JS
/script.js
UTF-8
2,219
3.5
4
[]
no_license
const canvas = document.querySelector("#canvas1"); const ctx = canvas.getContext('2d'); const particles = []; let hue = 0; canvas.width = window.innerWidth; canvas.height = window.innerHeight; window.addEventListener('resize', function () { canvas.width = window.innerWidth; canvas.height = window.innerHeight...
true
baeeed5984e3d1ef462b126be7b11815fd9c3f84
JavaScript
kellycoles/refactorStudentComponent
/refactor.js
UTF-8
1,121
3.3125
3
[]
no_license
const CreateStudent = (name, subject, info, score) => ({ name, subject, info, score }) //new student const chris = CreateStudent("Chris Miller", "History", "Failed last exam", 59) //new student const courtney = CreateStudent("Courtney Seward", "History", "Has completed all homework", 91) //new student co...
true
42165516e873d18c3242664841261c20a7b465d8
JavaScript
temmyniyi/Giftastic
/assets/javascript/logic.js
UTF-8
5,116
3.328125
3
[]
no_license
$(function (){ console.log ("loaded correctly"); buttonGenerator(); }) // CREATE AN ARRAY TO POPULATE THE BUTTONS var GOT = ["Jon Snow", "Daenarys Targaryen", "Arya Stark", "Brandon Stark", "Eddard Stark", "Cersei Lannister", "Tyrion Lannister", "Jamie Lannister", "Sandor Clegane"]; var searchTerm = "";...
true
6e7868be5862ee70281e6d28a46b96ec1445a874
JavaScript
ahmad15/ahmadREST
/controllers/user.js
UTF-8
2,746
2.609375
3
[]
no_license
// Import user model User = require('../models/user'); // Import validator package let validator = require('validator'); // Handle index actions exports.index = function (_req, res) { User.get(function (err, users) { if (err) { res.status(500).json({ message: err, })...
true
610f7e6bc480d5b7c12a659c2d4b5dcce58781d2
JavaScript
SilverFox70/sinatra-neo4j-demo
/public/app.js
UTF-8
2,360
2.859375
3
[ "MIT" ]
permissive
window.onload = function(){ if(navigator.geolocation) navigator.geolocation.getCurrentPosition(handleGetCurrentPosition); }; function handleGetCurrentPosition(location){ window.latitude = location.coords.latitude; window.longitude = location.coords.longitude; } $(document).ready(function(){ var...
true
d9910869a8de76a4bd4d335a59794f8cf5f0d76a
JavaScript
mikkorepolainen/espruino-mock-ruuvi
/samples/weatherstation-manufdata.js
UTF-8
2,996
2.53125
3
[]
no_license
var Ruuvitag = require("Ruuvitag"); var envdata; var acceldata; var refreshIntervalHandle; var refreshIntervalMillis = 5000; var advertisingIntervalMillis = 375; // default 375 var changed = true; function refresh() { blink(LED1, 0.05); envdata = Ruuvitag.getEnvData(); // { "temp": 27.11632439764, "pressure": 100...
true
4871fb6ab8b97ed14a181bc1bd95fcce3fd20a26
JavaScript
coreyneely/ls_js_book_exercises
/arrays_exercises/exercise_04_.js
UTF-8
635
4.625
5
[]
no_license
/** 4. Let's try another variation on the even-numbers theme. We'll return to the simpler one-dimensional array. In this problem, we want to use the map function to create a new array that contains one element for each element in the original array. If the element is an even value, then the corresponding element in th...
true
987f83ff45471fdf87a9f8627a1cea3d2e38cdd9
JavaScript
shuvyA/meme-generator
/js/service-gallery.js
UTF-8
2,212
2.8125
3
[]
no_license
'use strict'; var gKeyWords = {}; var KEYWORDS = 'key words map'; var gImgs = [ { id: 1, url: 'img/1.jpg', keywords: ['happy','smile'] }, { id: 2, url: 'img/2.jpg', keywords: ['happy', 'nature'] }, { id: 3, url: 'img/3.jpg', keywords: ['dictator'] }, { id: 4, url: 'img/4.jpg', keywords: ['sweet'] }, ...
true
e5ede81bb6badec0d4336cfb4a15775bf9fba35d
JavaScript
himharsh1997/Clock-in-webGL
/app.js
UTF-8
10,752
3.046875
3
[]
no_license
/*================Creating a canvas=================*/ var canvas = document.getElementById('my_Canvas'); gl = canvas.getContext('experimental-webgl'); var x = 0.02; /*==========Defining and storing the geometry=======*/ goin3 = [ 0.0,0.0,0.0, //seco...
true
4631144fe88881c12f11b2f2b0a74eac416cc472
JavaScript
takuto-y/the
/packages/code/lib/ast/nodes/cleanupEmptyLineBetweenPropertiesOnObjectExpressionNode.js
UTF-8
804
2.6875
3
[ "MIT" ]
permissive
'use strict' /** * @memberof module:@the-/code.ast.nodes * @function cleanupEmptyLineBetweenPropertiesOnObjectExpressionNode * @returns {*} */ function cleanupEmptyLineBetweenPropertiesOnObjectExpressionNode( ObjectExpression, { removeLine }, ) { const { properties } = ObjectExpression for (const [i, prope...
true
7195df88538eb664c8ac3627437cccf309248d1a
JavaScript
coderdba-coding-org/reactjs
/tutorial01/react01/src/LessonJsx03.jsx
UTF-8
999
3.6875
4
[]
no_license
import React from 'react'; // https://www.tutorialspoint.com/reactjs/reactjs_jsx.htm // nested elements, conditional expressions, arithmetic, attributes const myelement1 = <h1>I Love JSX! myelement1</h1>; const myelement2 = React.createElement('h1', {}, 'I do not use JSX! myelement2'); const myelement2a = React.crea...
true
a9e55168108aab476ad24ba3dd0f732f888318b2
JavaScript
lomghari/Delivery-Process-Vuejs
/src/Util/ReadExcel.js
UTF-8
2,613
2.640625
3
[]
no_license
import XLSX from 'xlsx' const ReadFile = (file) => { return new Promise((resolve, reject) => { const fr = new FileReader() fr.onerror = reject fr.onload = function () { var inputFile = fr.result var workbook = XLSX.read(inputFile, { type: 'binary' }) workbook.SheetNames.forEach(el => { ...
true
1d99bd19c1db600c60d7cec473ec13576f7bac78
JavaScript
andrewhingah/storemanager4
/ui/js/viewSales.js
UTF-8
1,613
3.09375
3
[ "MIT" ]
permissive
// retrieve tocken const token = localStorage.getItem("token"); const access_token = "Bearer " + token if (token === null){ alert('Please login') } // this is a filter box function myFunction() { var input, filter, table, tr, td, i; input = document.getElementById("myInput"); filter = input.value.toUpperCase(...
true
c8a04176b08d6a06b58215e177f6e10ab80c2399
JavaScript
webCoderJ/noteBook
/Algorithm/prictice/day_002__rotateArray.js
UTF-8
513
4.03125
4
[]
no_license
/** * 旋转数组 * 将数组中的每一项向后移动 k 个单位 */ function rotateArr(arr, k) { k = k % arr.length; for (let i = 0; i < arr.length; i+=k) { let tmp = arr[i + k]; arr[i + k] = arr[i]; arr[i] = null; } } function moveStep(arr, k, targetIndex, curIndex){ let len = arr.length; let targetInd...
true
7c49f9afb4ac4b1f21e3c3f293ac069e4009d36f
JavaScript
ardin-say/serv
/index.js
UTF-8
1,491
2.65625
3
[]
no_license
// const io = require('socket.io')(3000); // const users = {}; // io.on('connection' , socket=>{ // socket.on('new-user-joined',namee =>{ // console.log("new user" , namee); // users[socket.id] = namee; // socket.broadcast.emit('user-joined', namee); // }); // socket.on('send', message =>{ // socket.broa...
true
a48fcc4c2afb2a6e498d556701d8d5b62199583b
JavaScript
ignesesi/JS-learning
/This_and_Objects/existence.js
UTF-8
468
3.609375
4
[]
no_license
var myObject = { a: undefined }; console.warn("property"); console.log(myObject.a); // undefined console.log(myObject.b); // undefined console.warn("operator in"); console.log("a" in myObject); // true console.log("b" in myObject); // false console.warn("hasOwnProperty"); console.log(myObject.hasOwnProperty( "a" )...
true
a28a01f115acb18a16aff9a5919e7939a6e082dc
JavaScript
anasAB/Burger
/src/Components/Burger/OrderSummary/OrderSummary.js
UTF-8
1,140
2.53125
3
[]
no_license
import React, { Component } from "react"; import Aux from "../../../hoc/Auxx"; import Button from "../../UI/Buttons/button"; //This Component will contains the User Order class OrderSummary extends Component { componentWillUpdate() { // console.log("Order Summary Updated!"); } render() { const ingredien...
true
188ccb14eb1990fbb92beeaec872958af2651952
JavaScript
Vasilena5525/Sound-and-Image-Processing-
/Project 2 - Particle systems/sketch.js
UTF-8
1,141
3.515625
4
[]
no_license
class Particle { constructor(){ this.x = random(200,width/2); this.y = random(200,height/2); this.r = random(10,8); this.xSpeed = random(-1,1); this.ySpeed = random(-1,0.5); } createParticle() { noStroke(); fill(random(255),random(255),random(255)); circle(this.x,this.y,this.r); ...
true
91122300e095743e914b9d9ef79c05eddc3ecd66
JavaScript
shaohua/2013-06-more-data-structures
/src/linkedList.js
UTF-8
3,448
3.984375
4
[]
no_license
// Note: don't use an array to do this. var makeLinkedList = function(){ var newLinkedList = {}; newLinkedList.head = null; newLinkedList.tail = null; newLinkedList.addToTail = function(value){ var node = makeNode(value); if (newLinkedList.head === null && newLinkedList.tail === null) { //this br...
true
b3db5500c441219d3ab50ba194ef42d7814427bf
JavaScript
alonzazo/saludcomunitaria
/src/main/resources/static/js/home.js
UTF-8
3,253
2.875
3
[]
no_license
function ready(callback) { if (document.readyState != 'loading') callback(); else if(document.addEventListener) document.addEventListener('DOMContentLoaded',callback); else document.attachEvent('onreadystatechange', function () { if (document.readyState == 'complete') callback(); }); } r...
true
98a51c8e62e52d501113375f58a0ec347b1469fa
JavaScript
alancnet/generator-extensions
/test/async-tests.js
UTF-8
3,840
2.8125
3
[]
no_license
const { AsyncGenerator } = require('..') const { expect } = require('chai') async function* test() { yield 1 yield 2 yield 3 return 4 } describe('async generator', () => { it('should .toArray()', async () => { const a = await test().toArray() expect(a).to.deep.equal([1,2,3]) }) it('should .flatM...
true
600b189618a2fc054c89bfd678d62fa4ec1cc42b
JavaScript
kldaly5430/RpgTodoList
/public/javascripts/navigation.js
UTF-8
766
2.578125
3
[]
no_license
var current = null; function openPanel(subNav) { var tab = subNav.replace("menuItem-", "tab-"), ul = document.getElementById(tab); if(current && current != ul) { document.getElementById('navbar-collapse').style.display = 'none'; current.style.display = 'none'; } if(ul.style.di...
true
23d14aa2f2da376ac7040c9b9dccbf064a7e534b
JavaScript
begoniajs/begonia-fn
/src/operator/curry.js
UTF-8
389
2.90625
3
[ "MIT" ]
permissive
export default function curry(fn) { if (typeof fn !== 'function') { throw new TypeError('The first param of curry should be expected function type.'); } function o(params) { return function(...args) { let ary = params.concat(args); if (ary.length >= fn.length) { return fn.apply(this,...
true
b6672e021571685e1c7c41ed55347fd6aae29656
JavaScript
Teknix420/TG-Burger-Logger
/config/orm.js
UTF-8
1,055
2.734375
3
[ "MIT" ]
permissive
var connection = require('./connection.js'); var orm = { // select data from the table selectAll: function (table, cb) { var queryString = "SELECT * FROM " + table + ";"; connection.query(queryString, function (err, res) { if (err) { throw err; }; ...
true
4ca6d012b9734d5e695ab791b218a65d3e1328c3
JavaScript
rajin-s/portfolio
/scripts/TileGrid.js
UTF-8
367
2.78125
3
[]
no_license
let hoverThumbs = document.querySelectorAll("[tile-hover-thumb]") for (var i = 0; i < hoverThumbs.length; i++) { let thumb = hoverThumbs[i] let imageURL = thumb.attributes['tile-hover-thumb'].value thumb.parentElement.parentElement.onmouseenter = () => { thumb.style = `background-image: url(${image...
true
9be68783c6ba5cc9f57b83b5bd77b8b61806e804
JavaScript
PauloHenriqueSousa2020/HELPet
/backend/src/extras/sendMail.js
UTF-8
1,743
2.890625
3
[]
no_license
// PARA INSTALAR O NODE MAILER USAR ---> npm install nodemailer --save <--- const nodemailer = require('nodemailer'); const crypto = require('crypto'); const codigo = crypto.randomBytes(4).toString('HEX').toUpperCase(); const texto = `PARA VALIDAÇÃO DO CADASTRO NO SISTEMA DE CONTRACHEQUES ONLINE INSIRA O C...
true
dff000e5ac28243ef019dbbf4cd10e11e003182a
JavaScript
r-walsh/zeelib
/dist/prevent-default.js
UTF-8
544
3.03125
3
[ "WTFPL" ]
permissive
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); // @flow /** * Calls preventDefault and stopPropagation * if they exist * @example * handleClick (e) { * preventDefault(e) * doOtherThingsMaybe() * } */ var preventDefault = function preventDefault(e /*: EventTarget*/) /*: voi...
true
f9773fb2d2966853db90d85b356dd69399d8c088
JavaScript
scurry222/Ultimate_Interview_Preparation_Kit
/Design_Patterns_In_JavaScript/Structural_Patterns/proxy.js
UTF-8
2,078
4.0625
4
[]
no_license
// Problem statement # // In this challenge, you have to implement a library kiosk. The LibraryKiosk allows a student to perform two functions: // open: allows the student to open an app in the kiosk // connectTo: allows the student to connect to a website // Your task is to implement the proxy pattern so that it re...
true
f1a99cb46bcfc6e7a5517e2cb94bac7c04405fe1
JavaScript
samevans/leetcode-solutions
/javascript/0981 MED Time Based Key-Value Store.js
UTF-8
894
3.609375
4
[]
no_license
/** * Initialize your data structure here. */ class TimeMap { constructor(){ this.times = {} } }; /** * @param {string} key * @param {string} value * @param {number} timestamp * @return {void} */ TimeMap.prototype.set = function(key, value, timestamp) { if(!this.times[key]) this.times[key...
true
1f0dbe3aba2d4a1d7ee0f06b7c925159b7ad221b
JavaScript
BaukeL/js-monads
/src/__tests__/option.test.js
UTF-8
2,742
3.34375
3
[]
no_license
import Option from '../option'; // Basic value test (`Option with value should say 'BOE'`, () => expect (Option.of('BOE').value()) .toBe ('BOE') ) test (`Option with value should be some`, () => expect (Option.of('BOE').isSome) .toBeTruthy () ) test (`Option with value shouldn't be none`, () => ...
true
46e2fb5952956d362888c7d15364b908ba9ac344
JavaScript
odht/zog_igame
/fronend/igame/src/App/Common/MatchResult/OneBoardTable/OneBoardPos.js
UTF-8
2,631
2.515625
3
[]
no_license
import React from 'react'; import './OneBoardPos.css' const OneBoardPos = ({ direction }) => { console.log('dir', direction); let eArr = []; let sArr = []; let nArr = []; let wArr = []; let vulnerable = ''; let dealer = ''; let datum = 0; if (direction) { const { E, S, N, W }...
true
dd61277a16cb3d8602e62d332f2c7f1853c8746a
JavaScript
essevpi/fullstack-open
/phonebook/src/services/contacts.js
UTF-8
706
2.578125
3
[]
no_license
import axios from "axios"; const baseUrl = '/api/persons' const getContacts = () => { const request = axios.get(baseUrl); return request.then(response => response.data); } const createContact = newContact => { const request = axios.post(baseUrl, newContact); return request.then(response => response.d...
true
148f2e16f08299412c587549910a0937877f4789
JavaScript
forever-z-133/gradient-tool
/src/components/color-picker/untils/color.js
UTF-8
2,019
3.359375
3
[]
no_license
// 此处的颜色类型有 name(关键字) hex(十六进制) rgb rgba hsl hsla // 且,都将以对象为中间形态来进行相互转换 /* * 判断颜色类型 */ var colorReg = { 'hex' : /^#([a-f0-9]{3}$|[a-f0-9]{6}$)/i, 'rgb' : /^rgb\((\s*\d+\s*,\s*){2}\d+\s*\)$/i, 'rgba': /^rgba\((\s*\d+\s*,\s*){3}\d+\s*\)$/i, 'hsl' : /^hsl\((\s*\d+\s*,\s*){2}\d+\s*\)$/i, 'hsla': /^hsla\((\s...
true
d34ac7a19466b34bd3d1e97fff258a512d76e86d
JavaScript
oliverellmers/p5jsExperiements
/js/drawingBalls.js
UTF-8
4,744
3.15625
3
[]
no_license
var drawingBallsSketch = function(p) { // Global variables var img = undefined; var balls = []; // Load the image before the sketch is run p.preload = function() { // Picture by Sukanto Debnath // https://www.flickr.com/photos/sukanto_debnath/3081836966/ img = p.loadImage("img/oldMan.jpg"); }; // Initial...
true
dca3d454d874185ac000812288869aedc4e176e6
JavaScript
timvelthoven/jquery-game
/cave/dialog.js
UTF-8
3,096
2.78125
3
[]
no_license
// Deze moeten nog aangepast worden o.b.v. functies onderaan (handmatig, nog console.log toevoegen daar) const scrollPositionDialog5 = 10; let dialog5HasBeenOpened = false; function disableBodyScrolling() { $('#disableScrollDiv').css({ display: "block" }); $('body').css({ overflo...
true
ec273f4f8e064b15b92304df659dbaae6c365ffb
JavaScript
tonyli29/algoVisualizer
/src/visualizer/algorithms/dijkstra.js
UTF-8
5,681
2.953125
3
[]
no_license
export function dijkstra(grid, startNode, finishNode) { startNode.distance = 0; const vistedNodes = []; const unvistedNodes = allNodes(grid); var UP = false; while (!!unvistedNodes.length) { sortNodesDistance(unvistedNodes); const closestNode = unvistedNodes.shift(); if (closestNode.isWall) contin...
true
d2b140c91759f920e8c2c638c776e0485445030f
JavaScript
ifeLight/refuture-bot
/src/utils/calculations/linearRegression.js
UTF-8
850
3.453125
3
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
/** * Simple linear regression * * @param {Array.<number>} data * @return {Function} */ module.exports = function regression(data) { var sum_x = 0, sum_y = 0 , sum_xy = 0, sum_xx = 0 , count = 0 , m, b; if (data.length === 0) { throw new Error('Empty data'); } ...
true
5d94d7aefc6f2705edc427da8db75a5b0afc6219
JavaScript
normal64/PokeAPI
/script.js
UTF-8
6,695
3.296875
3
[]
no_license
const mainApi = "https://pokeapi.co/api/v2/pokemon"; let previousApi; let nextApi; let currentApi; let targetPokemon; function pokes() { if (document.getElementById("start")) { document.getElementById("start").remove(); } console.log("pokes runs"); let pokeNames; let spritesArray; //giving some css to c...
true
ed303121e30ed56c77332cd5c367d8d15022ec5a
JavaScript
whitingba/Project-two
/public/js/edituser.js
UTF-8
4,246
2.875
3
[]
no_license
$(document).ready(function () { var $userContainer = $(".user-container"); //***************EVENT LISTENERS***************/ $(document).on("click", "button.delete", deleteUser); $(document).on("click", "button.editCtl", toggleFinish); $(document).on("click", ".user-item", editUser); $(document).on("click",...
true
05689757d7215e23e0f0530b87625a39b5383c93
JavaScript
igornfaustino/tamagotchi-web
/public/js/newpets.js
UTF-8
1,891
3.015625
3
[]
no_license
var petType = '' var special = false var price = 0 function sound_button() { let sound = document.getElementById("sound_button") sound.play() } function select(img) { sound_button(); special = false; if (petType == '') { petType = img.id $("#" + petType).addClass('selected_pet') ...
true
367b704f0034296d875a51fbeb80dc4591544398
JavaScript
Avonazhrets/shiny-journey
/РИМАН/Eulerface-master/sequences/rationalinjection.js
UTF-8
307
3.34375
3
[]
no_license
var PrimeSeq = [1,1]; function primeSeq(n) { if(n > PrimeSeq.length) { if(n % 2 == 0) { PrimeSeq.push(PrimeSeq[n/2-1]); } else { PrimeSeq.push(PrimeSeq[(n-1)/2-1] + PrimeSeq[(n+1)/2-1]); } } return PrimeSeq[n-1]; } function rationalInjection(n) { return primeSeq(n)/primeSeq(n+1); }
true
6b1de961638fe0c71482e228d8247eaa0927b25d
JavaScript
edusaitto/quiz
/src/components/ResultWidget/index.js
UTF-8
1,734
2.828125
3
[]
no_license
import Widget from '../Widget' import styled from 'styled-components' const ListResultOk = styled.li` padding: 8px; margin: 8px; border-radius: ${({ theme }) => theme.borderRadius}; background-color: ${({theme}) => theme.colors.success}; ` const ListResultWrong = styled.li` padding: 8px; margi...
true
3a614a8da1a62450f172e93d58d4b89a01dc8c8e
JavaScript
prateeksonii/snake
/scripts/food.js
UTF-8
865
3.171875
3
[]
no_license
import { onSnake, increaseSpeed } from "./snake.js"; // Initial position of food let position = { x: Math.floor(Math.random() * 30 + 1), y: Math.floor(Math.random() * 30 + 1), }; // Constant to set the increase in length on eating food const EXPANSION_RATE = 1; export const update = (expandSnake) => { if (onSn...
true
b6f60ecd84634b12bc5c258bf984a36643fb513c
JavaScript
jacksteamdev/capture-pdf-text
/tests/rules.test.js
UTF-8
2,446
2.765625
3
[ "MIT" ]
permissive
/* eslint-env jest */ import { Block } from '../src/class.block' import { Item } from '../src/class.item' import { matchWith } from '../src/matcher' import { sameBlock, sameLine } from '../src/rules' describe('sameBlock', () => { test('matches items that have same style and are neighbors', () => { const partial...
true
78dde2ca04b7af8081cb6f469908627dbad4380f
JavaScript
Andres-Atehortua/Jest-Enzyme
/src/__test__/numbers.test.js
UTF-8
691
3.0625
3
[]
no_license
import { suma, resta, multiplicacion, division, getRandomNumber, } from "./../utils/numbers"; describe("Pruebas de numeros", () => { test("Probando la función suma", () => { expect(suma(5, 5)).toBe(10); }); test("Probando la función resta", () => { expect(resta(5, 5)).toBe(0); }); test("Pro...
true
1145393e2b2b74f0b2aaa6b5c1c8c310c62f2d4f
JavaScript
namnguyen3019/E-commerce-store
/frontend/src/actions/orderActions.js
UTF-8
2,811
2.609375
3
[]
no_license
import axios from 'axios' import { ORDER_CREATE_FAIL, ORDER_CREATE_REQUEST, ORDER_CREATE_SUCCESS, ORDER_FETCH_REQUEST, ORDER_FETCH_SUCCESS, ORDER_LIST_FAIL, ORDER_LIST_REQUEST, ORDER_LIST_SUCCESS, ORDER_PAY_FAIL, ORDER_PAY_REQUEST, ORDER_PAY_SUCCESS, } from '../constants/orderContants' // Create order expor...
true