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
26a0e0a34bd0889b9273215c7f43a549e27e3437
JavaScript
ruby840124/chatroom
/src/signup.js
UTF-8
3,705
2.53125
3
[]
no_license
import React from 'react'; import {Link, Route , Redirect} from "react-router-dom"; import firebase from 'firebase'; import config from "./config"; import './App.css'; class signup extends React.Component { _isMounted = false; constructor(props) { super(props); this.state = {name:'',account:'',password:'',...
true
9b3ed0d96b96eb08370e9a737381f9de94263fd0
JavaScript
VaniVenna/email-with-ajax
/clickEvents.js
UTF-8
2,210
2.671875
3
[]
no_license
function clickEvents(contentContainer, deleteIconCommon) { this.init = function () {} this.replaceData = function (currentTarget) { contentContainer.innerHTML = currentTarget.getAttribute("data-content"); } /* checkbox click event */ this.enableDeleteIcons = function (e) { //...
true
701728da7efe2509a0c7be6ea57fa7ab476031f0
JavaScript
VeenaHarsha/Eloquent-JS
/CH04/deepEqual.js
UTF-8
1,261
3.75
4
[]
no_license
function deepEqual(obj1, obj2) { if (obj1 === obj2) return true; if (Object.keys(obj1).length !== Object.keys(obj2).length) return false; if ((typeof obj1 !== "object" || obj1 === null) || (typeof obj2 !== "object" || obj2 === null)) return false for (let key of Object.keys(obj1)) { ...
true
969413fe16b38b08f9a7d982a87596365cbe56b4
JavaScript
lukaszpacula/hackerrank_solutions
/algorithms/a very big sum.js
UTF-8
109
2.640625
3
[]
no_license
function simpleArraySum(ar) { return ar.reduce(function (total, value) { return total + value; }); }
true
066ef27feb748faa2f9c78d6c217f56f64f32dba
JavaScript
OskarLindblad/storybookplayground
/src/datepicker2/MultiRange/displayedApproximation.js
UTF-8
607
2.828125
3
[]
no_license
export default function displayedApproximation(approximation) { let estimation; if (approximation === 1) { estimation = `1 month`; } else if (approximation < 12) { estimation = `${approximation} months`; } else { const years = (approximation / 12).toString(); const months = approximation % 12; ...
true
f858ca87fffa9571c212da8b1748c487edafacb4
JavaScript
kustasajd/node-sequalize
/helper/removeDuplicates.js
UTF-8
292
2.546875
3
[]
no_license
module.exports = { removeDuplicates: (data, id) => { let unique = [] data.forEach(element => { if ( unique.filter(item => { return item[id] === element[id] }).length === 0 ) { unique.push(element) } }) return unique } }
true
3a314040978557addfd642340e705607b8317b81
JavaScript
devlato/composite-eventbus
/composite-eventbus.js
UTF-8
5,116
2.78125
3
[]
no_license
/** * mock console object */ if (typeof getConsole != 'function') { function getConsole() { this.info = function() {}; this.warn = function() {}; this.error = function() {}; return this; } } /** simple event bus for publishing/subcribing information */ var EventBus = (function() { var s...
true
62d44591e67e7a63c71894cf22e2f451a9a5c94e
JavaScript
slaveandmaster/SoftUni-Programming-Basics-Mart-2021
/PB Basic Pre Exam/workout.js
UTF-8
730
3.328125
3
[]
no_license
function workout(input) { const trainingDays = Number(input.shift()); let kmInFirstDay = Number(input.shift()); let sum = kmInFirstDay; for (let i = 0; i < trainingDays; i++) { let next = Number(input.shift()); kmInFirstDay = kmInFirstDay + (kmInFirstDay * next / 100); sum +=kmInFirstDay; } if (...
true
b2a12572738b55cd743e34bad0d3207b4f145ede
JavaScript
aumbadgah/breathe
/src/js/Widget.js
UTF-8
389
2.71875
3
[ "MIT" ]
permissive
const Widget = function Widget(id) { this.elem = $(id); this.id = id; this.setup(); } Widget.prototype.setup = function () { let self = this; const setBaseMeasures = () => { self.height = self.elem.height(); self.width = self.elem.width(); } window.addEventListener('resize', () => { setBaseMeasures();...
true
1dd7c1bf75575e4b2e2f9116e2b2a5776c9a4128
JavaScript
neerajchoudhary220/myproject
/speechrecognition.js
UTF-8
1,730
3.375
3
[]
no_license
//sppech function runSpeechRecognition() { // get output div reference //var output = document.getElementById("output"); // get action element reference var action = document.getElementById("action"); // new speech recognition object var SpeechRecognition = SpeechRecognition || webkitSpeechReco...
true
7df0b62d7c423a79268d692b603af1d7451347af
JavaScript
davikawasaki/vuejs-alura
/app/src/directives/Transform.js
UTF-8
2,021
2.921875
3
[ "MIT" ]
permissive
/** * Exporting directive configs object */ export default { /** * Transform el each double click * Options: rotate (clockwise or not) and scale * @param {*} el * @param {*} binding (modifiers, args, value) * @param {*} vnode (reference to Virtual DOM, which allows associated component-...
true
64dae23f673413344274063a9eae81e835d6e41c
JavaScript
Emi6/englishidiomschool
/pages/quote/quote.js
UTF-8
4,474
2.515625
3
[]
no_license
// pages/quote/quote.js var Bmob = require('../../utils/bmob.js'); Page({ /** * Page initial data */ data: { }, /** * Lifecycle function--Called when page load */ onLoad: function (options) { var date = new Date() var cur_year = date.getFullYear() var cur_month = date.getMonth() ...
true
448d09e691e070203983f678e49f0a9f23d072c9
JavaScript
mosiac05/paqu-react
/src/components/Table.js
UTF-8
2,913
2.65625
3
[]
no_license
import { useMemo, useState } from 'react'; import { useHistory, useLocation } from 'react-router'; import Card from '../components/UI/Card'; import './Table.css' const Table = ({ title, items, columns, pathToLoad }) => { // Set filtered state const [filteredItems, setFilteredItems] = useState([]) // consol...
true
8c206e445d2a1ef3b41bcf6d60faba9d060b356a
JavaScript
badams/viewportjs
/tilemap.js
UTF-8
8,479
3.046875
3
[]
no_license
(function () { /** * TileMap Constructor, TileMap lets you create TileBased maps. * * @access public * @return object (TileMap instance) */ this.TileMap = function (viewport, tileset) { this.scroll = {x : 0, y :0}; this.viewport = viewport; this.tileset = tileset; this.zoom = 1; ...
true
be9773152dcfdb804f29c18265df1ecfcadbfbed
JavaScript
alatielle/kontur-test-frontend
/js/Matrix.js
UTF-8
1,488
3.859375
4
[]
no_license
/** * @author Elena Rashkovan * @param Array.<number[]> array */ function Matrix(array) { var matrix = array; var rowsCount = array.length; var colsCount = array[0].length; this.getRow = function(index) { return matrix[index]; }; this.getColumn = function(index) { return matrix.map(function(ro...
true
4f40290e3b62f053805dfbff04a2a7fe45c03f1f
JavaScript
altcoda/Softuni-JS-Advanced
/02._Syntax-Functions-and-Statements-Exercise/03._same-numbers.js
UTF-8
185
3.15625
3
[]
no_license
function sameNumbers(int) { const arr = [...int.toString()]; console.log(arr.every(num => Number(num) == arr[0])) console.log(arr.reduce((a, b) => Number(a) + Number(b))) }
true
cc514c5480fa78abafcd5041af680c68da5e9cf3
JavaScript
bakdurak/simple-web-api
/other/deprecated/DbMocks/dbEvents.js
UTF-8
3,347
2.703125
3
[]
no_license
const events = db.getCollection( 'events' ); const users = db.getCollection( 'users' ); function getRandomInt ( min, max ) { min = Math.ceil( min ); max = Math.floor( max ); return ( Math.floor( Math.random() * ( max - min + 1 ) ) + min ); } function randomStr ( length ) { let text = ''; const possible = '...
true
7385f11c3881e3f8338f07d7ef9ea730bddd868c
JavaScript
piyush4299/reminder-app
/src/components/todoListComponent/TodoList.js
UTF-8
4,715
2.640625
3
[ "MIT" ]
permissive
import './styles.css'; import { TodoItem } from "../todoItemComponent/TodoItem" import { useState } from 'react'; import { useSelector } from 'react-redux'; import { sortAscending, sortDescending } from '../../utils/helper'; import ErrorBoundary from '../errorBoundaryComponent/ErrorBoundary'; import { FontAwesomeIcon }...
true
c52a0fb7924bb9f59b321868de7b0fa288daf396
JavaScript
Joncwr/kitchen-dashboard-interface
/src/services/middleware/jwtMiddleware.js
UTF-8
692
2.546875
3
[]
no_license
let axios = require('axios') module.exports = { jwtFetch: (method, endpoint, json) => { return new Promise((resolve, reject) => { let { token } = JSON.parse(localStorage.getItem('user')) axios({ url: process.env.REACT_APP_SERVER + endpoint, method: method, headers: { ...
true
d25f3d828b3ad7d4b58c4ad19234cefef71b929e
JavaScript
ThibaultWalterspieler/blade_runner_cli
/assets/js/cli.js
UTF-8
10,461
2.75
3
[ "MIT" ]
permissive
/** * @author Thibault Walterspieler <thibault@walterspieler.com> */ window.onload = (event) => { console.log([ ` `, ` ___ __ ___ ___ ____`, ` / _ )/ / / _ | / _ / __/`, ` / _ / /__/ __ |/ // / _/`, ` /____/____/_/ |_/____/___/`, ...
true
f4f7eb8a65a5f8e8edb56304249fcd3225d6ed67
JavaScript
bhochhi/angularjs
/u1l1a2/js/u1ass2.js
UTF-8
1,053
3.5
4
[]
no_license
$(document).ready(function() { $("#plus").click(function(e) { var x = $("#xvalue").val(); var y = $("#yvalue").val(); if (isNumeric(x) && isNumeric(y)) { $("#operation").text("plus"); $("#result").text(parseInt(x) + parseInt(y)); } else { alert("i...
true
5badaa974cbe2cce95f9696f7d451bebe2b95d41
JavaScript
justin-caldicott/buffr
/src/serializers/jsonSerializer.test.js
UTF-8
821
2.75
3
[ "MIT" ]
permissive
/* eslint-disable no-shadow */ /* eslint-disable arrow-parens */ const { test } = require('zora'); const JsonSerializer = require('./jsonSerializer'); const payload = { foo: 'bar' }; test('jsonSerializer', t => { t.test('when an object is serialized', t => { const serializer = new JsonSerializer(); const re...
true
e75b5e3f1b3c27264f2532535c11ab3ce6ca76e8
JavaScript
cvillanueva94/mpd-generator
/__test__/getResolution.test.js
UTF-8
1,621
2.5625
3
[ "MIT" ]
permissive
const {getResolution} = require('../utils'); describe('getResolution', () => { test('returns correct result for valid inputs', () => { const width = 1920; const height = 1080; const resolution = '1080p'; const qualities = ['low', 'medium', 'high']; const expected = { ...
true
b2a85620c595796af00f6abb1dfa09369bbbde76
JavaScript
starrynight86/weather-app-project
/src/script.js
UTF-8
4,914
3.234375
3
[]
no_license
function getForecast(coordinates) { let apiKey = "acfd78e73c052df652b44124ce0e5d1e"; let apiUrl = `https://api.openweathermap.org/data/2.5/onecall?lat=${coordinates.lat}&lon=${coordinates.lon}&appid=${apiKey}&units=metric`; axios.get(apiUrl).then(displayForecast); } function displayWeather(response) { celsiusTempe...
true
0c14a98baf6a2e88e0bded762d8fbc4e1133cfbf
JavaScript
djl1005/Brick
/brick/js/Bullet.js
UTF-8
547
2.828125
3
[]
no_license
"use strict"; var Bullet = function () { function Bullet(x, y, atk , image) { this.atk = atk; this.x = x; this.y = y; this.sprite = game.add.sprite(x, y, image); this.name = image; } var p = Bullet.prototype; p.update = function (enemies, dt) { } p.move =...
true
7054a3c007f014a06f885fbc6af2ffa8c2eb159b
JavaScript
cupcakes4all/flow
/main.js
UTF-8
416
3.0625
3
[ "MIT" ]
permissive
$('.calc-button').on('click', function() { var mlMin = $('.ml-min').val(); var rad = $('.rad').val(); var result = (mlMin * 60) / (Math.PI * (rad * rad)); $('.result').val(result.toFixed(3)); }); $('.calc-button2').on('click', function() { var cmHr = $('.cm-hr').val(); var rad2 = $('.rad2').val(); var resul...
true
f39fb56f743207488dd659aa40784bcea12b25a4
JavaScript
josheewa/Khet
/js/board.js
UTF-8
6,944
3.34375
3
[]
no_license
import * as Pieces from "./pieces.js"; "use strict" export default class Board{ //configuration can be 1,2,3 //1 = Classic //2 = IMHOTEP //3 = Dynasty constructor(configuration){ this.board = new Array(10); for(let x = 0; x < this.board.length;x++) this.board[x] = new Array(8); this.boa...
true
e7dd098bcadd13159e4edaa3e47babc4380fdb23
JavaScript
StanislawFarshtei/Lesson5
/1.js
UTF-8
610
4.0625
4
[]
no_license
/** * Задача 1. * * Создайте функцию `f`, которая возвращает куб числа, переданного в качестве аргумента. * * Условия: * - Генерировать ошибку, если в качестве аргумента был передан не числовой тип. */ // Решение // console.log(f2(2)); // 8 // exports.f = f; const f = function(num) { if (typeof num !== '...
true
fbb082ea0297c19a824d178ecdece5bf25ad9e3d
JavaScript
pipisasa/checklist-backend
/src/middlewares/auth.middleware.js
UTF-8
706
2.59375
3
[]
no_license
const jwt = require("jsonwebtoken"); const auth = (req, res, next) => { if (req.method === "OPTIONS") { return next(); } try { if(!req.headers.authorization)throw new jwt.JsonWebTokenError("Unauthorized"); const [type ,token] = req.headers.authorization.split(" "); if(type!=="JWT") throw new j...
true
e4ac438afce03308b0c7bcd75fd1f6ef7b610348
JavaScript
artsy/positron
/src/client/components/rich_text/utils/decorators.js
UTF-8
1,473
2.5625
3
[ "MIT" ]
permissive
import PropTypes from "prop-types" import React from "react" // // STRATEGIES // export const findEntities = (type, contentBlock, callback, contentState) => { contentBlock.findEntityRanges(character => { const entityKey = character.getEntity() return ( entityKey !== null && contentState.getEntity(entit...
true
db48447bff0a81a76a5190b8919637bf34b2aba6
JavaScript
Chiradeep-Banik/Learning_Web_Basics
/JS_Project_7/script.js
UTF-8
915
2.6875
3
[]
no_license
var modal = document.querySelector(".modal"); var overlay = document.querySelector("#overlay"); var close_btn = document.querySelector(".close_modal"); var open_btn = document.querySelector(".open_modal"); open_btn.addEventListener("click",()=>{ if(overlay.classList.contains("active") == false && modal.classList.c...
true
4c6ec5b7e1bada90dcdbfce89b390cfe11c5386a
JavaScript
sehrish-ishaq92/Chapter-1-67-Js-
/chapter#31-34/Task2/app.js
UTF-8
248
3.25
3
[]
no_license
document.write("<h1>Chap#31-34 Task1</h1>","<br>"); var date = new Date(); document.write("Current Date is " ,date); //convert to string var a =date.toString(); console.log(a); var b=a.slice(4,8); document.write("<br> Current Month is: " , b);
true
ee6d9df0110baf8780d51d22c6e87fddc29d5dba
JavaScript
ShiftXO/SoftUni-JS-Advanced-Jan-2020
/Arrays/DiagonalAttack.js
UTF-8
1,146
3.703125
4
[]
no_license
function solve(inputMatrix) { let matrix = []; let mainSum = 0, secondSum = 0; for (let row = 0; row < inputMatrix.length; row++) { const elements = inputMatrix[row].split(' ').map(Number); matrix[row] = elements; mainSum += matrix[row][row]; secondSum += matrix[row][inputMat...
true
bc3615931d2c2de6d9f658924869e3d57b351597
JavaScript
attainu/career-door-au3
/client/src/redux/actions/loginAction.js
UTF-8
1,676
2.546875
3
[]
no_license
import axios from "axios"; import jwt_decode from "jwt-decode"; import { SET_CURRENT_USER } from "./types"; import { useAlert } from "react-alert"; export const LoginAction = data => { return { type: "LOGIN_SUCCESS", data }; }; export const logoutAction = () => { return { type: "LOGOUT_SUCCESS" }; ...
true
670c1fa7af11901b48f5d64be44b704c2e233614
JavaScript
Cary-Xx/CG4002-Dashboard
/src/components/dashboard/emgDancer2.js
UTF-8
1,926
2.78125
3
[]
no_license
import React, { Component } from 'react'; import '../dashboard.css'; var tableRows = [['', '', '', '', '']]; export default class EmgDancer2 extends Component { constructor(props) { super(props); this.state = { value: '' } } // changeState = e => { // this.set...
true
c879ad1b95307ab7bceed94336ed805326f17773
JavaScript
disneyparentsapp/backend
/posts/posts-router.js
UTF-8
3,213
2.515625
3
[]
no_license
const router = require('express').Router(); const db = require('../data/dbConfig.js'); const restricted = require('../auth/restricted.js'); router.get('/', restricted, (req, res) => { db('posts') .then(posts => { res.status(200).json(posts); }) .catch(() => { res.st...
true
3137dff71bc1e1cdfc28db1f1c7a34d5d2d23f8b
JavaScript
Samuel-Cho/practice-problems
/CodeSignal/alternatingSums.js
UTF-8
213
3.21875
3
[]
no_license
function alternatingSums(a) { const weights = [0, 0]; for (let i = 0; i < a.length; i++) { if (i % 2 === 0) { weights[0] += a[i]; } else { weights[1] += a[i]; } } return weights; }
true
6a34b2ec8c2e3bd347743983826decee4218f48c
JavaScript
huogiafei/JavascriptDesignPattern
/ch2_Strategy/ls2_basic_es6.js
UTF-8
723
2.734375
3
[]
no_license
const discounts = require('./utils/discounts'); class CalcDiscount { total = null; strategy = null; args = []; setTotal(total) { this.total = total; } setDiscountMethod(strategy, args) { this.strategy = strategy; this.args = args } getResult() { return...
true
c8fbda124a338c9ca226bf8d9ea25babf823dfbb
JavaScript
WeslleyNisan/javascript-book
/11.Objetos e Propriedades/2.Métodos/script.js
UTF-8
511
2.96875
3
[]
no_license
var carro = { extras: ['ar-condicionado', 'freios abs', 'som'], velocidade: 0, faroisLigados: false, ligarFarios: function () { this.faroisLigados = true; }, acelerar: function (velocidade) { this.velocidade += velocidade; }, freiar: function () { this.velocidade = 0; } } carro.ligarFarios...
true
9fe4e84da2570eb4de567d5db347c94838357bb1
JavaScript
shelley008/mobileApp001
/src/commonJs/storageMethods.js
UTF-8
808
2.53125
3
[]
no_license
import Vue from 'vue' var UserData = { save(obj,keyName){ var storage=window.localStorage; //写入a字段 //storage.a = JSON.stringify(obj); //写入b字段 //storage['b'] = JSON.stringify(obj); //写入c字段 storage.setItem(keyName,JSON.stringify(obj)); }, get(keyName){ return JSON.parse(window.local...
true
e84796d6559dfe9f19cbe12bff71c11ddb660e85
JavaScript
ReneeT19/react_project
/company_product/src/components/Book.jsx
UTF-8
1,603
2.703125
3
[]
no_license
import React, { Component } from 'react' class Book extends Component { state = {} bookShelfChange = (e) => { e.preventDefault() const shelf = e.target.value; if(this.props.shelfChange) this.props.shelfChange(this.props.book, shelf); }; render(){ const { book } = this.props var price = ...
true
4e01afa85c7b2cdc22c3ba076a239065a9092620
JavaScript
ANDREYDEN/capstone-expenses-app
/server/routes/deleteEntry.js
UTF-8
2,474
2.734375
3
[ "MIT" ]
permissive
const { retrieveDataFrom, idFromString } = require("../src/utils.js") exports.deleteEntry = { type: "delete", path: "/sheets/deleteEntry/:id/:index", authNeeded: true, callback: async function deleteEntry(req, res) { try { if (!req?.params?.id || !("index" in req.params)) { res.status(400...
true
143b16312a9781ac64b759ce7e316714fe5972ec
JavaScript
beneater/khan-exercises
/utils/convert-values.js
UTF-8
6,100
2.921875
3
[ "MIT" ]
permissive
jQuery.extend( KhanUtil, { trigFunc: { csc: {name: "csc", print: function( angle ){ return KhanUtil.trigFunc.sec.print( 90-angle); }, convertsTo:["sin"], convertTo: function( type, angle ){ if( type.name == "sin" ){ var cscv = KhanUtil.trigFunc.csc.print( angle ); var sinv = KhanUtil.trigFunc.s...
true
cb025bade4ce80e524ef5d0d924d591971d31a71
JavaScript
dezzie/pokedex
/lib/pokemon.js
UTF-8
523
2.75
3
[ "MIT", "BSD-3-Clause" ]
permissive
import fs from 'fs'; import path from 'path'; const pokemonById = JSON.parse(fs.readFileSync(path.join(__dirname, 'pokemon-by-id.json'), 'utf8')); const pokemonByName = JSON.parse(fs.readFileSync(path.join(__dirname, 'pokemon-by-name.json'), 'utf8')); export default function (id) { if (!id) { return pokemonByNa...
true
dd3e8a7518168376d9aa73312e54b16713e1d4d3
JavaScript
huangciyin/QieQie
/src/assets/scripts/accounts.js
UTF-8
2,207
2.640625
3
[]
no_license
var Accounts = { data : null, site : null, get : function(username) { var account = null; $.each(this.data, function(i, item) { if (item.username == username) { account = item; return false; } return true; }); return account; }, reload : function(site) { this.data = JSON.parse(localSto...
true
e787e22c2c2648dec31d47d6ba8225e57f5e75f9
JavaScript
meanstack-io/meanstack
/lib/auth/Cookie.js
UTF-8
1,746
2.515625
3
[ "MIT" ]
permissive
/** * Cookie authentication. * * @author: Rafael Pegorari <rafapegorari@gmail.com> * @copyright Copyright (c) 2015-2016, MEANStack.io. * @license See LICENSE * MIT Licensed */ 'use strict'; /** * Module dependencies. */ var Promise = require('bluebird'); /** * Cookie * * @param App * @constructor */ va...
true
82fa62f627a4e1346fa613545ac3dcba13a72317
JavaScript
sidi360/Systeme-d-Onglets
/js/scripts.js
UTF-8
1,339
3.328125
3
[]
no_license
window.onload = () => { const tabs = document.querySelectorAll(".tab"); const contents = document.querySelectorAll(".content"); let active = document.querySelector(".active"); let target = active.dataset.target; affiche(); // On affiche le contenu de l'onglet actif document.querySelector(t...
true
5ded732d08db8a5fd7cfbe0fd9a183eea2245960
JavaScript
thiagodnf/aco-simulator
/js/utils/normalize-utils.js
UTF-8
259
2.578125
3
[ "MIT" ]
permissive
class NormalizeUtils { static normalizeAnyInterval(x, min, max, a, b) { return (b - a) * ((x - min) / (max - min)) + a; } static normalize(x, min, max) { return NormalizeUtils.normalizeAnyInterval(x, min, max, 0.0, 1.0); } }
true
971a804e141ede1894144085cf01fe4fdc1dd3d1
JavaScript
cardeol/basicjsencryption
/jsenc.js
UTF-8
3,347
2.578125
3
[]
no_license
var _jse = (function() { var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var base64_encode = function(input) { input = escape(input); var output = ""; var chr1, chr2, chr3 = ""; var enc1, enc2, enc3, enc4 = ""; va...
true
ccb5c76262b397db1c01198d55bb51d3b5733041
JavaScript
MangGuoTest/MiYu
/22_files/add_version.js
UTF-8
399
2.875
3
[ "MIT" ]
permissive
//给css,js添加版本号,解决浏览器缓存问题 function add_v(type,src){ if(type == 'css'){ document.write('<link rel="stylesheet" type="text/css" href="'+ src +'?='+ parseInt(Math.random()*10000*10000) +'"/>'); }else if(type == 'js'){ document.write('<script src="'+ src +'?v='+ parseInt(Math.random()*10000*10000) +'" type="text...
true
32be342bc25e0f9a895e725bc079868e200df8dd
JavaScript
EzioMora/app-with-react-and-firebase
/src/components/User/Register/Register.js
UTF-8
4,549
2.59375
3
[]
no_license
import { useState, useContext } from "react" import { Form, Button, Container, Row } from 'react-bootstrap' import Firebase from 'firebase'; import { useHistory } from "react-router-dom"; import './Register.css' import Context from '../../Context/Context' const UserRegister = () => { let history = useHistory(); ...
true
888bc409a0869732befadd285d93ecb58efcc771
JavaScript
JavaGrinko/platformer
/sprite.js
UTF-8
951
2.8125
3
[]
no_license
class Sprite { constructor(image, config) { this.sprite = new Image(); this.sprite.src = image; this.config = config; this.lastChangeFrameTime = new Date(); this.timeChangeFrame = 50; // мс this.frameState = {}; } getFrame(type) { const typeConfig = t...
true
fe0f8731a06264b441f28914749fbc99cac42e96
JavaScript
shoutyour/arkanoid
/Assets/script/jsGameManager.js
UTF-8
1,182
2.71875
3
[]
no_license
#pragma strict var stageNum = 1; // 스테이지 번호 //-------------- //스테이지 테스트 //-------------- function Start () { MakeStage(); } //---------------- //스테이지 만들기 //---------------- function MakeStage() { //블록 시작위치 var px = -0.3; //맨 왼쪽 var pz = 0.0; //맨 위쪽 var w = 1.0; //블록 사이의 수평 간격 var h = 0.5; //블록 사이의 수직 간격 ...
true
fc8cb01a510dd7c51e3692fe7bf19fa7f290992f
JavaScript
lenayj/RIO
/src/_services/user.service.js
UTF-8
3,835
2.765625
3
[]
no_license
export const userService = { login, logout, gmaillogin, signup, outlooklogin, forgotPassword, resetPassword }; function login(usernameOrEmail, password) { const requestOptions = { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.string...
true
6219878ef5a18ffcf770b1a5492891f6044c1ee0
JavaScript
yanlinchengrui/starwars-app
/src/components/MainContainer.js
UTF-8
1,552
2.703125
3
[]
no_license
import React, { Component } from 'react'; import { Input } from 'semantic-ui-react'; import axios from 'axios'; import FilmList from '../components/Film/FilmList'; import Loader from './Loader'; import withErrorHandler from '../hoc/withErrorHandler'; class MainContainer extends Component { state = { films: [], ...
true
a45892194606f8ecb4ad67d258551fb0a50a7dda
JavaScript
CalebFaulhaber/D4JsFunctionsAndArrays
/l13ClosestNeighbor.js
UTF-8
1,996
4.03125
4
[]
no_license
const closestNeighbors = (n, a, b, c) => { let closestNumArr = []; let counter; let err = 'All 4 arguements must be numbers.'; if (n === null || a === null || b === null || c ===null) { return err; // catching if null is one of the arguments. } else if (isNaN(n+a+b+c)) { retu...
true
0753df444771aca3f037b5f4687900fb15fa6791
JavaScript
MBolger/frontend-nanodegree-arcade-game
/js/app.js
UTF-8
2,860
3.59375
4
[]
no_license
// Enemies our player must avoid var Enemy = function(x, y, speed) { "use strict"; this.sprite = 'images/enemy-bug.png'; this.x = x; this.y = y; this.speed = speed; }; // Update the enemy's position, required method for game // Parameter: dt, a time delta between ticks Enemy.prototype.update = func...
true
18cacb9911af93c9727ac343243b270235f99c23
JavaScript
EdwardLea/dev-challenge
/controllers/products.js
UTF-8
1,546
2.625
3
[]
no_license
const Product = require('../models/product') function indexRoute(req, res, next) { Product .find() .then(products => { return products.filter(product => { return product.supplier === (req.query.supplier || product.supplier) && product.product === (req.query.product || product.product)...
true
3ca4fe7cca1e47eb1ea127eee34ac0a3dd222b9b
JavaScript
jani72/CFLMS-JavaScript-Day-1-Janos-Sumon
/advanced/advanced.js
UTF-8
629
3.875
4
[]
no_license
var a = 7; var b = 14; var c = "21"; var d = '36'; var e = 42; var c = parseFloat("21") var d = parseFloat("36") var add = a+b+e+c+d; console.log(add); var f = '1'; var g = 15; var h = 8; var i = "1"; var f = parseFloat("1") var i = parseFloat("1") var multiplication = f*g*h*i; console.log(multiplication); doc...
true
96e5904fa50d4642606ade075e6f9529a919830f
JavaScript
HiromichiYamamoto/js-sample
/data.js
UTF-8
2,126
3.8125
4
[]
no_license
var n = '123xxx'; console.log(Number(n)); console.log(Number.parseFloat(n)); console.log(Number.parseInt(n)); // 配列 var ary1 = ['Sato', 'Takae', 'Osada', 'Hio', 'Saitoh', 'Sato']; var ary2 = ['Yabuki', 'Aoki', 'Moriyama', 'Yamada']; console.log(ary1.length); console.log(Array.isArray(ary1)); console.log(ary1.toString...
true
99b48f3638821691e320136605746bd056445450
JavaScript
HaakonA/HaakonWebsite
/src/components/GitHub.js
UTF-8
1,863
2.703125
3
[]
no_license
import { useEffect, useState } from "react"; import Repositories from "./Repositories" import Pagination from "./Pagination"; import axios from 'axios'; import "../App.css" import github from "../../src/github.png" const FetchCall = () => { const [mainData, setMainData] = useState([]); const [errorMessage, setEr...
true
8404686a4f856902105a43a2464a6f619eef9285
JavaScript
laurentiubondor/laurentiubondor.github.io
/MyWork/hangman/app.js
UTF-8
3,191
3.625
4
[]
no_license
class Hangman { constructor() { this.cuvinte = ["masina", "telecomanda", "telefon", "teleenciclopedie"]; // alegem cuvantul random const randomIndex = Math.floor(Math.random() * this.cuvinte.length); this.cuvantAles = this.cuvinte[randomIndex]; console.log('cuvantAles = ', this.cuvantAles); t...
true
d4768394454429aaf80ef502cf4d2ffbbc5dac51
JavaScript
ramesh922/EmployeeTask
/src/EmployeeList.js
UTF-8
9,064
2.703125
3
[]
no_license
import React, { useState } from 'react'; const data = { "data": [ { "id": 1, "name": "John", "emailId": "john@companyname.com", "aadharNumber": "3653782476", "panNumber": "R05HKI2BHY", "employeeType": "Full-Time", "joiningD...
true
44ae2c4f000aa2d47ad4eb38f88c4145d7eec784
JavaScript
thinkful-c11/fullstack-capstone-naeem-paton
/app.js
UTF-8
6,112
2.859375
3
[]
no_license
'use strict'; const appState = { availableDrivers: [], availableLoads: [] } //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// ////////////////// //////////////////////// //////////////////...
true
3fd944ff324f2dd61662ffabd3f0e5700e84a2bd
JavaScript
blam4521/todoFullStack
/to-do-frontend/todo_list/src/TodoList.js
UTF-8
1,564
2.71875
3
[]
no_license
import React from 'react'; import TodoDisplay from './TodoDisplay' class TodoList extends React.Component { render(){ // Array from App.js let todoArray = this.props.todo console.log('this is todo list in TodoComponent', this.props.todo) let taskDisplayJSX = [] ...
true
034f9537ef4f32675e0e4015e427c4d12ee2da88
JavaScript
azakost/alem-js-problems
/letter-space-number.js
UTF-8
356
3.03125
3
[]
no_license
function letterSpaceNumber(str){ const arr = [] const regexWord = /[a-zA-Z]\s\d\b/g const res = str.match(regexWord) console.log(res) if (res != null){ for(let i = 0;i<res.length;i++){ // res[i] = res[i].slice(0,res[i].length-1) } }else { const res = [] ...
true
6814146f910a4adeca577ec07f1f5a1ffe52e377
JavaScript
Renyxz/webpack-babel-2017
/src/index.js
UTF-8
245
2.609375
3
[]
no_license
// CSS import './css/styles.css'; // Test module import test from './test_module/test'; // Greeting const greeting = () => { console.log('Hello World! What is your name?'); }; greeting(); // Call test function from test module test();
true
137da445e3561ebc85cb68b360686d3acd0343ed
JavaScript
a2seo/a2seo.github.io
/java.js
UTF-8
1,126
2.703125
3
[]
no_license
var changeAboutMe = document.getElementsById("button1"); changeAboutMe.addEventListener("click", changetoface(),true); changeAboutMe.addEventListener("click", changepage(page), true); function changetoface() { document.getElementsByTagName('body')[0].style.backgroundImage="linear-gradient(0deg, rgba(25,25,25,0.4)...
true
a28b7947127311aec51012b5421dadc1fc3b3ede
JavaScript
mluxin/learning-and-exercices
/BlackJack_game.js
UTF-8
646
3.609375
4
[]
no_license
// Code goes here let suites= ["Coeurs", "Trèfles", "Piques", "Carreaux"]; let values=["Ace", "Roi","Reine","Valet", "Dix","Neuf","Huit","Sept","Six","Cinq","Quatre", "Trois","Deux","Un"]; let jeu=[]; for (let suiteIdx=0 ; suiteIdx<suites.length ; suiteIdx++) { for (let valueIdx=0 ; val...
true
af17ea641203e8321ce28bc2788a38490d71a78e
JavaScript
adarshkumarsingh83/angular_js
/AngularAsynchronousRequestExample/public/js/application.js
UTF-8
2,300
2.640625
3
[]
no_license
var application = angular.module("Application", []); application.controller('ApplicationController', [ '$scope', '$log', 'ApplicationAsyncService', function ($scope, $log, ApplicationAsyncService) { $scope.welcome = "welcome to the application "; var urlList = [ { url: 'http://localhost:3000/api/data/1' } ...
true
418ca693a5cc0ba171182a91c743184562193800
JavaScript
pgrywalski/WeatherForecast
/main.js
UTF-8
8,249
2.921875
3
[]
no_license
$( document ).ready(function() { initLocation(); updateCitis(); $(".change-temp").click(function() { if ( $(".degree").text() === "℃" ) { $(".temp").text( parseInt($(".temp").text()) * 9 / 5 + 32 ); $(".degree").html("&#8457;"); } else { $(".temp").text( celc ); $(".degree").html(...
true
6a66f180c4405b38fc3b710530f07eef47dabf2d
JavaScript
naresh-sanyasi-au3/course
/coding-challenges/week16/day04/index.js
UTF-8
614
3.671875
4
[]
no_license
function binarysearch(array,low, high, item){ if(low > high) return -1 const mid = Math.floor((low + high) / 2) if(array[mid==item]) return mid if(array[low]<=array[mid]){ if(item >= array[low] && item <= array[mid]) return binarysearch(array, low, mid-1, item) else r...
true
392e83956ee32b0c38be13fada3490030959ce03
JavaScript
jjunyjjuny/algorithm
/programmers/level_1/12903/solution.js
UTF-8
148
2.8125
3
[]
no_license
function solution(s) { const len = s.length; const mid = parseInt(len / 2); return len % 2 === 0 ? s.substr(mid - 1, 2) : s.substr(mid, 1); }
true
5211b0901a0eff88f287ccf731579b1b7a7bd0d3
JavaScript
velialiev/tictactoe-game
/js/game.js
UTF-8
2,381
3.1875
3
[]
no_license
GAME_AREA.style.maxWidth = `${AREA_SIZE * BLOCK_SIZE}px`; let isXTurn = true; let field = []; const initGameArea = () => { for (let i = 0; i < AREA_SIZE; i++) { for (let j = 0; j < AREA_SIZE; j++) { let div = document.createElement('div'); div.style.height = `${BLOCK_SIZE}px`; ...
true
2feda8190e7dc94ffc7ee248941d4a2cabe46461
JavaScript
OniOhm/TownOfTinker
/public/scripts/main.js
UTF-8
1,538
3.09375
3
[]
no_license
var StoryTag = document.getElementById('storyTag'); var storyTitle = document.getElementById('storyTitle'); var newChapterNotification =document.getElementById('newChapterNotification'); var tagNotification = document.getElementById('tag-notification'); var titleNotification = document.getElementById('title-notificatio...
true
fd6f25ffe9d25ea887d00f0e88b405e38dde8f19
JavaScript
LaraTunc/group-project-Team4
/client/src/reducers/itemDetails-reducer.js
UTF-8
964
2.734375
3
[]
no_license
const initialState = { status: 'idle', currentItem: null, error: null, } export default function itemDetailsReducer(state = initialState, action) { switch(action.type) { // action to be dispatched when item is clicked case "REQUEST_ITEM_DETAILS": { return { ....
true
4971e27add62637eeb3d5d85b9e5557650bee852
JavaScript
mayk93/College
/Web/WebProject1/culture.js
UTF-8
174
3.265625
3
[]
no_license
window.onload = myMain; function myMain() { document.getElementById('buttonC').onclick = function(){myFunction("Culture!");} } function myFunction(X) { alert(X); }
true
0f1c7b76bf73579f955706c5d6d6e86945bc0d0d
JavaScript
peteashworth/bodymen
/test/bodymen-schema.js
UTF-8
6,647
2.703125
3
[ "MIT" ]
permissive
import test from 'tape' import {Schema, Param} from '../src/' let schema = (params, options) => new Schema(params, options) test('BodymenSchema add', (t) => { let add = (...args) => schema().add('test', ...args).value() t.true(schema().add(new Param('test')), 'should add a param with instance') t.true(schema()....
true
8d69767145e9bf46372e7a80baf0a50639e0221d
JavaScript
NautiyalAmit/Twitter
/WebContent/js/PasswordValidation.js
UTF-8
2,068
3.328125
3
[]
no_license
function formValidator() { // Make quick references to our fields var password = document.getElementById('password'); var confirm_password = document.getElementById('confirm_password'); // Check each input in the order that it appears in the form! if (isPassword(password, "Please enter a valid password(A...
true
e692ec416e45042fb0162db2bcc7711c6314f232
JavaScript
devfelipereis/events-organization-app
/server/controllers/event.controller.js
UTF-8
1,412
2.9375
3
[]
no_license
import EventModel from '../models/event.model'; /** * Load event and append to req. */ function load(req, res, next, id) { EventModel.findById(id) .then(event => { req.event = event; // eslint-disable-line no-param-reassign return next(); }) .catch(e => next(e)); } /** * Get event * @ret...
true
02a5543f6ce433d8cd6265a568febd1ba0c63052
JavaScript
KC-LC101-June-21/assignment-2-scrabble-scorer-camryivory
/scrabble-scorer.js
UTF-8
4,281
3.96875
4
[]
no_license
// // Assignment Link: https://education.launchcode.org/js-independent-track/assignments/scrabble-scorer.html // // // inspired by https://exercism.io/tracks/javascript/exercises/etl/solutions/91f99a3cca9548cebe5975d7ebca6a85 const input = require("readline-sync"); const oldPointStructure = { 1: ['A', 'E', 'I', '...
true
1a311f8f3c390e87b5c2edc87e9c59d2cecce739
JavaScript
avnerdorman/HarmonyLab
/jasmine/static/jasmine-reporters/src/jasmine.teamcity_reporter.js
UTF-8
4,651
2.734375
3
[ "MIT" ]
permissive
(function() { if (! jasmine) { throw new Exception("jasmine library does not exist in global namespace!"); } /** * Basic reporter that outputs spec results to for the Teamcity build system * * Usage: * * jasmine.getEnv().addReporter(new jasmine.TeamcityReporter()); * j...
true
ffc3028d64421706cf9f4bdfc13536e552414570
JavaScript
daswer123/Level-2
/Old 2021/Learn/Pure Js/Another practice/script.js
UTF-8
2,579
3.4375
3
[]
no_license
//Пример инкапсуляции // class Car{ // constructor(price,type,name){ // this.name = name; // this._price = price; // this._type = type; // } // #windows = 4; // carInfo(){ // console.log(`Машина ${this._type} под названием ${this.name} имеет ${this.#windo...
true
013a4e3d0d762c07744eab5165975844d3854211
JavaScript
TheBugoo/Server-tpfinal-grupo9
/controllers/noticia.controller.js
UTF-8
1,326
2.59375
3
[]
no_license
const Noticia = require('../models/noticia'); const noticiaCtrl = {} noticiaCtrl.getNoticias = async (req, res) => { const noticias = await Noticia.find().populate('usuario') res.json(noticias); }; noticiaCtrl.createNoticia = async (req, res) => { const noticiacreada = new Noticia(req.body); awa...
true
99b41ac21a06e04f024454d3563da803902c96f9
JavaScript
JackRMurning/math-fun
/src/project-node/project23.js
UTF-8
631
3.09375
3
[]
no_license
const properDivisorsSum = require("../functions-node/properDivisorSum"); const limit = 28123; const checkArray = [...Array(limit)]; const abundantNumbers = checkArray.reduce((acc, curr, index) => { const divSum = properDivisorsSum.properDivisorsSum(index, checkArray); if (divSum > index) { acc.push(index); ...
true
e1a3d2fccdaa851c5e03bcaa992f20f4e515350b
JavaScript
marcllort/Car_Rental_Monorepo
/docs/assets/js/table_script.js
UTF-8
3,584
2.609375
3
[]
no_license
import {getUser, URL} from "./api_script.js"; import {token} from "./dashboard_admin_script.js"; function insertNewUser(i, resp) { var table = document.getElementById("dataTable"); var row = table.insertRow(i); var cell0 = row.insertCell(0); var cell1 = row.insertCell(1); var cell2 = row.insertCel...
true
b1fc890b09e743806c454ec29f8691f66e8bb278
JavaScript
lasong/sms-challenge
/frontend/src/components/Information.js
UTF-8
3,093
2.625
3
[]
no_license
import React, { Component } from 'react'; import ReactTable from 'react-table'; import 'react-table/react-table.css'; import DatePicker from 'react-date-picker'; import InformationApi from '../api/Information'; export default class Information extends Component { constructor(props) { super(props); this.state...
true
03b5be0b1cf0e980526393c18a501a0a3bcdd1ff
JavaScript
kakuty/fcc-url-shortener-microservice
/server.js
UTF-8
1,076
2.5625
3
[ "MIT" ]
permissive
// server.js // where your node app starts // init project var express = require('express'); var app = express(); var mongodb = require('mongodb'); var api = require('./api/url-shortener') // http://expressjs.com/en/starter/static-files.html app.use(express.static('public')); mongodb.MongoClient.connect(process.env....
true
ca5cb067a0cf30702254157b58bd8e0107c4be40
JavaScript
dSecret/PuchoTask3
/models/handleUpload.js
UTF-8
626
2.59375
3
[]
no_license
// Imports the Google Cloud client library const Storage = require('@google-cloud/storage'); // Creates a client const storage = new Storage(); /** * TODO(developer): Uncomment the following lines before running the sample. */ // const bucketName = 'Name of a bucket, e.g. my-bucket'; // const filename = 'Local file...
true
202289dc82b1971e16247f40be782ea3c9a09331
JavaScript
RyanCardoso/almanaque-brasil
/src/dataflow/modules/thunk-module.js
UTF-8
803
2.8125
3
[]
no_license
// Action Type const SAVE_THUNK = 'almanaque/trails/SAVE_THUNK'; const SELECTED_THUNK = 'almanaque/trails/SELECTED_THUNK'; // Store const initialState = { data: [], selectedThunk: undefined, }; // Reducer export default function foo(state = initialState, action) { switch (action.type) { case SAVE_THUNK: { ...
true
b8d0219dd72f7345ba0e27846b32d1ae4c9f2265
JavaScript
olliebs1/FE-Nc-Knews
/src/components/VotesComponent.jsx
UTF-8
1,052
2.515625
3
[]
no_license
import React, { Component } from 'react' import { patchVote } from '../api'; export default class VotesComponent extends Component { state = { voteLoading: false, voteChange: 0, voteError: false, } render() { const { votes, username } = this.props const { voteChange } = this.state retur...
true
853afb70576f239f3ae23a6daf3dc71b264dd096
JavaScript
aleksanderbulakh/EasyGeneratorAdditionalProject
/EasyGeneratorAdditionalProject/App/preview/models/section.js
UTF-8
642
2.6875
3
[]
no_license
define(function () { function Section(spec) { this.id = spec.id; this.title = spec.title; this.progress = 0; this.questionList = spec.questionList; this.computeProgress = function () { if (this.questionList.length === 0) { this.progress = 0; ...
true
00ea4bf0cad4796de7a55789ada58d767a053855
JavaScript
codeinearts/pi-waste
/server/__proyecto_de_referencia/controllers/News.js
UTF-8
6,356
2.984375
3
[ "MIT" ]
permissive
'use strict' const News = require('../models/News.js') function GetNews (req, res) { // Devuelve los documentos de noticias de la BD. Utiliza un modificador y parámetros para determinar qué documentos obtener. // Llamada: news/modificador?parámetros // Ejemplo: news/obtenerPorPagina?numPagina=1&numNoticiasP...
true
8dc412991721a55ae64a6a121dd2a6b3b53519f5
JavaScript
sahinzaybak/node.js-mongodb-rest-api-students-project
/api/routes/todo-select-person.js
UTF-8
2,916
2.59375
3
[]
no_license
const express = require('express'); const router = express.Router(); const mongoose = require('mongoose'); const jwt = require('jsonwebtoken'); //Web token //Models const TodoSelectPerson = require('../models/todo-select-person'); const Todo = require('../models/todo'); //Adayı Seç router.post("/", (req, res, next) =>...
true
a9a0bc94d29650e853f68b64997f34da37db9b90
JavaScript
duelgenji/fazenda
/canvas/webapp/js/cup.js
UTF-8
404
2.53125
3
[]
no_license
const ctxWidth = 1000; // 画布宽 const ctxHeight = 1000; // 画布高 /*勾勒容器轮廓*/ function createVesselPath(context) { context.beginPath(); context.moveTo(0, 0); context.lineTo(ctxWidth, 0); context.bezierCurveTo(ctxWidth, ctxHeight, ctxWidth, ctxHeight, ctxWidth / 2.0, ctxHeight); context.bezierCurveTo(0,...
true
0e2469b5232064b47336f804f2db6b5f9d0ebda2
JavaScript
florenciagaleano/CursoIngresoJS
/2-InstruccionIf/jsInstruccionIF (5).js
UTF-8
346
2.84375
3
[]
no_license
function mostrar() { var edad; edad=document.getElementById('edad').value; edad=parseInt(edad); //si al if le pongo el ! lo niego y puedo hacer el 4(con el 5 igual) if(edad>17||edad<12)//se unen con el O "||" con el Y no pq no hya num maor a 12 y menor a 17 { alert("Usted no es un adolescente"); } //tomo la ed...
true
c51e0ac6140ded2563940aab84a8df5fbeb5e282
JavaScript
iambrian7/note-app
/routes/note.js
UTF-8
2,676
2.625
3
[]
no_license
/** * Created by bkc on 12/30/2016. */ var express = require('express'); var router = express.Router(); var mongoose = require('mongoose'); var Note = require('../models/noteModel')//(mongoose); /* GET home page. */ router.get('/', function(req, res, next) { Note.find({}).sort({ dateNoteAdded : -1}).exec(function(...
true
6590c5f5a2fb06ac0daf51f4a729fb9d5330c329
JavaScript
cedced19/osm-tile-list-json
/index.js
UTF-8
3,878
3.03125
3
[ "MIT" ]
permissive
var pointInPolygon = require('point-in-polygon'); var extent = require('geojson-bbox'); var clipper = require('greiner-hormann'); var buffer = require('turf-buffer'); module.exports = function (borders, minZoom, maxZoom, onlyCorners, tileBuffer) { var result = []; var poly = { type: 'Feature', ...
true
0d0b2fb3edf77a5d88a35e867cfda1fbd894aab0
JavaScript
Practice4/Demo
/小练习/js/bldwq.js
GB18030
1,649
3.1875
3
[]
no_license
/** * Created by admin on 2016/5/15. */ //1.ͼƬֲ һ»һ //2.СͼƬʹͼƬһֲ ͼƬ͵ҼͷЧһ //3.ܹͼƬһҹ ϵʱһֹͣ $(function () { //1.һ´ͼƬתһ $('.bld-bigImg').click(function () { $('.bld-bigImg ul').append($('.bld-bigImg ul li:first')); $('.centerImg ul').append($('.centerImg ul li:first')); }); //Ҽ...
true
a06e25d9ee3563f06f9cdb215f65222d6eccb564
JavaScript
inotakuya/CustomerModel
/VaggieMarketApp/js/site/spec/ModelSpec.js
UTF-8
635
2.90625
3
[ "MIT" ]
permissive
describe("モデルテスト", function() { it("spec1", function() { var blog = new Blog(); expect(blog.has('title')).toBeTruthy(); expect(blog.get('message')).toBe('なし'); expect(blog.get('aaa')).toBeUndefined(); }); it("spec2", function() { var blog = new Blog({title:'abc',message:'def'}); expect(blog.get('title...
true