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 |
|---|---|---|---|---|---|
Ext.define('Ticket.view.dashboard.DashboardModel', {
extend: 'Ext.app.ViewModel',
alias: 'viewmodel.dashboard',
formulas: {
theProject: function(data) {
return data.projects.selection;
},
projectId: function(data) {
return data.theProject.id;
},
... | lucas-solutions/work-server | ext/examples/ticket-app/app/view/dashboard/DashboardModel.js | JavaScript | mit | 2,663 |
'use strict';
const API_GW_URL = "https://api.cpdn.sd2.cz/v1/";
const PAGE_SIZE = 250;
angular.module('cpdnEditor.maps', ['ngRoute'])
.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
$routeProvider.when('/maps/scheme', {
templateUrl: 'components/maps/select-scheme.h... | mpi77/cpdn-editor | app/components/maps/maps.js | JavaScript | mit | 20,418 |
class vaultroaming_synctaskhandler_1 {
constructor() {
}
// System.Runtime.Remoting.ObjRef CreateObjRef(type requestedType)
CreateObjRef() {
}
// bool Equals(System.Object obj)
Equals() {
}
// int GetHashCode()
GetHashCode() {
}
// System.Object GetLifetimeService(... | mrpapercut/wscript | testfiles/COMobjects/JSclasses/VaultRoaming.SyncTaskHandler.1.js | JavaScript | mit | 597 |
var keystone = require('keystone'),
Types = keystone.Field.Types;
/**
* Organisations Model
* ===================
*/
var Organisation = new keystone.List('Organisation', {
autokey: { path: 'key', from: 'name', unique: true }
});
Organisation.add({
name: { type: String, index: true },
logo: { type: Types.Cloud... | spolyak/satori-site | models/Organisation.js | JavaScript | mit | 745 |
describe("(new Voice()).nextNoteStartTimeMin(fraction)", function() {
it("calls min on _startTime with fraction and returns the result",
function() {
var voice = new Voice([]);
spyOn(voice._nextNoteStart, "min").and.returnValue("next note start min");
expect(voice.nextNoteStartTimeMin("fraction"))... | johanThiborgEricson/barbersynth | spec/Voice/specNextNoteStartTimeMin.js | JavaScript | mit | 438 |
exports.config = {
blsAPIKey : '',
requestTimeout : 10000, // Time to wait for a http response, in ms
inputFile : 'input.json',
outputFile : 'output.csv'
} | shoemaker/calc-inflation | sample-config.js | JavaScript | mit | 172 |
'use strict';
const Promise = require('bluebird');
describe('asset_path', () => {
const Hexo = require('../../../lib/hexo');
const hexo = new Hexo(__dirname);
const assetPathTag = require('../../../lib/plugins/tag/asset_path')(hexo);
const Post = hexo.model('Post');
const PostAsset = hexo.model('PostAsset')... | DevinLow/DevinLow.github.io | test/scripts/tags/asset_path.js | JavaScript | mit | 1,234 |
const _ = require('lodash')
module.exports = interpreter = arguments => {
arguments = JSON.parse(arguments)
let entities = []
_.each(arguments.remain, argument => {
if (!(/^(.*)\=(.*)$/).test(argument)) {
let entity = _.last(argument.split('/'))
let path = _.join(_.initial(argument.split('/')), ... | ndabAP/vuex-cli-scaffold | src/helper/interpreter.js | JavaScript | mit | 822 |
/* Copyright © 2009-2010 Adam Harvey
*
* 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, modify, merge, publis... | LawnGnome/cinejs | src/filters/Invert.js | JavaScript | mit | 1,701 |
export const GET_FOLDER_REQUEST = 'GET_FOLDER_REQUEST';
export const GET_FOLDER_SUCCESS = 'GET_FOLDER_SUCCESS';
export const GET_FOLDER_FAILURE = 'GET_FOLDER_FAILURE';
export const UPDATE_CURRENT_FOLDER = 'UPDATE_CURRENT_FOLDER';
export const GET_FILE_REQUEST = 'GET_FILE_REQUEST';
export const GET_FILE_SUCCESS = 'GET_F... | tomhuhges/kesey | src/Editor/constants.js | JavaScript | mit | 926 |
$(document).ready(function() {
$("#aboutBtn").click(function() {
scrollTo("#aboutChunk");
});
$("#socialBtn").click(function() {
scrollTo("#socialChunk");
});
$("#eduBtn").click(function() {
scrollTo("#tamkChunk");
});
$("#forestBtn").click(function() {
... | quido3/quido3.github.io | ORIGINAL/scripts.js | JavaScript | mit | 796 |
// selectbox1.js
//
// This is a simple test script that does the following tests:
// open a website
// validate title
// selects checked selectbox option
//
//
// To Run:
// $ mocha selectbox1.js
// Updated to support version >4 of webdriverio
// required libraries
var webdriverio = require('webdriverio'),
sh... | onewithhammer/web-driver-io-tutorial | selectbox1.js | JavaScript | mit | 2,346 |
var Dispatcher = require('flux').Dispatcher;
//Dispacherを生成
module.exports = new Dispatcher();
| atsumo/react-boilerplate | markdownviewer/src/js/dispacher/app.js | JavaScript | mit | 102 |
module.exports = function (grunt) {
grunt.initConfig({
sass: { // Task
dist: { // Target
files: { // Dictionary of files
'assets/stylesheets/common.css': 'assets/stylesheets/src/common.scss',
'assets/styles... | VenkatramanC/psd2html | Gruntfile.js | JavaScript | mit | 1,135 |
'use strict'
/* eslint-env mocha */
const ethereum = require('../src')
const expect = require('chai').expect
const parallel = require('run-parallel')
const Block = require('ethereumjs-block')
const thousand = require('./data/real-chain/first-1000-blocks.json')
const async = require('async')
describe('block', () => {
... | diasdavid/js-ethereum-libp2p | test/block.spec.js | JavaScript | mit | 1,449 |
function PortalLocation(scene, primaryCamera, portalLocation, sceneLocation) {
this.primaryCamera = primaryCamera;
this.portalLocation = portalLocation;
this.sceneLocation = sceneLocation;
this.skybox = new Skybox(scene, sceneLocation);
this.sphere = new Sphere(scene, sceneLocation);
this.portalCam = new THREE.Pe... | btlee93/threejs_portals | js/PortalLocation.js | JavaScript | mit | 967 |
const { expect } = require('chai')
const smsg = require('../lib/index')
describe('smsg', function () {
describe('smsg#_attachment', function () {
it('returns a valid image attachment', function () {
let x = smsg._attachment('image', 'https://www.images.com/image.png')
expect(x).to.deep.equal({
... | krismuniz/smsg | test/index.js | JavaScript | mit | 5,865 |
/*
* vistaFace
*
* $Id$
*
* License: MIT License
*/
var DEFAULT_FACEDEF_DIR = System.Gadget.path + "\\common\\faceDefs\\Untitled 300.mcface";
var DEBUG = false;
function _VistaFace() {
this.mainFrame = null;
this.faceDefDir = null;
this.currentFace = null;
this.partsBackground = nul... | mayuki/VistaFace.gadget | common/js/vistaFace.js | JavaScript | mit | 14,246 |
import pkg from '../../package.json';
import matches from './matches';
import players from './players';
import tournament from './tournament';
export default class Api {
constructor(http) {
this.http = http;
}
status() {
return new Promise((resolve, reject) => {
this.http
.status()
... | seripap/vainglory | src/api/index.js | JavaScript | mit | 1,321 |
import angular from 'angular';
import template from './dimStoreItem.directive.template.html';
angular.module('dimApp')
.directive('dimStoreItem', StoreItem)
.filter('tagIcon', ['dimSettingsService', function(dimSettingsService) {
var iconType = {};
dimSettingsService.itemTags.forEach((tag) => {
if (... | 48klocs/DIM | src/scripts/store/dimStoreItem.directive.js | JavaScript | mit | 6,048 |
export default (function () {
return 'Redundant file';
}); | gmmorris/gio | packages/babel-plugin-transform-gio/test/fixtures/exports/Should-Wrap-Unnamed-Default-Export-Expression-And-Rexport-Using-Gio/src.js | JavaScript | mit | 60 |
import config from './index.config';
import routerConfig from './index.route';
import runBlock from './index.run';
import { MainController } from './main/main.controller';
import { SearchService } from './main/search.service';
angular
.module('cookery', ['ngResource', 'ui.router', 'ui.bootstrap'])
.config(routerC... | niczak/Cookery | src/app/index.module.js | JavaScript | mit | 419 |
/**
* A simple translation stub to be used for multi-language support
* in diagrams. Can be easily replaced with a more sophisticated
* solution.
*
* @example
*
* // use it inside any diagram component by injecting `translate`.
*
* function MyService(translate) {
* alert(translate('HELLO {you}', { you: 'You... | bpmn-io/diagram-js | lib/i18n/translate/translate.js | JavaScript | mit | 699 |
function who(){
console.log("Who?");
what();
}
function what(){
console.log("What?");
where();
}
function where(){
console.log("Where?");
when();
}
function when(){
console.log("When?");
why();
}
function why(){
console.log("Why?");
who();
}
who();
| quonic/ScreepsWrits | fun/recursiveWWWWW.js | JavaScript | mit | 290 |
(function($, window, document, undefined) {
'use strict';
Foundation.libs.alert = {
name: 'alert',
version: '5.3.0',
settings: {
callback: function() {},
},
init: function(scope, method, options) {
this.bindings(method, options);
},
events: function() {
var self = ... | openfarmcc/OpenFarm | app/assets/javascripts/foundation/foundation.alert.js | JavaScript | mit | 1,370 |
/**
* Created by Alina on 10/26/2016.
*/
import React, { Component } from 'react';
import { injectIntl, intlShape, FormattedMessage, FormattedDate } from 'react-intl';
import { connect } from 'react-redux';
import { getCategories } from '../../../Category/CategoryReducer';
import { createLotRequest, updateLotReques... | AlinaNor/ReactAuction | client/modules/Lot/pages/LotFormPage/LotFormPage.js | JavaScript | mit | 10,067 |
const expect = require('chai').expect;
const url = require('url');
const net = require('net');
const path = require('path');
const createTestCafe = require('../../lib/');
const exportableLib = require('../../lib/api/exportable-lib');
con... | AndreyBelym/testcafe | test/server/create-testcafe-test.js | JavaScript | mit | 5,205 |
import { createStore, applyMiddleware } from 'redux';
import rootReducer from '../reducers/';
import { createLogger } from 'redux-logger';
const store = createStore(
rootReducer,
applyMiddleware(
createLogger()
)
);
export default store;
| gabrielwr/React-Retirement-Calculator | src/store/index.js | JavaScript | mit | 250 |
version https://git-lfs.github.com/spec/v1
oid sha256:8bd2f4b233756aed0ff27eb860c3e091741cd102e930a30fa2b81aeaec44dc81
size 17635
| yogeshsaroya/new-cdnjs | ajax/libs/tinymce/3.5.8/plugins/table/editor_plugin.js | JavaScript | mit | 130 |
var fs = require('fs');
var path = require('path');
var express = require('express');
var router = express.Router();
var Project = require('../db/project');
var Version = require('../db/version');
var projectRootPath = path.resolve(__dirname, '../projects');
router.get('/', function(req, res, next) {
});
// 1.以... | sdgdsffdsfff/leaf | routes/addProject.js | JavaScript | mit | 3,605 |
/// <binding AfterBuild='default' Clean='clean' />
'use strict';
var gulp = require('gulp'),
sass = require('gulp-sass'),
del = require('del'),
rimraf = require("rimraf"),
autoprefixer = require('gulp-autoprefixer'),
csscomb = require('gulp-csscomb'),
cssmin ... | willcodeforcoffee/BrillionCore | src/BrillionCore/gulpfile.js | JavaScript | mit | 2,636 |
'use strict';
$(document).foundation();
$(function() {
var cookiePostfix = '_20170220'
, cookieExpiry = 14
, animationSpeed = 1000
, endPosition = 0
, easing = 'easeOutBack'
, $topText = $('.animated-heading .top')
, $bottomText = $('.animated-heading .bottom')
, ... | wyoumans/WilliamYoumansDotCom-2.0 | public/scripts/custom.js | JavaScript | mit | 5,188 |
var Fraction = require('../src/fractions');
var Expression = require('../src/expressions').Expression;
describe("An expression initialized with an alphabetic variable name", function() {
var x = new Expression("x");
it("initializes", function() {
expect(x).toBeDefined();
});
it("is initalized... | kelsadita/algebra.js | test/expression-spec.js | JavaScript | mit | 26,879 |
$(document).ready(function(){
// window.ParsleyValidator.setLocale('ru');
// $("#fastOrder button[type='submit']").click(function(event) {
// event.preventDefault();
// console.log("submitting start");
// $("#fastOrder form").parsley().validate();
// });
// if($("#fastOrder form... | MichaelTheLi/OhSite | src/js/orderCall.js | JavaScript | mit | 2,254 |
var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'eval-source-map',
entry: {
main: [
'webpack-dev-server/client?http://localhost:8080',
'webpack/hot/only-dev-server',
'./src/main.js'
]
},
output: {
file... | zerocool0686/react-flux-game-settings | webpack.config.js | JavaScript | mit | 1,031 |
"use strict";
(function(moduleTarget,moduleName){
var estructura={};
estructura.variables={
orden :{ tipo:'numerico' ,ancho: 4, esId: true},
fecha :{ tipo:'fecha' ,ancho: 5},
inicio :{ tipo:'hora' ,ancho: 7},
equipo :{ tipo:'texto' ,ancho:12},
tecnico :{ tipo:'texto' ... | emilioplatzer/checklist-server | server/estructura.js | JavaScript | mit | 1,085 |
var _async = require('async');
var db = require('../public/js/controldb');
var { post } = require('../public/js/method');
var ipNo = 0, ips = [];
function fetchJobs() {
return new Promise(async (resolve, reject) => {
console.log(`start to fetch jobs ${Date.now()}`);
try {
await crawlerJob(crawlerJobs);... | hdmy/LagouSpider | crawler/lagou.js | JavaScript | mit | 5,686 |
/**
* Created by vinichenkosa on 12.03.15.
*/
var passport = require('passport');
var url = require('url');
var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
var config = require('../config');
var users = require('../../app/controllers/user.server.controller');
module.exports = function () {
... | winechess/MEAN | config/strategies/google.js | JavaScript | mit | 1,284 |
beforeEach(function() {
jasmine.Ajax.install();
});
afterEach(function() {
jasmine.Ajax.uninstall();
});
function mostRecentAjaxRequest() {
return jasmine.Ajax.requests.mostRecent();
}
| NeatoRobotics/neato-sdk-js | spec/support/specHelper.js | JavaScript | mit | 193 |
var app = angular.module('StrawberryCupcake',
[
'ui.router',
'ui.bootstrap',
'ngCookies',
'ngResource',
'permission',
'uiGmapgoogle-maps',
'btford.socket-io'
]
);
| Sryther/Node-StrawberryCupcake | src/js/app.js | JavaScript | mit | 227 |
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { Frame, RadioInput as BaseRadioInput, stateful } from '../src';
const RadioInput = stateful(BaseRadioInput);
const acceptClick = action('button-accept');
const rejectClick = action('but... | LeagueDevelopers/react-hextech | stories/Frame.js | JavaScript | mit | 1,021 |
// Generated by CoffeeScript 1.8.0
(function() {
var Spine, {{name}},
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; chi... | webcoding/new.app | template/controller.js | JavaScript | mit | 683 |
import Model from '../components/orm'
import { get as ContentSchema } from '../schemas/models/content.yaml'
export default class Content extends Model {
static schema = ContentSchema;
get tableName() {
return 'Content'
}
resource() {
return this.belongsTo('Resource', 'resourceId')
}
}
| vietthang/hapi-boilerplate | src/models/Content.js | JavaScript | mit | 309 |
export default class EditorSystem {
constructor() {
this.hooks = {
'network.connect:post!': ([id]) => {
// Fill up default data.
let data = this.get(id);
if (data.type !== 'editor') return;
Object.assign(data, {
camera: -1, // :S
selected: -1,
se... | yoo2001818/kkiro3d | src/system/editor.js | JavaScript | mit | 2,551 |
'use strict'
module.exports.getDiffer = getDiffer
function createMatrix(m, n) {
var res = []
for (var i = 0; i < m; i++){
var row = []
for (var j = 0; j < n; j++) {
row.push({
length: 0,
sequences: []
})
}
res.push(row)
}
return res
}
function copySequences(source,... | lykkin/alphabet-soup | index.js | JavaScript | mit | 3,070 |
"use strict";
require('su-logger')();
var HC = require('su-healthcheck');
var iter = require('super-iter');
var forEach = iter.forEach;
var reduce = iter.reduce;
var map = iter.map;
var copy = require('useful-copy');
var CONF = require('config');
var co = require('co');
var koa = require('koa');
var latency = requi... | super-useful/su-apiserver | index.js | JavaScript | mit | 6,965 |
(function(jQuery) {
return jQuery.widget("IKS.halloformat", {
options: {
editable: null,
toolbar: null,
uuid: "",
formattings: {
bold: true,
italic: true,
strikeThrough: true,
underline: true
}
},
_create: function(... | rwaldron/create | deps/hallo/format.js | JavaScript | mit | 2,316 |
ScalaJS.impls.scala_collection_mutable_IndexedSeqView$class__newFiltered__Lscala_collection_mutable_IndexedSeqView__Lscala_Function1__Lscala_collection_mutable_IndexedSeqView$Transformed = (function($$this, p) {
return new ScalaJS.c.scala_collection_mutable_IndexedSeqView$$anon$1().init___Lscala_collection_mutable_In... | ignaciocases/hermeneumatics | node_modules/scala-node/main/target/streams/compile/externalDependencyClasspath/$global/package-js/extracted-jars/scalajs-library_2.10-0.4.0.jar--29fb2f8b/scala/collection/mutable/IndexedSeqView$class.js | JavaScript | mit | 6,233 |
/**
* Define settings specific to this server
*/
// Define libraries needed
var path = require('path');
exports.Settings = {
ar: {
// Define the ActiveRules config root, default is a subdirectory relative to this file.
configDir: path.join(__dirname, 'activerules'),
fileUploadPath: 'upl... | bwinkers/ar-bogart | config/settings.js | JavaScript | mit | 334 |
var order;
jQuery(function() {
Stripe.setPublishableKey($('meta[name="stripe-key"]').attr('content'));
order.setupForm();
});
order = {
setupForm: function() {
$('.process_order').submit(function() {
var $form = $(this);
$('input[type=submit]').attr('disabled', true);
$('.stripe-error, .al... | Jellyfishboy/trado-stripe-module | app/assets/javascripts/trado-stripe.js | JavaScript | mit | 2,472 |
import Document from './Document'
const document= new Document
class Sage {
getToolbarButton(button) {
return cy.getSageIframe().find('.iframed-workspace .misc-actions.toolbar .toolbar-button div').contains(button)
}
openNewTableTile() {
cy.getSageIframe().find('.iframed-workspace .codap-table-menu .coda... | concord-consortium/codap | cypress/support/plugin_elements/sage/SagePluginObject.js | JavaScript | mit | 2,840 |
function callApiForMem(hostid,startTime){
$.blockUI(blockUI_opt_all);
$("#chart_memUsage").empty();
$("#chart_memTotal").empty();
$("#memProcess").empty();
removeAllChart();
showMemUsage(hostid, startTime);
showMemTotal(hostid, startTime);
showMemProcessList(hostid);
... | WatchSMS/Dashboard | dist/js/memStatsView.js | JavaScript | mit | 15,631 |
import { getValue, find } from './column.service';
describe('column service', () => {
describe('value', function () {
it('should return field by key', () => {
let value = getValue({ key: 'name' })({ name: 'John' });
expect(value).to.be.equal('John');
});
it('should return value according to value functio... | azkurban/ng2 | projects/qgrid-core/column/column.service.spec.js | JavaScript | mit | 875 |
//
// http://www.cocos2d-iphone.org
//
// Javascript + chipmunk tests
//
require("javascript-spidermonkey/helper.js");
var director = cc.Director.getInstance();
var _winSize = director.winSize();
var winSize = {width:_winSize[0], height:_winSize[1]};
var centerPos = cc.p( winSize.width/2, winSize.height/2 );
var sce... | ellongrey/CocosBuilder | CocosPlayer/tests/SpiderMonkeyTest/javascript-spidermonkey/test-chipmunk.js | JavaScript | mit | 12,310 |
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import 'normalize.css'
import './assets/style.scss'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-default/index.css'
import App from './App'... | JarvisYuan/douban-movie | src/main.js | JavaScript | mit | 552 |
/*
* GET home page.
*/
exports.index = function(req, res){
res.render('index', { title: 'F13 The Game: The Site', link: '/part1' });
};
/*
* Let's get Part 1, shall we?
*/
exports.part1 = function(req, res){
res.render('gamepage', { title: 'The Start', heading: 'The campers show up', description: 'These campers... | gutsy/f13thegamethesite | f13thegamethesite/routes/index.js | JavaScript | mit | 2,378 |
(function(NS){
'use strict';
/*global _*/
/*global google*/
NS.mode = {
hasRoute: false,
hasPlaces: false,
hasLocation: false,
geoLocActive: true,
gettingSubRouteMode: 'none',
};
NS.userLocation = {};
NS.pathFilterMode = 'wholeRoute'; //default value
NS.pathFilterCallback = {};
NS... | dcorns/AlongTheWayII | controller/src/controller.js | JavaScript | mit | 4,217 |
var assert = require('assert');
var oms = require('../')();
function uniqueId() {
function s4() {
return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
}
return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
s4() + '-' + s4() + s4() + s4();
}
describe('Doc Find', function(){
descr... | johnvmt/mongolocal | test/docFind.js | JavaScript | mit | 2,141 |
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs = Foundation.libs || {};
Foundation.libs.orbit = {
name: 'orbit',
version: '4.2.0',
settings: {
timer_speed: 10000,
pause_on_hover: true,
resume_on_mouseout: false,
animation_speed: 500,
bulle... | mwsidler/famplify | javascripts/foundation/foundation.orbit.js | JavaScript | mit | 15,413 |
const Promise = require('bluebird'),
{ map, coroutine } = require('bluebird'),
fs = Promise.promisifyAll(require('fs')),
{ join, normalize, relative } = require('path'),
match = normalize('src/di'),
root = normalize('node_modules/@angular/core/src')
type = join(root, 'type.d.ts')
fs.mkdirSync(normalize('.... | calebboyd/angular.di | copy-types.js | JavaScript | mit | 1,096 |
// an example karma.conf.js
module.exports = function(config) {
config.set({
basePath: '..',
frameworks: ['mocha', 'browserify', 'chai'],
browsers: [
'Chrome',
],
files: [
'index.js',
{ pattern: 'lib/**/*.js', served: false, included: false },
{ pattern: 'test/tests/setup.j... | yanatan16/tethr.io | test/karma.conf.js | JavaScript | mit | 547 |
const crypto = require('crypto');
module.exports = {
sha256: (str, secret = '') =>
crypto.createHmac('sha256', secret)
.update(str)
.digest('hex')
};
| WebReflection/common-js | js-node/converter.js | JavaScript | mit | 176 |
version https://git-lfs.github.com/spec/v1
oid sha256:824e1274debe8cce3024460b37f9e74c3090f7216b3bf6fe293ab6c3bde2debd
size 27700
| yogeshsaroya/new-cdnjs | ajax/libs/webshim/1.13.1/minified/shims/combos/3.js | JavaScript | mit | 130 |
const http = require('http');
const request = require('request');
const requestIp = require('../src/index.js');
const tapSpec = require('tap-spec');
const test = require('tape');
test.createStream().pipe(tapSpec()).pipe(process.stdout);
// Setup local server for testing
const serverInfo = {
host: '127.0.0.1',
};
... | pbojinov/request-ip | test/index.js | JavaScript | mit | 18,042 |
var css = require('css');
var SourceMap = require('source-map');
var SelectorMap = require('./selector-map');
var LineEditor = require('./line-editor');
var string = require('./string');
var camelCase = require('camelcase');
var os = require('os');
var md5 = require('md5');
function mangle(cssSource, sourceMap, option... | manse/stylus-css-modules | lib/mangle.js | JavaScript | mit | 2,707 |
jest.dontMock('../solutions/242-valid-anagram');
describe('Valid anagram of two given strings', function () {
var valid = require("../solutions/242-valid-anagram");
it('show true when passing "abcd" and "dcba"', function () {
expect(valid("abcd", "dcba")).toBe(true);
});
it('show false when p... | shuson/leetcode_solutions | __tests__/242-valid-anagram-test.js | JavaScript | mit | 556 |
'use strict';
var csrf;
var suburl;
function initCommentPreviewTab($form) {
var $tabMenu = $form.find('.tabular.menu');
$tabMenu.find('.item').tab();
$tabMenu.find('.item[data-tab="' + $tabMenu.data('preview') + '"]').click(function () {
var $this = $(this);
$.post($this.data('url'), {
... | mark77z/tt2016 | public/js/gogs.js | JavaScript | mit | 58,963 |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import np from './NotificationPresenter';
import ps from './PubSub';
import uuid from 'uuid';
import PubSub from 'pubsub-js';
ps.ps = PubSub;
ps.uuid = uuid;
np.ps = ps;
it('renders without crashing', () => {
const div = document... | hannes-hochreiner/more-podcasts | src/App.test.js | JavaScript | mit | 380 |
(function(root){
var WidgetEditor = function(){
var self = this;
self.addUpdateBtnText = ko.observable('Save');
self.processSegment = true;
self.dataKeys = ko.observableArray();
self.selectedDataKey = ko.observable();
self.dataSource = ko.observable();
... | maneeshpal/Drata | content/js/widgeteditor.js | JavaScript | mit | 8,092 |
/* globals localStorage */
import _ from 'lodash';
import * as util from '../util';
import ConfigProvider from '../provider';
export default class LocalStorageConfigProvider extends ConfigProvider {
constructor(options = {}) {
super();
if (typeof localStorage === 'undefined') {
throw new Error('Web S... | lxndr/node-config | src/providers/localStorage.js | JavaScript | mit | 1,170 |
class ThumbnailsDirective {
constructor() {
this.restrict = 'EA';
this.templateUrl = 'thumbnails/thumbnails.html';
this.scope = {
list: '='
};
}
}
export default {
name: 'thumbnails',
fn: () => {
return new ThumbnailsDirective();
}
};
| mushdigital20/flikr-search | app/directives/thumbnails/thumbnails.js | JavaScript | mit | 305 |
'use strict';
// MODULES //
var partial = require( './partial.js' );
// QUANTILE //
/**
* FUNCTION: quantile( out, arr, mu, beta )
* Evaluates the quantile function for a Gumbel distribution with location parameter `mu` and scale parameter `beta` for each array element.
*
* @param {Array|Int8Array|Uint8Array|Uint8... | distributions-io/gumbel-quantile | lib/typedarray.js | JavaScript | mit | 1,042 |
/*global define*/
define([
'jquery',
'backbone',
'underscore',
'facebook',
'twitter'
], function ($, Backbone, _, Facebook, twitter) {
'use strict';
var S = function () {
this.initialize.apply(this, arguments);
};
_.extend(S.prototype, Backbone.Events, {
/**
* The configuration
* @type {Object}
... | drewloomer/backbone.loomutils | src/helpers/social.js | JavaScript | mit | 3,014 |
'use strict'
const tap = require('tap')
const test = tap.test
const tyval = require('../tyval')
test('number', (t) => {
t.plan(4)
t.is(typeof tyval.number, 'function')
let num = tyval.number()
t.is(typeof num, 'function')
t.true(num(1))
t.false(num('test'))
})
test('number.max', (t) => {
t.plan(4)
t.... | delvedor/Tyval | test/number.js | JavaScript | mit | 3,308 |
/**
* Blueprint API Configuration
* (sails.config.blueprints)
*
* These settings are for the global configuration of blueprint routes and
* request options (which impact the behavior of blueprint actions).
*
* You may also override any of these settings on a per-controller basis
* by defining a '_config' key in... | AoX04/Guatauba | config/blueprints.js | JavaScript | mit | 9,193 |
'use strict';
/*jslint vars:true*/
var fs = require('fs');
function get_root_folder(path) {
var files = fs.readdirSync(path);
for (var i = 0; i < files.length; i++) {
var file = files[i];
if (file === 'root') {
return path + '/' + file;
} else if (/^root\(.*\)/.test(file)) {
... | jsPLNE/jsweb | lib/jsweb-get-host.js | JavaScript | mit | 2,598 |
(function () {
'use strict';
angular.module('app', ['ngAnimate', 'ngCookies', 'ngResource', 'ngSanitize', 'ngTouch', 'ngStorage', 'ui.router', 'ui.bootstrap', 'ui.load', 'ui.jq' /* , 'ui.validate', */, 'oc.lazyLoad', 'pascalprecht.translate']);
})();
| tmukherjee13/generator-ng-ui | generators/theme/templates/files/js/app.js | JavaScript | mit | 255 |
'use strict';
module.exports = {
images: {
files: [
{ cwd: 'public/images/', src: ['**/*.svg'] }
]
}
};
| machal/web-mine | grunt/svg2png.js | JavaScript | mit | 127 |
(function(utils) {
utils.checkHorizontalPosition = function(element, margin) {
var offset = element.offset();
if (!margin) margin = 5;
if (offset.left < margin)
element.css({ 'margin-left': margin - offset.left });
var right = offset.left + element.outerWidth();
... | danderson00/tribe.misc | Components/Infrastructure/elements.js | JavaScript | mit | 2,645 |
define([
'jquery',
'bootstrap'
], function(
$
){
'use strict';
var dfd;
$(document).ready(function() {
$('#alert button').click(function(){
dfd.resolve();
});
});
window.alert = function(text, title) {
dfd = $.Deferred();
if(!!title) {
$('#alert .modal-title').text(title)... | danyg/Scrum4Display | app/js/modals.js | JavaScript | mit | 580 |
var http = require('request');
var debug = require('debug')('apps:test');
//HOW to add a new app to the bot:
// 1. write a file like this one, declaring a run() function.
// param, is the second text written in a chat after the command. E.g., /test abc, in this case 'abc' is the param
// chat, is always the chat... | pintux/whataboutBot | apps/test.js | JavaScript | mit | 1,102 |
import React from 'react';
import {
View,
Text,
ActivityIndicator,
StyleSheet,
Dimensions
} from 'react-native';
import {Strings, Colors} from '../../utils/Theme';
const LoadingFooter = ({finished, error}) => {
if (error) {
return (
<View style={styles.footerContainer}>
<Text style={[styl... | gongmingqm10/Dribbble-ReactNative | src/components/common/LoadingFooter.js | JavaScript | mit | 1,151 |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
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 ("va... | thinktopography/reframe | dist/components/message/index.js | JavaScript | mit | 5,512 |
/**
_ _____ _ _ _
| | __ \ (_) | | | |
___ ___ | | |__) |___ ___ _ ______ _| |__ | | ___
/ __/ _ \| | _ // _ \/ __| |_ / _` | '_ \| |/ _ \
| (_| (_) | | | \ \ __/\__ \ |/ / (_| | |_) | | __/
\___\___/|_|_| \_\__... | forwardNow/pkui | src/lib/jquery/plugin/colResizable/1.6.0.x/colResizable.js | JavaScript | mit | 22,199 |
(function ( $ ) {
var INTERVAL = 50;
var ACTION_TYPED = "TYPED";
var ACTION_UNTYPING = "UNTYPING";
var ACTION_UNTYPED = "UNTYPED";
var ACTION_TYPING = "TYPING";
var ACTION_DELETED = "DELETED";
var TypeItController = function(element, phrases, options) {
var controller = this;
... | riabchenkovlad/typeit.js | typeit.js | JavaScript | mit | 4,920 |
import React from 'react'
import Helmet from 'react-helmet'
import { config } from 'config'
import { prefixLink } from 'gatsby-helpers'
import { Link } from 'react-router'
import bed1 from '../image/accomodation3.jpg'
import coworking from '../image/cowork-cape-town.jpg'
import activities from '../image/acti... | aimanaiman/supernomadfriendsquad | pages/how.js | JavaScript | mit | 6,489 |
'use strict';
angular.module('gnApp')
.controller('AdminCtrl', ['$scope', '$http', function($scope, $http){
show_animation();
$scope.admin = [];
$http.post('gn_get_admin').success(function(data) {
if(data) {
$scope.admin = data;
} else {
show_warning('Unexp... | Deepak0110/codeigniter-angularjs-mongodb-university-notes-download | assets/angularjs/controllers/admin-ctrl.js | JavaScript | mit | 1,646 |
'use strict';
var GameSpace = {};
/**
* Launches the whole games. Initializes states
*/
(function() {
window.onload = function() {
GameSpace.game = new Phaser.Game(GameSpace.config.windowSizeX, GameSpace.config.windowSizeY, Phaser.AUTO, 'gameContainer');
GameSpace.game.state.add('Boot', GameSpace.BootStat... | LetsCoders/MassiveTanks | src/main/webapp/client/app/app.js | JavaScript | mit | 500 |
import React, { Component } from 'react';
import WindowFocus from '../../../windowFocus';
import { themeContextTypes } from '../../../style/theme/windows';
import { backgroundContextTypes } from '../../../style/background/windows';
import { isDarkColor } from '../../../color';
import Radium from 'radium'
var styles = ... | gabrielbull/react-desktop | src/TitleBar/windows/Controls/Minimize.js | JavaScript | mit | 1,997 |
// @flow
import { Schema } from 'normalizr';
import { merge } from 'lodash';
import { version } from 'package.json';
import { Platform } from 'react-native';
import Schemas from './schemas';
import { repoQuery } from './queries';
type SpecialParameters = {
forceRefresh?: boolean,
loadMore?: boolean,
perPage?: ... | gitpoint/git-point | src/api/client.js | JavaScript | mit | 11,031 |
var _ = require('lodash');
var Command = function (name, opcode, bytes) {
this.name = name;
this.opcode = opcode;
this.bytes = _.isNumber(bytes) ? bytes : null;
};
module.exports.Start = new Command('start', 128, 0);
module.exports.Baud = new Command('baud', 129, 1);
module.exports.Safe = new Command('safe', 13... | jasontbradshaw/irobot | lib/commands.js | JavaScript | mit | 1,582 |
//// Server startup through a single entry point.
//// If the app loads with an empty db, fill it with a starting set of data.
import './fixtures.js';
//// Define all methods and publications.
import './register-api.js';
| richplastow/datagrater-demo-1 | imports/startup/server/index.js | JavaScript | mit | 226 |
/**
* Dashboard Controller
*/
customerApp.controller('dashboardCtrl', function ($scope, $http, $rootScope, $location, $timeout) {
$scope.password = {};
//check if user is login
$scope.me = function () {
if(!$rootScope.user) {
$http.get(baseUrl + 'customer/me').success(function (response) {
if(response... | Bizdesire/iAdwisor-dev | assets/angular/customer/dashboardCtrl.js | JavaScript | mit | 4,274 |
const webpack = require("webpack")
const path = require("path")
module.exports = {
entry: "./example/index.js",
output: {
path: path.resolve(__dirname, "example/dist"),
filename: "bundle.js",
},
module: {
loaders: [
{
loader: "babel-loader",
test: /\.js?$/,
exclude: [p... | roman01la/html-to-react-components | webpack.config.js | JavaScript | mit | 540 |
(function() {
'use strict';
/**
* Component for the community page. Retrieves scores from the backend
* and displays them.
* @returns {directive}
*/
var communityDirective = function() {
return {
restrict: 'E',
scope: {},
controller: 'vgCommun... | veganaut/veganaut | app/veganaut/community/community.js | JavaScript | mit | 4,740 |
import {SerializerValidation, TransactionBuilder, TransactionHelper} from "bitsharesjs/es";
import ApplicationApi from "./ApplicationApi";
const WalletApi = {
new_transaction() {
return new TransactionBuilder();
},
sign_and_broadcast( tr, broadcast = true ) {
SerializerValidation.required... | openledger/graphene-ui | web/app/api/WalletApi.js | JavaScript | mit | 1,640 |
'use strict'
const Koa = require('koa')
const path = require('path')
const gulp = require('gulp')
const ava = require('gulp-ava')
const mount = require('mount-koa-routes')
const sourcePath = ['test/**/*.js', 'lib/*.js']
gulp.task('watch', function () {
gulp.watch(sourcePath, ['ava'])
})
gulp.task('test', function... | moajs/moa2 | gulpfile.js | JavaScript | mit | 767 |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import addMention from '../addMention';
import KeyDownHandler from '../../../event-handler/keyDown';
import SuggestionHandler from '../../../event-handler/suggestions';
import './styles.css';
class Sugges... | michalko/draft-wyswig | src/decorators/Mention/Suggestion/index.js | JavaScript | mit | 8,016 |
var fs = require('fs');
var esprima = require('esprima');
var estraverse = require('estraverse');
var doctrine = require('doctrine');
var util = require('./util');
module.exports = function(filePath, offset, model, prototype) {
var baseName = model.modelName.match(/[A-Z][^A-Z]+/g).map(function (token) {
... | app55/apiom.js | src/doc-parser.js | JavaScript | mit | 9,194 |
'use es6';
import {Map} from 'immutable';
import Coordinate from '../../data/Coordinate';
import CoordinateBuilder from '../../data/builders/CoordinateBuilder';
import NearbyDriversSearch from '../NearbyDriversSearch';
export default class NearbyDriversSearchBuilder {
static build(json) {
let args = Map();
... | djchie/lyft-node | src/search/builders/NearbyDriversSearchBuilder.js | JavaScript | mit | 585 |