code
stringlengths
2
1.05M
repo_name
stringlengths
5
114
path
stringlengths
4
991
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
const path = require('path'); const webpack = require('webpack'); const Visualizer = require('webpack-visualizer-plugin'); const Webiny = require('webiny-cli/lib/webiny'); const ModuleIdsPlugin = require('./plugins/ModuleIds'); module.exports = function (app) { const sharedResolve = require('./resolve')(app); ...
Webiny/Webiny
Cli/Build/webpack/vendor.js
JavaScript
mit
3,216
// const meshblu = require('./api/config/meshblu'); const config = require('./api/config/config'); const express = require('./api/config/express'); const mongoose = require('./api/config/mongoose'); const mqtt = require('./api/config/mqtt'); var port = process.env.PORT || config.port; // Initializing the data base va...
RC-Dynamics/presence-server
server.js
JavaScript
mit
781
'use strict'; angular.module('copayApp.services').factory('walletService', function($log, $timeout, lodash, trezor, ledger, storageService, configService, rateService, uxLanguage, $filter, gettextCatalog, bwcError, $ionicPopup, fingerprintService, ongoingProcess, gettext, $rootScope, txFormatService, $ionicModal, $sta...
ObsidianCryptoVault/copay
src/js/services/walletService.js
JavaScript
mit
30,469
define(['summernote/core/func'], function (func) { /** * list utils */ var list = (function () { /** * returns the first element of an array. * @param {Array} array */ var head = function (array) { return array[0]; }; /** * returns the last element of an array. ...
igitras/igitras-angular-seed
app/bower_components/summernote/src/js/core/list.js
JavaScript
mit
3,686
function slugify(string) { return string .toString() .trim() .toLowerCase() .replace(/\s+/g, "-") .replace(/[^\w\-]+/g, "") .replace(/\-\-+/g, "-") .replace(/^-+/, "") .replace(/-+$/, ""); }; angular.module("exambazaar").controller("officialPapersController", [ '$scope', '$rootScope',...
gauravparashar29/exambazaar
views/js/controllers/officialPapersController.js
JavaScript
mit
16,345
(function (angular) { 'use strict'; /** * @ngdoc directive * @name esri.map.directive:esriInfoTemplate * @restrict E * @element * * @description * This directive creates an * {@link https://developers.arcgis.com/javascript/jsapi/infotemplate-amd.html InfoTemplate} *...
nkdram/ramwedsprag
public/lib/angular-esri-map/src/layers/esriInfoTemplate.js
JavaScript
mit
3,605
/* Created by Freshek on 07.10.2017 */ class Box extends Movable { constructor(x, y, hash, type) { super(x, y); this.hash = hash; this.type = type; } toString() { return JSON.parse(this); } isMaterial() { var type = this.type.toLowerCase(); return (type == "mucosum" || type == "pris...
freshstudio/Toshinou
src/js/objects/Box.js
JavaScript
mit
561
"use strict"; exports.__esModule = true; exports["default"] = void 0; var _react = require("react"); var _propTypes = _interopRequireDefault(require("prop-types")); var _useSelect2 = _interopRequireDefault(require("./useSelect")); var _types = require("./types"); var _Options = _interopRequireDefault(require("./C...
tbleckert/react-select-search
dist/cjs/SelectSearch.js
JavaScript
mit
6,061
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { View, Text, TouchableOpacity } from 'react-native'; import Styles from './Styles'; import Checkbox from './Checkbox'; export default class CheckboxField extends Component { static propTypes = { // CheckboxField label: Prop...
vincee48/react-native-checkbox-field
CheckboxField.js
JavaScript
mit
2,392
/** * Internal dependencies. */ var Rule = require('../rule'); var MinLen = Rule.create({ error: 'The variable name is too short', option: { key: 'varmin', type: 'number' }, on: { VariableDeclaration: 'check' }, }); /** * Perform the check. * * @param {Object} node * @api public */ Mi...
vesln/stylec
lib/stylec/rule/var-min-len.js
JavaScript
mit
575
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import Contact from './Contact'...
benbenye/react-on-react-start-kit
src/routes/contact/index.js
JavaScript
mit
869
version https://git-lfs.github.com/spec/v1 oid sha256:8fcaa59f8f7d92d17f1967c30e716003bf2096aa6e162d68e3476991d70c5ad1 size 16572
yogeshsaroya/new-cdnjs
ajax/libs/eddy/0.6.1/eddy.max.js
JavaScript
mit
130
version https://git-lfs.github.com/spec/v1 oid sha256:c2e49c9c3bf532498c29c64cbafec19f19fb11fddee2e36d8ea433291bbbc04f size 5691
yogeshsaroya/new-cdnjs
ajax/libs/yui/3.17.1/datatype-xml-format/datatype-xml-format-coverage.js
JavaScript
mit
129
// This file is required by the index.html file and will // be executed in the renderer process for that window. // All of the Node.js APIs are available in this process. const { webFrame, remote } = require("electron") import Style from "./app/scss/app.scss" // disable zoom in/out functionality in app // webFrame.se...
ImageGlass/ImageGlass-Photos
Source/renderer.js
JavaScript
mit
568
/** * @license Angular v4.2.5 * (c) 2010-2017 Google, Inc. https://angular.io/ * License: MIT */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')) : typeof define === 'function' && define.amd ? define(['exports', '@angular/core'...
vtlg/angulegis
angulegis/node_modules/@angular/core/bundles/core-testing.umd.js
JavaScript
mit
41,199
define(function (require, exports, module) { "use strict"; // External dependencies. var Backbone = require('backbone'); var Marionette = require('marionette'); window.urls = require('urls'); window.util = require('util'); // The root path to run the application through. exports...
yoniji/ApeRulerDemo
app/app.js
JavaScript
mit
751
module.exports = function(accounts) { accounts = accounts != null ? accounts : {}; return function(req, res, next) { var auth, buf, creds, found, i, password, tmp, userAuth, username; auth = req.headers['authorization']; if (!auth) { res.statusCode = 401; res.setHeader('WWW-Authenticate', 'B...
HumanDesign/node-basicauth
lib/basicauth.js
JavaScript
mit
964
/*! * bespoke-hash v0.1.1 * * Copyright 2013, Mark Dalgleish * This content is released under the MIT license * http://mit-license.org/markdalgleish */ (function(bespoke) { bespoke.plugins.hash = function(deck) { var activeIndex, parseHash = function() { var hash = window.location.hash.slice(1), ...
andreypopp/bespoke-hash
dist/bespoke-hash.js
JavaScript
mit
1,037
version https://git-lfs.github.com/spec/v1 oid sha256:b7ace73d0372ab733e44a6e6e929f5d7f8f76aa936a63141ce71b444d15db719 size 59294
yogeshsaroya/new-cdnjs
ajax/libs/underscore-contrib/0.3.0/underscore-contrib.js
JavaScript
mit
130
var common = require('../common.js'); var utils = common.load('utils'); module.exports = function handle_presenterRequest() { var self = this; var piccolo = this.piccolo; var res = this.response; var route = this.cache.route; this.log('info', 'Require presenter module: ' + this.cache.filepath); // Get...
AndreasMadsen/piccolo
lib/core/presenterRequest.js
JavaScript
mit
1,295
import * as SampleActions from './actions' import {SampleReducer} from './reducer' export {SampleActions, SampleReducer}
reidlai/slush-fullstack-framework
templates/redux-react/src/redux-modules/redux-sample/index.js
JavaScript
mit
120
'use strict'; angular.module('LDT.ui').directive('catchInput',function() { return { link: function(scope, element, iAttrs, ctrl) { function stopit(e) { e.stopPropagation(); } //Don't allow clicks to change mode element.click(stopit); //Don't allow renaming keypresses to ch...
allantokuda/LDT
app/assets/javascripts/ui/catchInput.js
JavaScript
mit
378
/** * Japanese translation * @author Tomoaki Yoshida <info@yoshida-studio.jp> * @version 2010-09-18 */ (function($) { elRTE.prototype.i18Messages.jp = { '_translator' : 'Tomoaki Yoshida &lt;info@yoshida-studio.jp&gt;', '_translation' : 'Japanese translation', 'Editor' : 'エディター', 'Source' : 'ソース', // Panel...
smoussavi/IzendaHours
IzendaHours/Reporting/elrte/js/i18n/elrte.jp.js
JavaScript
mit
8,236
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des...
guibson91/curso-ionic2
node_modules/ionic-angular/esm/animations/animation.js
JavaScript
mit
28,715
(function (global) { 'use strict'; $ = global.jQuery; let branding_style = $('.govuk-radios__item input[name="branding_style"]:checked'); if (!branding_style.length) { return; } branding_style = branding_style.val(); const $paneWrapper = $('<div class="govuk-grid-column-full"></div>'); const $form =...
alphagov/notifications-admin
app/assets/javascripts/previewPane.js
JavaScript
mit
1,312
"use strict" //constructor var FileManager = function(input,callback){ var that = this; this.input = input; } FileManager.prototype.upload = function(callback){ this.input.addEventListener("change",function changeEvent (e){ try{ var reader = new FileReader(); reader.onloadend = function(evt){ ...
fellipefingoli/cut-tool
src/js/file-manager.js
JavaScript
mit
447
angular.module('deco').directive('decoEmail', [function () { return { restrict: 'EA', replace: false, template: function (element, attrs) { return attrs.before + '@' + attrs.after; } ...
stenvala/deco-extensions
ui/js/directives/email.js
JavaScript
mit
351
Router.configure({ layoutTemplate: 'layout', //loadingTemplate: 'loading', //waitOn: function() {return true;} // later we'll add more interesting things here .... }); Router.route('/', {name: 'welcome'}); Router.route('/about', {name: 'about'}); Router.route('/sponsors', {name:'sponsors'}) Router.route('/gra...
chyzhang/jbs-quiz1
lib/router.js
JavaScript
mit
745
module.exports = require('./lib/shim')
Matt-Esch/css3d
node_modules/request-animation-frame/shim.js
JavaScript
mit
40
// is this necessary? not sure if (module.parents) { throw new Error("node-dev-warnings won't work"); } require('./json');
thejh/node-dev-warnings
lib/index.js
JavaScript
mit
125
Fixtures.DefaultPluginConfig = {foo: 'foo', bar: 'bar'}; Fixtures.Plugin = function(config) { var self = this; this.config = config; this.preUpdates = 0; this.postUpdates = 0; this.prefabsCreated = 0; this.prefabsDestroyed = 0; this.entitiesCreated = 0; this.entitiesDestroyed = 0; ...
evillemez/javelin
fixtures/plugins/Plugin.js
JavaScript
mit
1,205
'use strict'; const jsonWebToken = require('jwt-simple'); const settings = require('../settings.js'); const passwords = require('../common/passwords.js'); /** * @param userObject * @returns {{access_token: String, expires: *, user: *}} */ function generateToken(userObject) { const date = new Date(); const expir...
waiterio/api
auth/authenticate.js
JavaScript
mit
1,264
/*global require */ require([ 'jquery' , 'lodash' , 'backbone' , 'src/js/main-view' , 'livefyre-bootstrap' , 'nls/i18n' , 'src/js/polyfill' , 'css!lib/livefyre-bootstrap/dist/all.css' , 'css!dev/css/main.css' ], function( $ , _ , Backbone , MainView , lfBootstrap ) { var main = new MainVi...
Livefyre/generator-lf-project
app/templates/sample-main.js
JavaScript
mit
373
(function() { var width = 960, height = 480; var projection = d3.geo.equirectangular() .scale(153) .translate([width / 2, height / 2]) .precision(.1); var path = d3.geo.path() .projection(projection); var graticule = d3.geo.graticule(); var svg = d3.select("body").append("svg") .attr("width...
babraham123/mysite
static/orbiter/map.js
JavaScript
mit
943
{ "(member ex officio), Managing Director": "Diretor Administrativo", "404_error_msg": "Desculpe, esta página não existe", "About": "Sobre", "About Participedia": "Sobre Participedia", "about.cases.example": "Por exemplo, este caso em %s 2017 orçamento participativo de Paris%s é uma das mais de 160 entradas d...
participedia/api
locales/pt.js
JavaScript
mit
184,245
/** * The Header view. */ define([ 'jquery', 'backbone', 'underscore', 'mps', 'views/ShareView' ], function($,Backbone, _,mps, ShareView) { 'use strict'; var HeaderView = Backbone.View.extend({ el: '#headerView', events: { 'click #btn-menu' : 'toggleMenu', 'click .share-link' : '...
codeminery/gfw
app/assets/javascripts/views/HeaderView.js
JavaScript
mit
3,493
import React, { PropTypes } from 'react' import { Modal } from 'antd' import wechatCodeImg from '../../static/img/me/wechat_code.jpg' import classes from './ImageModal.scss' class ImageModal extends React.Component { static propTypes = { visible: PropTypes.bool.isRequired }; componentDidUpdate() { cons...
chenfanggm/steven-mern-starter-kit
client/components/ImageModal/ImageModal.js
JavaScript
mit
1,076
version https://git-lfs.github.com/spec/v1 oid sha256:2a87ff5b4bbc72c52d9a82be37ffa8e7f1f7d41c49ecd9c9868fcf511a1a03ad size 28192
yogeshsaroya/new-cdnjs
ajax/libs/ammaps/3.10.0/maps/js/georgiaSouthOssetiaLow.min.js
JavaScript
mit
130
SyncedCron.config({ // Log job run details to console log: true, // Use a custom logger function (defaults to Meteor's logging package) //logger: null, // Name of collection to use for synchronisation and logging collectionName: DRM.collectionNamePrefix + 'cronHistory', // Default to using localTime ...
DrMongo/DrMongo
server/cron.js
JavaScript
mit
877
// Fixture for has function // Object literals with attributes to test against var has_attribute_with_backslash_fixture = { "hello": { "world": { "foo\\bar": { "baz": true }, "\\foo bar": { "baz": true }, "foo bar\\...
alistairjcbrown/check-type
lib/tests/fixtures/has_attribute_with_backslash_fixture.js
JavaScript
mit
501
var gmaps = require('google-maps-api')('AIzaSyC2Xp07hffemgAHYenBMKxeAeJ017nIbbk'); var mapOptions = { zoom: 13, center: {lat: -34.397, lng: 150.644}, mapTypeControl: false, streetViewControl: false, zoomControl: false ...
mateanticevic/ProjectIvy
app/components/common/Map.js
JavaScript
mit
1,487
import Login from '../components/Login.jsx'; import {useDeps, composeWithTracker, composeAll} from 'mantra-core'; import { connect } from 'react-redux' import { push } from 'react-router-redux'; export const composer = ({context, clearErrors}, onData) => { onData(null, {}); // clearErrors when unmounting the com...
bright-sea/wechess
client/modules/users/containers/Login.js
JavaScript
mit
978
"use strict"; var debug = require('debug')('loopback:CustomerAccountUserMapping'); var vasync = require('vasync'); module.exports = function customerAccountUserMapping(CustomerAccountUserMapping) { CustomerAccountUserMapping.findAccount = function findAccount(token, next) { var Account = CustomerAccountUserMapp...
Cellarise/generator-cpm-product
Test_Resources/GENPROD-2/common/models/CustomerAccountUserMapping.js
JavaScript
mit
1,011
import Hero from './Hero'; import MiniHero from './MiniHero'; export default Hero; export { MiniHero }
alexpriceonline/JumpCMS
example-frontend/components/Hero/index.js
JavaScript
mit
104
'use strict'; var BrowserifyCache = require('browserify-cache-api'); module.exports = function incrementalWatchPlugin(b) { var hasReadCache = false; b.on('bundle', function() { var cache = BrowserifyCache.getCache(b); if (!hasReadCache && cache) { Object.keys(cache.dependentFiles)....
buildium/browserify-builder
src/incremental-watch.js
JavaScript
mit
567
/**@license The MIT License (MIT) Copyright (c) 2015 Daniel Furtlehner Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, m...
furti/commandjs
command.js
JavaScript
mit
19,314
import React, { Component } from 'react'; import * as PropTypes from 'prop-types'; import { connect } from 'react-redux'; import * as R from 'ramda'; import Button from '@material-ui/core/Button'; import List from '@material-ui/core/List'; import ListItem from '@material-ui/core/ListItem'; import ListItemIcon from '@ma...
Luatix/OpenEx
openex-platform/openex-front/src/containers/authenticated/exercise/objective/Index.js
JavaScript
mit
10,727
import Action from './Action' import tryCall from './tryCall' export default function then (f, r, p, promise) { p._when(new Then(f, r, promise)) return promise } class Then extends Action { constructor (f, r, promise) { super(promise) this.f = f this.r = r } fulfilled (p) { this.runThen(thi...
briancavalier/creed
src/then.js
JavaScript
mit
641
var execSync = require('child_process').execSync, eslint = require('gulp-eslint'), gulp = require('gulp'), mocha = require('gulp-mocha'), path = require('path'), spawn = require('child_process').spawn...
f12/structure-logger
gulpfile.babel.js
JavaScript
mit
1,065
{ var regexp = /EQUIVALENCE.*$/gm; var aSpecs = (a.match(regexp) || []).sort().join("\n"); var bSpecs = (b.match(regexp) || []).sort().join("\n"); if (aSpecs.length === 0 && bSpecs.length === 0) { throw new Error("No spec results found in the output"); } expect(aSpecs).toEqual(bSpecs); }
stas-vilchik/bdd-ml
data/7245.js
JavaScript
mit
307
module.exports = { apps: [{ name: 'URL-ShortenerAPI', script: './source/server.js', env: { watch: 'source', ignore_watch : 'source/gui', NODE_ENV: 'development', MONGO_PORT: 28017, API_PORT: 8000 }, env_production: { watch: false, NODE_ENV: 'production', ...
taxnuke/url-shortener
ecosystem.config.js
JavaScript
mit
765
'use strict' module.exports = { // Format a string for terminal ouptut formatString: require('./methods/format-string'), // JSON pretty print json: require('./methods/json'), // Send notification via pushover notify: require('./methods/notify'), // Gets a random array item getRandom: require('./met...
jHoldroyd/trollmoji
app/libs/utils/index.js
JavaScript
mit
423
var results; function viewData() { var resultsTable = $('<table></table>').attr('id', 'results'); var tableHead = $("<thead></thead>"); var tableBody = $("<tbody></tbody>"); var temp; $.post("/api/Data/Query/", { name: $('#name').val(), query: $('#query').val(), server: $('#server').val(...
darneymartin/ChartIT
src/View/static/js/Charts/CreateChart.js
JavaScript
mit
3,597
/* * remotejs * Controls iTunes from your browser * * Copyright (c) 2013 Jeffrey Muller * Licensed under the MIT license. */ app.music = { songMetadata: function(song) { return { 'song': song, 'artist': (song.artist !== null) ? app.library.artists[song.artist] : null, ...
j-muller/RemoteJS
templates/js/music.js
JavaScript
mit
2,280
/** * Relies on Googoose for the basic exportation to Winword. * This javascript file is loaded by marknotes **only when Pandoc isn't * correctly installed.** * * When Pandoc is installed, this script isn't included by marknotes since * the action behind the "Download as .docx file" will be immedialty a * link t...
cavo789/marknotes
src/marknotes/plugins/page/html/docx/button.js
JavaScript
mit
2,703
"use strict"; var express = require('express'); var app = express(); // define our app using express var path = require('path'); var fs = require('fs') var handlebars = require('express-handlebars'), hbs; var bodyParser = require('body-parser'); // handlebars template engine hbs = handlebars.create({ def...
rjaskonis/Express-MVC-1
ExpressMVC1/server.js
JavaScript
mit
1,583
let dice1; let dice2; let dice3; let dice4; let dice5; let dice6; let dice; function preload(){ dice1 = loadImage("images/dice-1.png"); dice2 = loadImage("images/dice-2.png"); dice3 = loadImage("images/dice-3.png"); dice4 = loadImage("images/dice-4.png"); dice5 = loadImage("images/dice-5.png"); dice6 = ...
chsstm/Web-Designings
projects/RollDice/GameScreen.js
JavaScript
mit
3,588
function result() { this.insert_id = 0 this.affected_rows = 0 this.rows = [] } module.exports = result
sidorares/nodejs-mysql-native
lib/mysql-native/result.js
JavaScript
mit
109
import { toBeDeepCloseTo } from 'jest-matcher-deep-close-to'; import { highResolution4, highResolution, simple, } from '../../../testFiles/examples'; expect.extend({ toBeDeepCloseTo }); describe('merge: Low resolution', () => { it('no options', () => { let result = simple.merge(); result.x = Array.f...
cheminfo-js/chromatography
src/ms/__tests__/merge.test.js
JavaScript
mit
2,564
var clv = require("../../../../index.js"); var assert = require("assert"); describe("Generated test - rm/ins/undo/undo/rm/ins/ins/rm/ins/ins - 10-ops-3cb06c80-722e-4eaa-a5f7-7068c46db475", function() { var doc1 = new clv.string.Document("163cfd90-537e-11e7-a087-55438491864c", 0, null); var doc2 = new clv.string.Do...
collaborativejs/collaborative-js
tests/automatic/generated/10/10-ops-3cb06c80-722e-4eaa-a5f7-7068c46db475.js
JavaScript
mit
18,837
_.mixin({ on : function(obj, event, callback) { // Define a global Observer if(this.isString(obj)) { callback = event; event = obj; obj = this; } if(this.isUndefined(obj._events)) obj._events = {}; if (!(event in obj._events)) obj._events[event] = []; obj._events[event].push(callback); return this; }, once...
pacoweb/AlertasDgtChromeExtension
js/underscore-mixin.js
JavaScript
mit
1,842
/*Made by *** for learning perpouses Feel free to use it as you see fit. */ var JSConsol; function CreateConsol() { JSConsol = function Consol() { /*create stack of functions w8 for input*/ var awaitInputStack = new Array(); /*create execution list*/ var execList = new Array();...
LazarDL/TelerikHomeworks
JSIntroduction/OperatorsAndExpressions/JSConsol.js
JavaScript
mit
5,233
import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render, triggerEvent } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; import $ from 'jquery'; module('Integration | Component | fm-widget:radio', function(hooks) { setupRenderingTest(hooks); ...
Emerson/ember-form-master-2000
tests/integration/components/fm-widgets/radio-test.js
JavaScript
mit
914
/*globals define*/ /*eslint-env node, browser*/ /** * Plugin illustrating how to merge branches/commits. * * @author lattmann / https://github.com/lattmann * @module CorePlugins:MergeExample */ define([ 'plugin/PluginConfig', 'plugin/PluginBase', 'text!./metadata.json', 'common/core/users/merge',...
webgme/webgme-engine
src/plugin/coreplugins/MergeExample/MergeExample.js
JavaScript
mit
7,891
// Generated by CoffeeScript 1.6.3 var Message, should, vows; Message = require("../"); vows = require("vows"); should = require("chai").should(); vows.describe("Utility methods").addBatch({ "#prefixIsHostmask()": { "when prefix is valid hostname": { topic: Message(":test!test@something.com PRIVMSG #Tes...
Jazcash/Jazbot-IRC
lib/node_modules/irc-factory/node_modules/irc-message/test/misc.js
JavaScript
mit
2,110
/* Plotr.PieChart ============== Plotr.PieChart is part of the Plotr Charting Framework. For license/info/documentation: http://www.solutoire.com/plotr/ Credits ------- Plotr is partially based on PlotKit (BSD license) by Alastair Tse <http://www.liquidx.net/plotkit>. Copyright --------- Copyright 20...
sendaa/current4
img/lib/plotr/PieChart.js
JavaScript
mit
7,779
// # Display shape mixin // This mixin defines additional attributes and functions for Stack and Canvas artefacts, in particular adding hooks for functions that will be automatically invoked when the artefact's dimensions update. // #### Demos: // + [Canvas-034](../../demo/canvas-034.html) - Determine the displayed sh...
KaliedaRik/Scrawl-canvas
source/mixin/displayShape.js
JavaScript
mit
18,816
import { REQUEST_CONTACT_DATA } from '../Contacts/ContactCard/constants'; export function requestContactData(userId) { return { type: REQUEST_CONTACT_DATA, userId, }; }
Get-In-Touch/get-in-touch
app/containers/Dashboard/actions.js
JavaScript
mit
182
/** @jsx h */ import h from '../../helpers/h' export const flags = {} export const schema = { blocks: { paragraph: {}, item: { parent: { types: ['list'] }, nodes: [{ objects: ['text'] }], }, list: {}, }, } export const customChange = change => { // see if we can break the expected ...
ashutoshrishi/slate
packages/slate/test/models/change/without-normalization-option-override.js
JavaScript
mit
664
(function($){ $(function(){ var window_width = $(window).width(); // convert rgb to hex value string function rgb2hex(rgb) { if (/^#[0-9A-F]{6}$/i.test(rgb)) { return rgb; } rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); if (rgb === null) { return "N/A"; } f...
goblockchain/goblockchain.github.io
app/js/init.js
JavaScript
mit
6,093
'use strict'; angular.module('skillz').directive('xebianSkillCard', function () { return { restrict: 'E', scope: { xebian: '=xebian', showRating: '=showRating', onClick: '&onClick' }, templateUrl: 'modules/skillz/views/xebian-skill-card.template.h...
xebia-france/xskillz
public/modules/skillz/controllers/skillz.client.controller.js
JavaScript
mit
10,408
'use strict'; var express = require('express'); var app = express(); var mongojs = require('mongojs'); var db = mongojs('questions', ['questions']); var mongoose = require('mongoose'); var Schema = mongoose.Schema; var bodyParser = require('body-parser'); var passport = require('passport'); var LocalStrategy = requi...
thebluegene/mybasejump
voting-app/server.js
JavaScript
mit
4,191
export const find = (array, element) => { let start = 0; let end = array.length - 1; let middle; while (start <= end) { middle = Math.floor((start + end) / 2); if (element === array[middle]) { return middle; } else if (element < array[middle]) { end = middle - 1; } else if (element >...
exercism/xecmascript
exercises/practice/binary-search/.meta/proof.ci.js
JavaScript
mit
418
import Joi from 'joi' export default class EventsEntity { constructor(deps = {}) { this.Adapter = deps.Adapter || require('./Adapter').default } createValidation(input){ return new Promise((resolve, reject) => { let schema = Joi.object().keys({ game: Joi.string().required(), ...
CodingDojoRT/TrutasOrganizer
app/Events/Entity.js
JavaScript
mit
2,021
module.exports.DB = require('./lib/database'); module.exports.Layer = require('./lib/layer');
madbence/node-round-robin-database
index.js
JavaScript
mit
95
const initStart = process.hrtime(); const DeviceDetector = require('device-detector-js'); const detector = new DeviceDetector({ skipBotDetection: true, cache: false }); // Trigger a parse to force cache loading detector.parse('Test String'); const initTime = process.hrtime(initStart)[1] / 1000000000; const package = r...
diablomedia/useragent-parser-comparison
parsers/device-detector-js-1/scripts/parse.js
JavaScript
mit
3,258
// Allow a form to post without navigating to another page: postForm = function(oFormElement) { if (!oFormElement.action) { return; } var oReq = new XMLHttpRequest(); if (oFormElement.method.toLowerCase() === "post") { oReq.open("post", oFormElement.action); oReq.send(new FormData(oFormEleme...
colohan/dschat
appengine/js/dripper.js
JavaScript
mit
4,254
/** * * @fileoverview fileoverview comment before import. transformer_util.ts has * special logic to handle comments before import/require() calls. This file * tests the regular import case. * * @suppress {checkTypes} checked by tsc */ goog.module('test_files.file_comment.before_import');var module = module || {...
drjanitor/tsickle
test_files/file_comment/before_import.js
JavaScript
mit
594
export const ic_looks_two_twotone = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0V0z","fill":"none"},"children":[]},{"name":"path","attribs":{"d":"M19 5H5v14h14V5zm-4 6c0 1.11-.9 2-2 2h-2v2h4v2H9v-4c0-1.11.9-2 2-2h2V9H9V7h4c1.1 0 2 .89 2 2v2z","opacity":".3"},"children":[]},{"name":"pat...
wmira/react-icons-kit
src/md/ic_looks_two_twotone.js
JavaScript
mit
532
;(function() { "use strict"; owid.namespace("App.Views.Form.MapColorSchemeView"); var ColorPicker = App.Views.UI.ColorPicker; App.Views.Form.MapColorSchemeView = Backbone.View.extend({ el: "#form-view #map-tab .map-color-scheme-preview", events: {}, initialize: function( options ) { this.dispatcher = o...
mispy/our-world-in-data-grapher
resources/assets/js/app/App.Views.Form.MapColorSchemeView.js
JavaScript
mit
5,485
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototy...
swapnilabnave/swapnilabnave.github.io
node_modules/react-interactive/lib/extractStyle.js
JavaScript
mit
2,567
import Ember from 'ember'; import SelectPicker from './select-picker'; import ItemCursorMixin from 'ember-cli-select-picker/mixins/item-cursor'; const KEY_ENTER = 13; const KEY_ESC = 27; const KEY_UP = 38; const KEY_DOWN = 40; export default SelectPicker.extend(ItemCursorMixin, { layoutName: 'components/selec...
sukima/ember-cli-select-picker
app/components/keyboard-select-picker.js
JavaScript
mit
1,283
<<<<<<< HEAD <<<<<<< HEAD module.exports = exports = list exports.usage = 'Prints a listing of the currently installed node development files' /** * Module dependencies. */ var fs = require('graceful-fs') , path = require('path') , log = require('npmlog') function list (gyp, args, callback) { var devDir =...
ArcherSys/ArcherSys
node_modules/npm/node_modules/node-gyp/lib/list.js
JavaScript
mit
2,294
import axios from 'axios'; import getServer from '../utils/api'; function getGoldHistory() { axios.get(getServer()+'gold/history') .then((function (response) { return response.data.dataset.data; }) .catch(function (error) { console.log(error); return error; }) )}; export default ge...
it-surya/hack-jeninvest
app/services/apiServices.js
JavaScript
mit
335
var express = require("express"), app = express(); app.get("/", function (req, res) { res.redirect("tests.html"); }); app.configure(function () { app.use(express.methodOverride()); app.use(express.bodyParser()); app.use(express.static(__dirname)); app.use(express.errorHandler({ dumpExceptions: true, showSta...
vc3/ExoWeb
ExoWeb/Client/runserver.js
JavaScript
mit
384
import React, { PropTypes, Component } from 'react'; /* eslint-disable import/no-unresolved */ import { LogoImage, Header, } from 'components'; /* eslint-enable import/no-unresolved */ import styles from './index.module.scss'; import cssModules from 'react-css-modules'; import { connect } from 'react-redux'; import...
farmasek/scalable-react-boilerplate
app/src/containers/FeatureFirstContainer/index.js
JavaScript
mit
1,872
'use strict'; angular.module('myApp.happies.happy-list', []) // <happy-list></happy-list> .directive('happyList', function() { var directive = { restrict: 'E', scope: {}, templateUrl: 'components/happies/happy-list.tpl.html' , controller: 'HappyListController', controllerAs: 'vm', }; return directive; })...
javiBertos/hackHappinessApp
app/components/happies/happy-list.js
JavaScript
mit
438
ns.page.title = function() { return 'Noscript Todo'; }; $(function() { ns.init(); ns.page.go(); });
vitkarpov/yet-another-todo
views/todo.js
JavaScript
mit
112
'use strict'; // Declare app level module which depends on filters, and services angular.module('few', [ 'angular-momentjs', 'ngRoute', 'ngAnimate', 'few.filters', 'few.services', 'few.directives', 'few.controllers' ]). config(['$routeProvider', function($routeProvider) { $routeProvider.when('/', {co...
jenklee/few
public/js/app.js
JavaScript
mit
1,228
// Ionic Starter App // angular.module is a global place for creating, registering and retrieving Angular modules // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) // the 2nd parameter is an array of 'requires' angular.module('app', ['ionic']) .run(function($ionicP...
zak245/ionic-blank
app/app.js
JavaScript
mit
693
'use strict'; /** * Module dependencies. */ var _ = require('lodash'); var lev = require('leven'); var request = require('request'); var fs = require('fs'); var mkdirp = require('mkdirp'); var chalk = require('chalk'); var strip = require('strip-ansi'); var util = { /** * Handles tabbed auto-completion based ...
anko/wat
dist/util.js
JavaScript
mit
18,681
// Source : https://leetcode.com/problems/baseball-game // Author : Dean Shi // Date : 2017-09-24 /*************************************************************************************** * * You're now a baseball game point recorder * * Given a list of strings, each string can be one of the 4 following types ...
dnshi/Leetcode
algorithms/BaseballGame.js
JavaScript
mit
2,609
pc.extend(pc, function () { function sortDrawCalls(drawCallA, drawCallB) { if (drawCallA.distSqr && drawCallB.distSqr) { return drawCallB.distSqr - drawCallA.distSqr; } else { return drawCallB.key - drawCallA.key; } } // Global shadowmap resources ...
3DGEOM/engine
src/scene/scene_forwardrenderer.js
JavaScript
mit
48,033
const assert = require('chai').assert; const xssSeed = require('../../../src/seed/xss.js'); describe('seed/xss.js', function () { it('format', function () { assert.equal(xssSeed.noStrict(), '<a href="javascript:void(0)">click me!</a>'); }); it('strict format', function () { assert.equ...
lxjwlt/data-seed
tests/src/seed/xss.js
JavaScript
mit
382
(function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD define(['snd.AudioUnit'], factory); } else if (typeof exports === 'object') { // Node } else { // Browser globals (root is window) root.snd = factory(root.snd); } }(this, function(...
h10x64/snd.js
src/class/optional/snd.WaveShaper.js
JavaScript
mit
3,751
// Custom javascript $(function() { $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); ...
midoghranek/midoghranek.github.io
sicons/documentations/assets/js/custom.js
JavaScript
mit
621
//Abstract var TextsEditor = function() { this.Extends = TextsEditorUIComponent; this.initialize = function(name,properties) { this.parent(name,properties); this.keyup_Handler = this.keyup_Handler.bindWithEvent(this); this.addEvent(SjamayeeFacade.KEYUP, this.keyup_Handler); }; this.keyup_Handler = fun...
sjamayee/sjamayee
src/sjamayee/js_old/pmvc/view/components/common/TextsEditor.js
JavaScript
mit
548
export var getMatrixDataTypeDocs = { name: 'getMatrixDataType', category: 'Matrix', syntax: ['getMatrixDataType(x)'], description: 'Find the data type of all elements in a matrix or array, ' + 'for example "number" if all items are a number ' + 'and "Complex" if all values are complex numbers. ' + 'If a matrix ...
Michayal/michayal.github.io
node_modules/mathjs/es/expression/embeddedDocs/function/matrix/getMatrixDataType.js
JavaScript
mit
585
var Dispatcher = require('flux').Dispatcher; var Constants = require('../constants/AppConstants'); var assign = require('object-assign'); var AppDispatcher = assign(new Dispatcher(), { handleViewAction: function(action) { this.dispatch({ source: Constants.PayloadSources.VIEW_ACTION, ...
GLBaird/reactjs
flux-app/src/js/dispatcher/AppDispatcher.js
JavaScript
mit
736
// Compiled by ClojureScript 0.0-2322 goog.provide('clojure.browser.event'); goog.require('cljs.core'); goog.require('goog.events.EventType'); goog.require('goog.events.EventTarget'); goog.require('goog.events'); goog.require('goog.events'); clojure.browser.event.IEventType = (function (){var obj10769 = {};return obj10...
escherize/cljs-quiz
.repl/9552/clojure/browser/event.js
JavaScript
mit
5,897