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
724f36218f2c60ac2a7d82de4baa83a23750a868
JavaScript
smalldatatech/dockerize-it-sample
/src/index.js
UTF-8
1,768
2.90625
3
[ "MIT" ]
permissive
/** * A basic web application that listens on port 8080. * * - GET / queries the database for 1+1 and returns the result * along with the listing of all items in the user's home directory. */ const express = require("express"); const mysql = require("mysql2"); const fs = require("fs"); const homedir = require("os...
true
7583e84d21728da70fe3c689633a3a0d729c465d
JavaScript
Brann4/mercado21-web-laravel
/public/assets/js/app.js
UTF-8
7,949
2.609375
3
[ "MIT" ]
permissive
(function($) { 'use strict'; // Preloader jQuery(window).on('load', function() { $('.preloader').fadeOut(); }); // Header Sticky $(window).on('scroll',function() { if ($(this).scrollTop() > 120){ $('.navbar-area').addClass("is-sticky"); } else{ $('...
true
41858f9ec5b5ce346f588026bd2200a6a8e87d17
JavaScript
israel-vlara89/javaScriptExercises
/executionContext/script.js
UTF-8
1,102
3.40625
3
[]
no_license
/* function b(){ console.log("this is b"); } function a(){ console.log("function a"); b(); } a(); */ /* function a(){//2 b(); //3 var c;//6 } function b(){//4 var d;//5 } a(); //1 var d;//7 */ function b(one, two){ //8 var myVar; //9 console.log(myVar); //10 one = one; ...
true
359b3fc5d07b5a6782acb485b85b3ecf0d618a6d
JavaScript
akhnos/TD_Web_Framework
/documentation/docMain.js
UTF-8
319
2.796875
3
[]
no_license
function changeVisibility(divId){ var divObj = $("#" + divId) if(divObj.hasClass("non-visible")) divObj.removeClass("non-visible"); else divObj.addClass("non-visible"); } function ajaxCall(ajaxFile,ajaxDivId){ $.ajax({ url: ajaxFile, success:function (data) { $('#' + ajaxDivId).html(data); } }); };
true
7dbdf5a1f4b8e673487746ef2859feee5e98f947
JavaScript
kippo/fringe-v2
/app/frontend/javascripts/react/pagination/pagination.jsx
UTF-8
1,020
2.609375
3
[]
no_license
import React from "react"; export default class Pagination extends React.Component { constructor(props){ super(props); } setPage = (e) => { e.target.value > 1 ? this.props.filterStrings(e) : this.props.clearFilterType(e.target.name); } createPages = () => { let totalPages = Math.ceil(this.props...
true
ef52b4ebec77468d0ce62a380ad7a92781f7242a
JavaScript
c-j-j/simple-react-todo-list
/app/components/App.jsx
UTF-8
1,182
2.875
3
[]
no_license
import React from 'react'; import AddItem from './AddItem' import TodoItem from './TodoItem' export default class App extends React.Component { constructor(props) { super(props); this.state = {items: [ {id: 1, message: "Hello", checked: false}, ...
true
d78630fdac46ee310d7a126bfbdb229d753e7543
JavaScript
milkmidi/ex6_helloworld
/06-classes-constructor.js
UTF-8
798
3.46875
3
[]
no_license
console.log('06-classes-constructor') class Animal { constructor(name){ this.name = name; } cry(){ console.log(this.name + 'Animal cry') } sleep(){ console.log(this.name + 'Animal sleep'); } } class Cat extends Animal { constructor(name){ super(name); } cry(){ console.log(this.name...
true
4ba5ea3702b4cee880a9ab62883fd09fc66e146a
JavaScript
danielabar/es6-pluralsight
/test/templateLiteralSpec.js
UTF-8
1,248
3.65625
4
[]
no_license
describe('Template literals', () => { 'use strict'; it('Combine literals and data', () => { let doWork = function(name) { return `Hello, ${name}`; }; let result = doWork('Scott'); expect(result).toEqual('Hello, Scott'); }); it('Can help build URLs', () => { let category = 'music', ...
true
962304a4bd417aa4c1e4edfa524e3e4e137cab87
JavaScript
ammarkh/gridyJs
/gridy.js
UTF-8
14,148
2.515625
3
[]
no_license
/** * this module represent familiar grid for use we name it [gridy] * in this version 2.0. gridy will contains data with minmum operation * we will work to make gridy have a new features step by step . * GRIDY DEVELOPEMENT TEAM 2019. * for any question please contact us on a.m.k-it@hotmail.com */ (function(win...
true
f39777f1c23bffef03df65784adafc9c797ef5d0
JavaScript
Cristfe/RestApiEmpresas
/models/empleado.js
UTF-8
2,338
2.53125
3
[]
no_license
const dbConfig = require("../dbConfig") const getAllCb = (callback) => { db.query('SELECT * FROM empleados', callback); } const getAll = () => { return new Promise((resolve, reject) => { db.query('SELECT * FROM empleados', (err, rows) => { if (err) { reject(err); ...
true
84fed2f7e2847b32b2cc693c5ae94555743dd34c
JavaScript
jpmbvistro/codewars
/katas/kyu7/4-13-2021-0.js
UTF-8
379
3.265625
3
[]
no_license
/******************************************************* =======================Codewars========================= Odd or Even? https://www.codewars.com/kata/5949481f86420f59480000e7/ ********************************************************/ function oddOrEven(array) { if(array.length===0) return 'even' return arra...
true
03946457661810584c3543abd4073f21519b2d7f
JavaScript
jwaltrip/js-cheats
/src/components/Post/PostForm.js
UTF-8
2,139
3.0625
3
[]
no_license
import React, { Component } from 'react'; import PropTypes from 'prop-types'; // should format the information in form class PostForm extends Component { state = { title: '', body: '' }; handleInputChange = e => { this.setState({ [e.target.name]: e.target.value }); }; handleSubmit =...
true
ac5b0ad510f98769371b6d52b0f6f6c83d170e95
JavaScript
cullman1/phpsqlbook
/code/js/search.js
UTF-8
925
2.53125
3
[]
no_license
$(function () { $("#next").on("focus", Submit_Search); }); function Submit_Search() { var formData = new FormData($('form')[0]); var email = document.getElementById("email").value; $.ajax({ url: 'get-users.php?email=' + email, type: 'GET', xhr: function () { v...
true
18f3b83e305dcd56f12291bad538540739f35d1e
JavaScript
jagaa1103/TimeZoneApp
/TimezoneApp/App.js
UTF-8
3,394
2.546875
3
[]
no_license
import React, { useState } from 'react'; import { SafeAreaView, StyleSheet, ScrollView, TextInput, View, Text, StatusBar, TouchableOpacity, } from 'react-native'; import { getTimezone } from "./service/apiService"; import TimeView from "./components/TimeView"; const App = () => { const [timeObj, set...
true
8c8d53e84a87346df75485ae4c63f05953acf5d4
JavaScript
mvpdw06/Fulx_ReactFunctionPass
/Scripts/stores/AppStore.js
UTF-8
1,033
2.65625
3
[]
no_license
const { ActionTypes, AppDispatcher } = window.App; // emmit define the event you need. const CHANGE_EVENT = 'CHANGE'; // emmit object (to handle events). const _emitter = new EventEmitter(); // stroe actul list. let _list = []; const _deleteTodo = (list, id) => { let toDeleteIndex = list.findIndex...
true
b5364d18742e1e928f4b3b00fd9ff312b91dfaab
JavaScript
sahejseli/sahejseli.github.io
/js/js.js
UTF-8
1,603
2.609375
3
[]
no_license
function scrollFunction() { document.body.scrollTop > 100 || document.documentElement.scrollTop > 100 ? document.getElementById("myBtn").style.display = "block" : document.getElementById("myBtn").style.display = "none" } function topFunction() { document.body.scrollTop = 0, document.documentElement.scrollTop = 0 } ...
true
69898e55b7ff2390439294dc4bf97579a4bcb0be
JavaScript
manvu/study-english
/server/config/res.js
UTF-8
1,984
3
3
[]
no_license
/** * Send content of response that has a default success status code of 200 * @param {*} response content of response that has a default success status code of 200 */ function send200(response) { return { error: null, statusCode: 200, response: response, }; } /** * Send content of response that ...
true
0e637fe363ba992d2e17a45b58b9c62339ec2d58
JavaScript
RenataMie/React-weather-app
/src/components/Forecast.jsx
UTF-8
1,194
2.953125
3
[]
no_license
import React, { useState } from 'react'; import WeatherOutput from "./WeatherOutput"; const Forecast = () => { let [city, setCity] = useState(''); const [apiData, setApiData] = useState({}); const apiKey = process.env.REACT_APP_API_KEY; const apiUrl =`https://api.openweathermap.org/data/2.5/weather?q=${cit...
true
5ccd429a5a050318ec6fa0fbd86e63b787e4a8b9
JavaScript
avnighael/Web-Development
/assignment/services/page.service.server.js
UTF-8
2,074
2.6875
3
[]
no_license
var app = require('../../express'); var pageModel = require('../models/page/page.model.server'); app.get("/api/assignment/website/:websiteId/page",findPageByWebsiteId); app.get("/api/assignment/page/:pageId",findPageById); app.post("/api/assignment/website/:websiteId/page",createPage); app.put("/api/assignment/page/:p...
true
e42a4177ffea7ee4991de0f6b470c72b84cfbf70
JavaScript
philholden/song-fit
/scripts/measureString.js
UTF-8
778
2.71875
3
[]
no_license
'use strict'; var canvasGetBounds = require('./canvasGetBounds'); function measureString(text, canvas, fontSize, font) { var ctx = canvas.getContext('2d'); var b; fontSize = fontSize || 15; font = font || 'Helvetica, Arial, Sans-Serif'; ctx.font = fontSize + 'px ' + font; canvas.width = ctx.measureText(te...
true
9529fcecb17b0a65ac0530e4500be63dc083cf5b
JavaScript
DmitriVanGuard/js-games
/tile-games-udemy/racing/js/Input.js
UTF-8
1,318
3.0625
3
[]
no_license
const KEY_LEFT_ARROW = 37, KEY_UP_ARROW = 38, KEY_RIGHT_ARROW = 39, KEY_DOWN_ARROW = 40; const KEY_A = 65, KEY_W = 87, KEY_D = 68, KEY_S = 83; let mouseX = 0, mouseY = 0, trackIndexUnderMouse = 0; function setupInput() { canvas.addEventListener('mousemove', updateMousePos); document.addEventListener('keydown', key...
true
92f27e1998087cc401feda8c9269d952bd4730bc
JavaScript
tomdanvers/HOTMK
/src/js/TimeOfDay.js
UTF-8
2,423
2.90625
3
[]
no_license
import * as PIXI from 'pixi.js'; import ValueMinMax from './utils/ValueMinMax'; export default class TimeOfDay { constructor() { this.time = 8; this.count = 0; this.dayStartHour = 7; this.dayCount = 0; } update(timeDelta, world) { this.count ++; // thi...
true
5a49072957b1e7a55b8b0a3a5cee2a3d3db05439
JavaScript
salenju/react-demos
/src/EventEmitter/index.js
UTF-8
1,397
3.453125
3
[]
no_license
class eventEmitter { constructor() { // eventMap用来存储事件和监听函数之间的对应关系 this.eventMap = {} } // 订阅事件 on(type, handler) { /** * @param {String} type 事件名称 * @param {Function} handler 事件名对应的需要触发的函数 */ if (!handler instanceof Function) { throw new Error('请传入一个函数') } /...
true
2b9f94ecd79d269bcefc0e2e21d7fc31f99d1b52
JavaScript
gabrielliwerant/warner-bros-code-challenge
/src/users.js
UTF-8
3,869
3.09375
3
[]
no_license
const TODOS_BY_USER_ID_URL = 'https://jsonplaceholder.typicode.com/todos?userId'; /** * handleActiveUiStatusForUser * * Handles the toggling of the active status on the user for display purposes * * @param {array} users * @param {DOM Element} userEl * @return {void} */ const handleActiveUiStatusForU...
true
fd433b28add9c6786e316bc8181f69012def004c
JavaScript
fuyurou/weapp
/fullpage/common.js
UTF-8
3,238
3.03125
3
[ "MIT" ]
permissive
class PureFullPage{ // options插件的配置 constructor(options){ // 留下属性的定义 // 1.构造函数内部手动计算page的高度 // #pureFullPage高度? // this.pages const defaultOptions={ isShowNav:true, delay:1000, // 每次turnpage callback definePages:()=>{} } this.options=Object.assign(def...
true
9ef6383393403c2a632df24efa59cdcc7d7bae62
JavaScript
biosemantics/oto
/oto/src/main/webapp/js/bioportal.js
UTF-8
8,286
2.515625
3
[ "Apache-2.0" ]
permissive
/*js for bioportal interface*/ var defaultOlsURL = "http://www.ebi.ac.uk/ontology-lookup/"; var poroURL = "http://purl.bioontology.org/ontology/PORO"; var OLSURL = "http://www.ebi.ac.uk/ontology-lookup/"; /** * append scrollTop as a parameter of the url * @param term * @param location */ function updateURL(term,...
true
46c9097f7adda80277ae73a13d7ed39ab0e6d9da
JavaScript
isalasg/holanode1
/app.js
UTF-8
794
2.640625
3
[]
no_license
'use strict'; const express = require('express'); const bodyParser = require('body-parser'); const path = require('path'); const http = require('http'); const PORT = 8080; const HOSTNAME = '0.0.0.0'; var app = express(); app.get('/',(request,response) => { app.use(bodyParser.json()); response.send('<h1 style="color:...
true
127159e4d7c3d6ee03d3fa44345a6482e085e3e2
JavaScript
webrameshyadav/JavaScript
/Defination.js
UTF-8
1,555
3.4375
3
[]
no_license
/*A polyfill is a piece of code (usually JavaScript on the Web) used to provide modern functionality on older browsers that do not natively support it. -------- Webpack is a tool that lets you compile JavaScript modules, also known as module bundler. Given a large number of files, it generates a single file (or a few...
true
105b929c671dc42cbd76dba5733ccc09d98fd1af
JavaScript
Phoen1x84/LabelAnimation
/scripts/app.js
UTF-8
838
3.03125
3
[ "MIT" ]
permissive
// add class to html document.querySelector('html').classList.add('js'); // smart wrapper querySelectorAll var elSelect = function ( elem ) { return document.querySelectorAll( elem ); }; // smart wrapper for each function forEachItem(selector, fn){ var elements = elSelect(selector); for (var i = 0; i < eleme...
true
41654d4d05b66e5a3d7bc4c370058661f05fab35
JavaScript
UnderTheKnife/JavaScript
/lessons/lesson_5/js/block_3.js
UTF-8
1,648
3.703125
4
[]
no_license
let numTask1 = 0; let numTask2 = 0; function task1() { const obj = { green: 'зеленый', red: 'красный', blue: 'голубой' }; let key; numTask1++; if (numTask1 % 2 !== 0) { document.getElementById('result1').style.display = 'block'; for (key in obj) { document.getElementById('result1...
true
a04c6e9f0a027574d7ae11680fae1d9228ab3a52
JavaScript
jonathanh21/Country_app
/client/src/containers/Main/components/Paged/Paged.jsx
UTF-8
2,105
2.65625
3
[]
no_license
import React, { useState, useEffect } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { configPaged } from "./utils"; import { getCountriesFromPage } from "../../../../redux/actions"; import s from './Paged.module.css'; export default function Paged () { const [activePage, setActivePag...
true
2fb18ed6f18ceabb4b627d0c9fa20ec96ed65d0e
JavaScript
mattalanhoward/Superman
/scripts/gameover.js
UTF-8
1,887
3.265625
3
[]
no_license
window.onload = function () { //play intro music let usedToPlay = new Audio("sound/Used to play.mp3") usedToPlay.play(); let endTheme = new Audio("sound/End Theme.mp3") endTheme.play(); endTheme.volume = 0.4; //get playAgain button let playAgain = document.getElementById("playAgain...
true
634d708cc03e9fd0b8e80e4ae47d6d64c6f944cb
JavaScript
ameyay98/DataViz6
/ScatteredPlotMatrix.js
UTF-8
3,540
2.921875
3
[]
no_license
// Reference - https://observablehq.com/@d3/scatterplot-matrix const margin = { top: 100, bottom: 40, left: 150, right: 20 }; const width = 1200; const height = 750; const padding = 20; const svg = d3.select("body") .append("svg") .attr("viewBox", `${-padding} 0 ${width} ${width}`) .style("max-width", "10...
true
d32d9026bbf6c20a23188409c691a83454df0e18
JavaScript
wspecs/guitarics-chordify
/dist/test/chord.js
UTF-8
2,421
2.703125
3
[ "MIT" ]
permissive
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var chord_1 = require("../lib/chord"); var chai_1 = require("chai"); describe('Chord class', function () { var chord; beforeEach(function () { chord = new chord_1.Chord('Cm7'); }); it('initializes', function () { ...
true
dc8ba67753769e621521f29af886f30dd5c3d76f
JavaScript
Roseakhonya/Pizza-Express
/js/index.js
UTF-8
1,516
3.171875
3
[ "MIT" ]
permissive
// var size = ["Small", "Medium", "Large"]; // var crust = [ // "Cheese-Stuffed Crust", // "Pizza Bagels", // "Neapolitan Crust", // "NY Style Pizza" // ]; // var topping = ["Pepperoni", "Onions", "Mushroom", "Extra cheese"]; // this.size = size; // this.crust = crust; // this.t...
true
b7b4134f8a07a94ba7725d6168d938a3a48406a4
JavaScript
mattowc/map-hx
/hx-maps.js
UTF-8
8,601
3.03125
3
[]
no_license
/** * Used to generate a google map showing all the points and * relevant info in Alaska. * * @author Jonathon McDonald <jon@onewebcentric.com> * @date 01/11/2013 */ var map; // Represents the map object itself var infowindow; // Represents the infowindow that will be displayed on marker...
true
18e9db5f652259597be37ad92d89342a329469eb
JavaScript
chd-cli/2020
/数据结构与算法/3-排序算法/比较/快速排序.js
UTF-8
1,129
3.859375
4
[]
no_license
/* 快速排序 类似合并排序 相同点(分治策略) 1.都会先拆解问题 2.然后分别处理 3.平均执行时间O(nlgn) 不同点 1.快速排序空间复杂度是O(1) 2.快速排序常数时间更少 3.合并排序更适合并发环境 */ function swap(A, i, j) { let tmp = A[i]; A[i] = A[j]; A[j] = tmp; } function partition(A, lo, hi) { const pivot = A...
true
1748eeb52a26c71e28f3d3e0f3c41272b6458dbc
JavaScript
vincentscotto/vincentscotto
/js/main.js
UTF-8
495
2.65625
3
[ "MIT" ]
permissive
window.addEventListener("load", function() { var loader = document.getElementById("loader"); var content = document.getElementById("content"); loader.style.display = "none"; content.style.opacity = "1"; }); document.addEventListener('DOMContentLoaded', () => { const darkModeSwitch = document.querySelector('.dar...
true
d7b3c3cc9446c8789a0c83fe5a2159b7910d9b31
JavaScript
Jocs/LeetCode-js
/120.三角形最小路径和.js
UTF-8
1,619
3.40625
3
[ "MIT" ]
permissive
/* * @lc app=leetcode.cn id=120 lang=javascript * * [120] 三角形最小路径和 * * https://leetcode-cn.com/problems/triangle/description/ * * algorithms * Medium (60.21%) * Likes: 194 * Dislikes: 0 * Total Accepted: 18.3K * Total Submissions: 29.9K * Testcase Example: '[[2],[3,4],[6,5,7],[4,1,8,3]]' * * 给定一个三...
true
08d5a60dbc477c6cd96046860ca672ea0224e563
JavaScript
obi3965/mern-Stack
/server/controllers/userController.js
UTF-8
2,089
2.921875
3
[]
no_license
const User = require('../models/User') const bcrypt = require('bcrypt') exports.createUser = async (req,res)=>{ try { const { email, firstName, lastName, password } = req.body const existentUser = await User.findOne({ email }) if (!existentUser) { const hashPassword = await b...
true
94d5e7a4a39e1943d43972493640fe911b08ea86
JavaScript
kph32/Food
/assets/js/shopCoupon.js
UTF-8
967
2.671875
3
[ "MIT" ]
permissive
function $id(id){ return document.getElementById(id); } function checkCoupon() { var xhr = new XMLHttpRequest(); xhr.onreadystatechange=function(){ if(xhr.readyState==4){ if(xhr.status==200){ //showCoupon(xhr.responseText); alert("成功參加本活動"); }else{ alert(xhr.status); } } } if($id("ShopAre...
true
828f9136bdacc329bb654c5a0f1dff7a5369f82b
JavaScript
arsikdar/hexagon-batch1
/JS/ES6-learn/new-syntax/obj-literal-enhancement.js
UTF-8
702
3.578125
4
[]
no_license
// let person = { // name: 'Nag', // sayName: function () { // } // }; // or // let person = { // name: 'Nag', // sayName() { // //... // } // }; //-------------------------------------- // var name = "Nag"; // var age = 32; // var sayName = function () { }; // let p...
true
e7876a909b2adf73b5c5b4d0835178c31dbf10f0
JavaScript
jrohatiner/react-ToDo
/js/index.js
UTF-8
4,577
2.5625
3
[]
no_license
function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}class ToDoApp extends React.Component { constructor(props) { super(props);_defineProperty(this, "undoItem", ...
true
8727824a88beadc3eb754a4f0ba13dc3b5ab57c3
JavaScript
emr550m/azurenodejsapp
/src/web/state/reducers/login/index.js
UTF-8
422
2.703125
3
[]
no_license
const INITIAL_STATE = { username: '', password: '' }; export default function login(state = INITIAL_STATE, action){ switch (action.type) { case 'UPDATE_USERNAME': return Object.assign({}, state, { username: action.payload.username }); break; case 'UPDATE_PASSWORD': return Object.assign(...
true
4ebee83dcf78d6e5f07fc456afdf2a7cbf1473ed
JavaScript
MatheusRmelo/RNAV5
/src/pages/ReceitaScreen.js
UTF-8
1,743
2.640625
3
[]
no_license
import React, { useState, useLayoutEffect, useEffect } from 'react' import { Text, Button, StyleSheet, SafeAreaView, TextInput, FlatList } from 'react-native' import { useNavigation } from '@react-navigation/native' export default () => { const [ name, setName ] = useState('') const [ items, setItems ] = useSt...
true
d30a8a3da66bbba58f5c8e66208f529929264b28
JavaScript
TimIrwing/problems
/checkio/Scientific Expedition/pawn_brotherhood.js
UTF-8
1,300
2.71875
3
[]
no_license
#!/usr/bin/env checkio --domain=js run pawn-brotherhood `use strict`; function safePawns(data) { let safe = 0; for (const entry of data) { if (isCapturable(data, entry)) ++safe; } return safe; function isCapturable(data, str) { const letters = [`a`, `b`, `c`, `d`, `e`, `f`, `g`, `h`]; return ...
true
12ce27fbe9b7f84b4ad4437798adb472639a33de
JavaScript
allankildare/30sites-30dias
/Contador de vogais/script.js
UTF-8
744
3.390625
3
[]
no_license
document.getElementById("resultado").addEventListener('click', texto => { texto = document.getElementById("texto").value // pega texto do input // array com variadas formas de escrever as vogais var vogais = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U', 'á', 'é', 'í', 'ó', 'ú', 'Á',...
true
7cd7fce8ac12c1f1cd9ef03363081a547912573c
JavaScript
shigasy/TypeScript
/function/total.js
UTF-8
364
3.0625
3
[]
no_license
function total() { var item = []; for (var _i = 0; _i < arguments.length; _i++) { item[_i] = arguments[_i]; } var re = 0; for (var i = 0; i < item.length; i++) { re += item[i]; } return re; } function Total() { var msg = document.querySelector('#msg3'); // @ts-ignore ...
true
4375c5c13030f37dd9a54bc122f7a070ee4f42d4
JavaScript
restuie/file-upload-folder
/serverproject/controllers/fileuploaderController.js
UTF-8
2,224
3.015625
3
[]
no_license
'use strict' const SingleFile = require('../models/singlefile') const MultipleFile = require('../models/multiplefile') const singleFileUpload = async (req,res,next) =>{ try{ const file = new SingleFile({ fileName: req.file.originalname, filePath: req.file.path, fileType: ...
true
ab20fdd52b3487c081d140a711c30af00cc320d0
JavaScript
plinck/GATechClasswork
/11-js-constructors/01-Activities/03-CharacterCreate/index.js
UTF-8
2,191
3.828125
4
[]
no_license
'use strict'; // weeird syntax but this is the ctor let Character = function (name, profession="Stripper", gender="Male", age=53, strength=20, hitPoints=50) { this.name = name; this.profession = profession; this.gender = gender; this.age = age; this.strength = strength; this.hitPoints = hitPoin...
true
7b32bab716de26c9bd07e225388f4b8352a40dd2
JavaScript
ivannavargas/ALEATORIOS
/programa.js
UTF-8
278
3
3
[]
no_license
function numeroAleatorio(min, max) { var a; //covertir el valor de x a un entero a=document.getElementById("a").value; min=Math.random()*a; min=Math.round(min); console.log(min); }
true
867db7464ee27ce3562245ed0d7b83a5abe949df
JavaScript
chayezo/algorithm
/toy/01_orderOfPresentation.js
UTF-8
6,564
3.53125
4
[]
no_license
const orderOfPresentation = (n, k) => { const results = []; const pool = []; for (let i = 1; i <= n; i++) { pool.push(i); } const backTrack = (args, tempArr) => { if (tempArr.length === pool.length) { results.push([...tempArr]); } args.forEach(arg => { ...
true
5fb1a1caada58700ea2430af8c4926115e156997
JavaScript
rnieva/ThingsLostAndFound
/ThingsLostAndFound/Scripts/mapShowMarkersLO.js
UTF-8
2,831
2.5625
3
[]
no_license
// show the markers with popup with Details and Contact links //var map; //var marker; function showMarkersLO(objectList) { var bounds = new google.maps.LatLngBounds(); var la2 = []; var lo2 = []; var info2 = []; var titles2 = []; var infohtml2; var index; for (index = 0; index < object...
true
070661a6e284fe10d24eac3bf763326f4fc2ffbc
JavaScript
Cetzcher/jsSync
/lib/ImperativeSync.js
UTF-8
2,276
2.640625
3
[]
no_license
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.declareSyncable = declareSyncable; var _ = require("."); var _2 = _interopRequireDefault(_); var _Sync = require("./Sync"); var _SyncProvider = require("./SyncProvider"); var _SyncDecorators = require("./SyncDecorators"); fu...
true
c407897272dccdbb0bf9205f1f3a7ad1a0cf312a
JavaScript
shay-d16/JavaScript-Projects
/Basic JavaScript Projects/Project2_funtions/JS/main.js
UTF-8
189
2.71875
3
[]
no_license
function shaysFunction() { var sentence = "This is what I've been learning"; sentence += " in JavaScript so far!"; document.getElementById("Concatenate").innerHTML = sentence; }
true
f8d69ca372d2c24d29684f6e2f1f0d1671b3e31f
JavaScript
cg671344/springsecurity
/src/main/webapp/common/lib/jquery/time/SelectDate.js
UTF-8
1,124
2.84375
3
[ "MIT" ]
permissive
function BindDateTime(Yearid,Monthid,Dayid) { var minYear = new Date().getFullYear()-5; //最小年 var maxYear = new Date().getFullYear(); //最大年 for(minYear;minYear<=maxYear;minYear++) { $("#"+Yearid).addOption(minYear,minYear); } for(var m=1;m<=12;m++) { $("#"+Monthid).addOption...
true
b53b8f234779e7c81d5928115bfca5be64da7c6d
JavaScript
DeanSami/calProject
/calServ/controllers/UsersController.js
UTF-8
6,188
2.71875
3
[]
no_license
const express = require('express'); const jwt = require('jsonwebtoken'); const fs = require('fs'); const User = require('../models/User'); const Event = require('../models/Event'); module.exports = (app) => { // REGISTER POST - checks validity of username input and if valid put them to DB app.post('/register...
true
9bb9de96e08c0730ea4b36ddedd0ca11a3eb87f1
JavaScript
cwleonard/comic
/public/js/dos.js
UTF-8
8,227
2.828125
3
[]
no_license
//consle.js var ctx = null; var theCanvas = null; var lineHeight = 20; var widthOffset = 2; var cursorWidth = 8; var cursorHeight = 3; var fontColor = "#C0C0C0"; var outputFont = '12pt Consolas'; //var outputFont = '12pt Tahoma'; //var outputFont = '9pt Courier New'; var charWidth; var allUserCmds = [ ]; // array of...
true
a037f5f76d13a8994bfafed575b5b71a0cc589ab
JavaScript
jpitman1010/JavaScriptMasteryWithMosh
/es6-tooling/build/index.js
UTF-8
865
3.21875
3
[]
no_license
"use strict"; var x = 1; //use babel to convert to code everyone can understand. //go to package.json and delete 'tests' under the Scripts object and change it to: // "babel": "babel --presets env index.js -o build/index.js" //next add a 'build' folder to the es6-tooling so we don't get an error //next run it ...
true
f05f47c29ed0a1d9e3787fb807530df28c7ecd3e
JavaScript
simjieun/jest-study
/fn.test.js
UTF-8
1,930
3.484375
3
[]
no_license
const fn = require('./fn'); test('1은 1이야', () => { expect(1).toBe(1); }); test('2 더하기 3은 5야.', ()=>{ expect(fn.add(2,3)).toBe(5); }); test('2 더하기 3은 5야.', ()=>{ expect(fn.add(2,3)).toEqual(5); }); test('3 더하기 3은 5아니야.', () => { expect(fn.add(3,3)).not.toBe(5); }); test('이름과 나이를 전달받아서 객체를 반환해줘', ()=>{...
true
f491252e8bc36cac068c6a7a1e51021e370ec10b
JavaScript
envirocycling/efi-wp_outgoing
/assets/vue/outgoing.js
UTF-8
4,940
2.515625
3
[ "MIT" ]
permissive
// ----------------------- App components ----------------------------------------- /** Outgoing List compoenent */ var OutgoingList = Vue.component('outgoing-list', { props: ['outgoings', 'isLoading'], template: ` <div class="row"> <div class="col-md-12"> <t...
true
ae9fff310f0f9c07fe1372684f15ccc8c6a546b8
JavaScript
lfb0801/http-cats
/script.js
UTF-8
378
3.3125
3
[]
no_license
// Get the input field var input = document.getElementById("myInput"); input.addEventListener("keyup", function (event) { var code = document.getElementById("myInput").value; if (isFinite(code) && code.length == 3) { if (event.which == 13 || event.keyCode == 13) { // enter is pressed win...
true
1ec3f27cf5407d41d4102e5e38acd81b7a2fce9d
JavaScript
niqore/WebRichPresence
/webextension/scripts/video-iframe.js
UTF-8
1,272
2.703125
3
[ "MIT" ]
permissive
var interval = 1; document.vTitle = "???"; document.episode = "???"; document.module = ""; document.moduleConnected = false; window.addEventListener('message', event => { console.log(event); if (event.origin === get_website_origin()) { return; } if (event.data.module != undefined) { document.vTitle = event.dat...
true
1668a481be6835fa49c10cd40935e3bd1293ece0
JavaScript
DEAM0/Discord-Bot-GDPS
/botfiles/cmds/levelweekly.js
UTF-8
2,674
2.59375
3
[ "MIT" ]
permissive
const Discord = require ("discord.js"); const fetch = require ("snekfetch"); const M = require ("../setup.json"); module.exports.run = async (client, msg, args) => { let sms = await msg.channel.send ("Searching, Please wait"); fetch.get ( M.host + '/bot/api/dailylevel.php?type=1').then( B => { console.log (B.body)...
true
84f8ead56a2e1c18954f3564cfb953a7d6754e75
JavaScript
anikeevnikolay/intelligentHouse
/web/js/sessions.js
UTF-8
1,543
3.125
3
[]
no_license
function setAllCheckboxes(checkbox) { var arr = document.getElementsByClassName("session-checkbox"); for (var i = 0; i < arr.length; i++) { arr[i].checked = checkbox.checked; selectString(arr[i]); } } function checkAllCheckboxes() { var arr = document.getElementsByClassName("session-che...
true
b0e3573769856b23f4a85fe2f0dcc51c4d3e05b4
JavaScript
dominictarr/query-stream
/index.js
UTF-8
1,292
2.59375
3
[ "MIT" ]
permissive
var through = require('through') module.exports = function (request, init) { var self, requests = 0, ended = false, max = -1, stream = null function cleanup() { ended = true } return self = through (function (data) { //each chunk calls the request. var args = Array.isArray(data) ? data.concat(n...
true
391368d02718ad9f91e5222a42d914f2d83f78c9
JavaScript
gervieb/cheeky-chic-MERN-app
/server/middlewares/isLoggedIn.js
UTF-8
563
2.546875
3
[]
no_license
const jwt = require('jsonwebtoken'); config = require('../config'); const isLoggedIn =(req, res, next)=> { const token = req.headers.authorization if (token) { try { const decoded = jwt.verify(JSON.parse(token), config.secret) req.token = token req....
true
21e58ca3d6f5d2cd5e3a5bf035a624ea35e0f481
JavaScript
hughmikem22/Test-CHallenge
/src/util/testUtils.js
UTF-8
1,319
3.140625
3
[ "MIT" ]
permissive
const ranks = require('../constants/Ranks'); const suits = require('../constants/Suits'); const rankKeys = Object.keys(ranks); const suitKeys = Object.keys(suits); // We use a class to allow the testing of calls to internal functions class testUtils { /** * Get a random number inside the inclusive ran...
true
4b67fc253659bcae79b83cbcebd8843be5977c86
JavaScript
rafaeldarevalo/javascript_0_a_100
/funcionesAnonimas.js
UTF-8
768
4.25
4
[]
no_license
// DECLARACIÓN DE UNA FUNCIÒN ANÓNIMA // (function(){}) (function(){ var a = 10; // SE PROTEJE EL VALOR DE LA VARIABLE A console.log(a); function cambiarA (){ a = 20; // SE PROTEJE EL VALOR DE LA VARIABLE A } cambiarA(); console.log(a); })(); (function(){ var a = 30; // SE PROTEJE ...
true
8d1f1e65df25d7bcae9e8371c5e4588f08368fa1
JavaScript
joeyoun9/jscolormesh
/src/core/figure.js
UTF-8
803
3.28125
3
[]
no_license
function Fig(element_id) { // initialize a figure object!!! // uses Jquery! // additional methods will be added on later // only one possible axis instance - so we do not care // now figure out how to plot! this.ctx=document.getElementById(element_id).getContext("2d"); // get container width/height this.x_...
true
34f5d7ed42f4f1304776c7deb811a63aa91cfdbc
JavaScript
tarageorge26/USTGlobal-HTD-Generic-24jul19--TARAGEORGE-
/java_script_prog/window methods/window.js
UTF-8
339
3.078125
3
[]
no_license
alert("hello"); window.alert("hello world");//if we want some pop up messgae in the browser we use alert let isadult=confirm("are you adult?");//has ok and cancel console.log("is adult " ,isadult); let name=prompt("whats ya name?");//shows an input box to take data from user console.log(name); //window.open('url');/...
true
dac0601996c582dd7dd88103334153ce61c84512
JavaScript
david-vega/youtube_fullscreen_tab
/inject.js
UTF-8
819
2.84375
3
[ "Unlicense" ]
permissive
var injected = injected || (function(){ // An object that will contain the "methods" // we can use from our event script. var methods = {}; // This method will eventually return // background colors from the current page. methods.getUrl = function(){ return location.search.substring(3, 14); }; //...
true
106cace6a2d4c6521fe5b44084543ca2fd22e7b3
JavaScript
sendskk/Fidelity-AdvJs-Jan-2015
/Day-04/03-ModelView-TaskManager-Require/TaskCollectionView.js
UTF-8
813
2.609375
3
[]
no_license
define(['jquery','TaskView','text!taskCollectionTemplate.html'], function($, TaskView, templateHTML){ function TaskCollectionView(taskCollection){ var $root = this.$root = $("<div></div>"); this.init = function(){ $root.on("click", "#btnAddTask", function(){ var taskName = $("#txtTask", $root).val(); ta...
true
2e90f86f931c5881e07e09886581d78a8f4852cd
JavaScript
Juzz31/TASBot
/.gitignore/commands/addmoney.js
UTF-8
1,286
2.546875
3
[]
no_license
const Discord = require("discord.js"); const economy = require("discord-eco"); const admRole = 'Administrator'; const botconfig = require("../botconfig.json"); var prefix = botconfig.prefix; module.exports.run = async (bot, message, args) => { let cont = message.content.slice(prefix.lenght).split(" "); if(!messa...
true
ff7908e414e3d731d1eefcc221290696883730de
JavaScript
parthi2929/crypto-ohlc-1
/temp/db_reference_WORKING.js
UTF-8
1,915
2.8125
3
[]
no_license
var mongoose = require('mongoose'); var ohlcSchema = mongoose.Schema( { _id:{type: Number, unique: true}, data: [Number] }, { collection:'ohlc-min-DB' } ); var ohlcSchemaRead = mongoose.Schema( { _id:{type: Number, unique: true}, data: [[Number]] }, ...
true
c90aacc4ee7b28b395c70a56921b44a8c4ca1d40
JavaScript
hogvarce/calendar
/src/components/CalendarContainer.js
UTF-8
4,052
2.953125
3
[]
no_license
import React from 'react'; import DateExtend from '../utils/DateExtend'; import Calendar from './Calendar'; import Notes from './Notes'; class CalendarContainer extends React.Component { constructor() { super(); this.currentDate = new Date(); this.state = { date: this.currentDat...
true
ad977cd80ac03bd2996600bfde507fb5a1fe5eab
JavaScript
NikitaPishulenak/snoform
/template/js/main.js
UTF-8
12,275
2.703125
3
[ "MIT" ]
permissive
var current_fs, next_fs, previous_fs; var left, opacity, scale; var animating; var statusVal=''; var stepVerify=true; //Фрлаг есть ли ошибка валидации. Не пускать на другую страницу const rootF=''; $(".next").click(function(){ hideError(); var stepTitle=''; if ($(this).hasClass('step1')){ st...
true
44f474f6b09c1bcfdf4e653b492a9f81b4f7426b
JavaScript
A-Yusuke/20211120_ando_test
/js/main.js
UTF-8
673
4.21875
4
[]
no_license
// question1 const array = [2, 4, 7, 5, 4, 3, 8]; const result = array.filter((x, i, self) => { return self.indexOf(x) === i; }); console.log(result); // question2 function isLeapYear(year) { if ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0) { return true; } return false; } const checkYear = 20...
true
cf4a1b6bcf29eb7cd132532c25bcd2a80e1f1a9b
JavaScript
Grozdanny/CurencyConverter
/src/index.js
UTF-8
974
2.578125
3
[]
no_license
import React from 'react' import ReactDOM from 'react-dom' import Curency from './components/Curency'; class Exchange extends React.Component { constructor(props) { super(props); this.state = { Pln: 0, Sek: 0, }; this.changeCurency = this.changeCurency.bind(this); }; changeCurency(val...
true
9b85be2dd330c4b63c1f135f936ce68f1193fef3
JavaScript
Magoninho/raycasting-js
/raycast.js
UTF-8
11,113
3.15625
3
[]
no_license
const TILE_SIZE = 32; const MAP_NUM_ROWS = 11; const MAP_NUM_COLS = 15; const WINDOW_WIDTH = MAP_NUM_COLS * TILE_SIZE const WINDOW_HEIGHT = MAP_NUM_ROWS * TILE_SIZE console.log(WINDOW_WIDTH); console.log(WINDOW_HEIGHT); var FOV = 60 * (Math.PI / 180); const NUM_RAYS = WINDOW_WIDTH/4; var mouse; class Map { con...
true
edd9c125a373811221b73980110ee6b7be39ee4a
JavaScript
JacobStewart20/cosmiccommerce
/public/js/cartAjaxRoutes.js
UTF-8
7,665
2.609375
3
[]
no_license
$(function () { //edit_quiz.html - when saving general quiz data (title, due date) $(".add-to-cart").click(function(e){ e.preventDefault(); var currentObject = e.currentTarget.parentElement; var productId = currentObject.product_id.value; ...
true
b3aa6b5e557d04e1d8d046defe650fa151961c51
JavaScript
kevinjchi/recipe-searcher
/src/js/filterNames.js
UTF-8
401
3.171875
3
[]
no_license
export const removeSName = names => { return names.filter(name => name.toLowerCase().charAt(0) != 's'); }; // export const removeMName = names => { // let newNames = names; // names.forEach(name => { // if(name.charAt(0) == 'M') { // const index = newNames.indexOf(name); // ...
true
a28df8f872ae14a72373444dab84c426e36d424a
JavaScript
CanDgrmc/CodeChallenges
/titleCase.js
UTF-8
173
3.359375
3
[]
no_license
function titleCase(str){ return str.toLowerCase().split(" ").map( word => word[0].toUpperCase() + word.slice(1)).join(" ") } console.log(titleCase('hello world'))
true
f4db3781b039cc2189576b143adbbc57f909a5f4
JavaScript
skyhoffert/skyhoffert.github.io
/games/lunlan/util.js
UTF-8
2,266
3.109375
3
[]
no_license
// // Sky Hoffert // Utility Functions. // function DrawRect(c,lx,ly,w,h) { c.beginPath(); c.rect(lx,ly,w,h); c.closePath(); } function DrawRectCenter(c,x,y,w,h) { DrawRect(c,x-w/2,y-h/2,w,h); } function DrawPolygon(c,pts,cx,cy) { c.beginPath(); for (let i = 0; i < pts.length; i++) { ...
true
8fc5509f4fed14f14d95833dd7955dfe7999cd58
JavaScript
kristinven/waterfall
/src/js/index-throttle.js
UTF-8
1,523
2.765625
3
[]
no_license
var oLi = document.getElementsByTagName('li'); page = 1; flag =true; function ajaxFun(){ if(flag){ flag = false; ajax('get', '/waterfall/getPics.php', getData, 'cpage=' + page, true); page++; } } ajaxFun(); function getData(data){ var value = JSON.parse(data); if(value.length > 0){ value.forEach(functio...
true
6955323ed61d33a70e3d7ab5b0f2413e91032bc9
JavaScript
Ilink/Weathergrid
/public/js/hiss/lexer.js
UTF-8
527
2.921875
3
[]
no_license
function Lexer(str){ function consume(length){ str = str.substr(length); } // Matching Keywords ///////////////////////////////////// // Expressions function match_indent(){ var re = /\n(\t*)/; var captured = str.match(re); console.log(captured, captured.length); // spaces if(!captured) { r...
true
a216bda5f7e0f9b8cb27bf8b6fa22f26dd0ee752
JavaScript
dr34ke/wsei-javascript-zadania
/1_Zadania/dodatkowe/3_GalleryWithFilter/js/app.js
UTF-8
1,097
3.125
3
[]
no_license
document.addEventListener("DOMContentLoaded", function(){ var elements = document.querySelectorAll("img"); var show = document.querySelector("#showButton"); var hide = document.querySelector("#hideButton"); var input = document.querySelector("#tagInput"); show.addEventListener("click",functio...
true
9c05fbe6cd18ebd1b6f3a9ad7bb0b472a15ab73b
JavaScript
Enosh-Yu/wordbox
/src/component/SmallBox.js
UTF-8
895
2.65625
3
[]
no_license
import React, {useState, useEffect, useRef} from 'react'; const SmallBox = ({item, x, y, active, onClicked, clickedLength, isAnswerChecked}) => { //const [active, setActive] = useState(false); const isMount = useRef(false); const handleClick = () => { if (!active && clickedLength >= 5) { ...
true
172bf4a87138642cc5de2f100ebdb343e4f83758
JavaScript
arsnazarenko/Web
/weblab1/script.js
UTF-8
3,098
3.015625
3
[]
no_license
'use strict' $(document).ready(function() { if (localStorage.getItem("result") != null) { console.log("local storage data loaded") let localData = JSON.parse(localStorage.getItem("result")); localData.map(item => toHtmlTable(item)); } }); function addToStorage(item) { let localDat...
true
5aebcdddff153a0dddf3cccd538232f745b099d9
JavaScript
Mohamedtarek22/Graduate
/src/handsigns/Gsign.js
UTF-8
1,306
2.53125
3
[ "BSD-2-Clause" ]
permissive
import {Finger, FingerCurl, FingerDirection, GestureDescription} from 'fingerpose'; export const gSign = new GestureDescription('G'); // [ // [ // "Thumb", // "No Curl", // "Diagonal Up Right" // ], // [ // "Index", // "Half Curl", // "Horizontal Right" // ...
true
c5f9f30342cc72b493895c3d02d048971f717983
JavaScript
DiegoSilvaMolina/Portafolio-Restaurant-Siglo-XXI
/core/static/js/validar-receta.js
UTF-8
1,241
3.265625
3
[]
no_license
function validar(){ var id,nombre_receta, detalle_receta, imagen_receta, valor_receta, expresion; id = document.getElementById("id").value; nombre_receta = document.getElementById("nombre_receta").value; detalle_receta = document.getElementById("detalle_receta").value; imagen_receta = document.getE...
true
5efa15efe523ff2ea32fd0b4b3b1a751d526a5a8
JavaScript
llcook/clicky-game
/src/App.js
UTF-8
2,045
3.015625
3
[]
no_license
import React, { Component } from 'react'; import NavBar from "./components/NavBar/index"; import Wrapper from "./components/Wrapper/index"; import ImageCard from './components/ImageCard/index'; import cards from "./cards.json"; class App extends Component { state = { cards, score: 0, topScore: 0 } ...
true
a35b52ef3bc2f223145d2023d658e0e51c616eea
JavaScript
smilteval/Banking-App
/src/components/Debits.js
UTF-8
3,473
2.671875
3
[]
no_license
import React, { Component } from 'react' import AccountBalance from './AccountBalance'; import TransactionCard from './TransactionCard'; import Button from "react-bootstrap/Button" export default class Debits extends Component { constructor(props){ super(props); this.state={ debit: { ...
true
b59c59b713f711757c897224727e4dce9c3d7c56
JavaScript
Coenmathijssen/justdiggit-playground
/src/js/index.js
UTF-8
2,265
2.6875
3
[]
no_license
import { gsap, Linear } from 'gsap' import { ScrollTrigger } from "gsap/ScrollTrigger" gsap.registerPlugin(ScrollTrigger) const manifests = [...document.querySelectorAll('.manifest')] const images = [...document.querySelectorAll('img')] const audio = document.querySelector('audio') document.querySelector('button').a...
true
c0c1484631dcc8a422e5747313cb817221af00cc
JavaScript
ningxiajs/ningxia-trip-map
/src/utils/index.js
UTF-8
1,100
2.65625
3
[ "MIT" ]
permissive
// import config from '@/config/app' /** * @description 更新标题 * @param {String} title 标题 */ export function setPageTitle (titleText) { const processTitle = process.env.VUE_APP_TITLE || '测试' window.document.title = `${processTitle} ${titleText ? ` - ${titleText}` : ''}` } /** * @description 打开新页面 * @param {Str...
true
da49f9a2e1df9e4cd5c578d4b022281ad9de90d0
JavaScript
victorfds21/Angular_ahorcado
/seccion-7.7-ejercicio7/app.js
UTF-8
315
3.75
4
[]
no_license
function max( a , b , c ){ let mayor ; if(a > b ){ if(a > c){ mayor = a; }else{ mayor = c; } }else{ if (b>c) mayor = b; else { mayor = c; } } return mayor; } mayor = max(5,2,6); console.log(mayor);
true
40ab71635dfda4fb2a16f94979ffd7bf6cc9a4d7
JavaScript
jeffreyxchan/Sora
/app/components/Loading.js
UTF-8
1,274
2.609375
3
[]
no_license
var React = require('react') var PropTypes = React.PropTypes var styles = { container: { display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', height: '100%', width: '100%' }, header: { fontSize: 50 } } var Loading = React.createClass({ propTyp...
true
feff3f2ab49ba872751f9a0d020c2291a3968091
JavaScript
SheroesDev/outline
/shared/utils/slugify.js
UTF-8
287
2.59375
3
[ "BUSL-1.1", "Apache-2.0" ]
permissive
// @flow import slugify from "slugify"; // Slugify, escape, and remove periods from headings so that they are // compatible with url hashes AND dom selectors export default function safeSlugify(text: string) { return `h-${escape(slugify(text, { lower: true }).replace(".", "-"))}`; }
true
ff0b5013f6469b43d987a056b9aecdce73813534
JavaScript
zhelingwang/myKoa
/models/user.js
UTF-8
754
2.53125
3
[]
no_license
const mongoose = require("mongoose"); const Schema = mongoose.Schema; //define a model const UserSchema = new Schema({ name : String, phone : String, age : Number }); //accessing a model //UserModel = Collection name , 命名会自动转小写并负数化 , UserModel => usermodels module.exports = mongoose.model('UserModel', UserSchema)...
true
cec563dd38ff6f0d78dbd4cf2d846a93e82b5e36
JavaScript
MasterGowen/PCXBlock
/pcxblock/static/js/Utils/NumberFormat.js
UTF-8
11,095
2.921875
3
[]
no_license
//Filename : NumberFormat.js //NumberFormatter V1.0 //Author: Luc Veronneau //Email: hurlemonde@hotmail.com //This script is release under The Code Project Open License (CPOL) //see: http://www.codeproject.com/info/cpol10.aspx //Under no circomstances remove or modify this header (function () { //Declaring n...
true