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 |
|---|---|---|---|---|---|
/* jshint camelcase: false */
module.exports = function (cfg, db) {
var _ = require('lodash'),
services = require('./services')(cfg, db),
userMod = require('./users')(cfg, db),
fileMod = require('./file')(cfg, db);
function GDrive(userId) {
return userMod.Repo.getById(u... | jigarjain/singlehood | core/sync.js | JavaScript | mit | 3,050 |
var browserify = require( 'gulp-browserify' ),
gulp = require( 'gulp' ),
buffer = require( 'vinyl-buffer' ),
uglify = require( 'gulp-uglify' ),
rename = require( 'gulp-rename' ),
insert = require( 'gulp-insert' );
gulp.task( 'client', function(){
var out = gulp.src( './scripts/gibber/interface.li... | charlieroberts/gibber.interface.lib | gulpfile.js | JavaScript | mit | 658 |
import React from 'react';
import { mount } from 'enzyme';
import localStorageMock from '../__mocks__/localStorageMock';
import * as data from '../__mocks__/mockData';
import {
MessageAreaContainer
} from '../../dev/js/containers/MessageAreaContainer.jsx';
window.localStorage = localStorageMock;
jest.mock('react-... | ayodelevm/PostIt | client/test/containers/MessageAreaContainer.test.js | JavaScript | mit | 2,095 |
{
var config = oneEventLoopTestConfig(three);
config.startShouldSetResponder.captured.grandParent = {
order: 0,
returnVal: false
};
config.startShouldSetResponder.captured.parent = {
order: 1,
returnVal: false
};
config.startShouldSetResponder.captured.child = {
order: 2,
returnVal: ... | stas-vilchik/bdd-ml | data/7711.js | JavaScript | mit | 2,186 |
/**
* 二元操作表达式
* @abstract
*/
define( function ( require, exports, modules ) {
var kity = require( "kity" );
return kity.createClass( 'BinaryExpression', {
base: require( "expression/compound" ),
constructor: function ( firstOperand, lastOperand ) {
this.callBase();
... | Inzaghi2012/formula | src/expression/compound-exp/binary.js | JavaScript | mit | 860 |
"use strict";
let logs = require("../logs");
let assert = require("assert");
describe("logs DB collection", function () {
let userID = 1;
let log = {
title: "Food Journal"
};
let logID = "";
it("should create a log", function () {
return logs.createLog(global.db,userID,log).then(function (savedLog) {
asse... | dabowheel/chronofeed | mongodb/spec/logs-spec.js | JavaScript | mit | 1,641 |
'use strict'
const express = require('express');
const router = express.Router();
const auth = require('../controllers/authController');
/* GET users listing. */
router.post('/login', auth.login);
router.post('/register', auth.register);
module.exports = router;
| tamatamvan/cms-api | server/routes/auth.js | JavaScript | mit | 265 |
import React from "react"
import {Heading, CodePane, Text, Appear} from "spectacle"
const colorSchemes = {
a: {
textColor: 'primary',
bgColor: 'black'
},
b: {
textColor: 'secondary',
bgColor: 'secondary'
}
}
export default ({name, es6, es5, scheme, codeSize = 18}) => {
const colorScheme = co... | jacob-israel-turner/ES4life | presentation/slides/Example.js | JavaScript | mit | 1,215 |
// Separate Numbers with Commas in JavaScript **Pairing Challenge**
// I worked on this challenge with: Tiffany Larson.
// Pseudocode
// Create a new container.
// Remove back number from original container and add it to the front of the new container.
// Do this three times or until original container is empty.
// ... | jamesponeal/phase-0 | week-7/nums-commas.js | JavaScript | mit | 2,784 |
import * as types from '../mutation-types';
import * as api from '@/api';
let state = {
content: '',
};
let actions = {
getBlogContent ({ commit }, payload) {
api.getBlogContent(payload.blogName)
.then((data) => {
commit({
type: types.OPEN_SOME_BLOG,
... | targeral/vug | src/store/modules/someblog.js | JavaScript | mit | 574 |
module.exports = {
main: {
files: [{
expand: true,
cwd: '<%= app %>/fonts',
src: ['**'],
dest: '<%= build %>/fonts'
}, {
expand: true,
cwd: 'content/projects/videos',
src: ['**'],
dest: '<%= build %>/videos/projects'
}]
}
};
| Vizzuality/vizzuality | lib/tasks/copy.js | JavaScript | mit | 289 |
var User = require('./fixtures/User');
var should = require('should');
describe('User', function(){
describe('#save()', function(){
it('should save without error', function(done){
var user = new User('Luna');
// user.save takes a callback -
// remember mocha's done will accept a potential err... | wearefractal/mocha-adventure | test/saveUser.js | JavaScript | mit | 384 |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... | PiotrDabkowski/Js2Py | tests/test_cases/built-ins/Object/create/15.2.3.5-4-96.js | JavaScript | mit | 972 |
/*======================================================
************ Picker ************
======================================================*/
/* global $:true */
+ function($) {
"use strict";
//Popup 和 picker 之类的不要共用一个弹出方法,因为这样会导致 在 popup 中再弹出 picker 的时候会有问题。
$.openPopup = function(popup, className) ... | ptphp/ptphp | app/src/Frontend/modules/weui/res/js/popup.js | JavaScript | mit | 1,196 |
var margin = {
top: 50,
right: 62,
bottom: 100,
left: 50
},
dim = Math.min(parseInt(d3.select("#chart").style("width")), parseInt(d3.select("#chart").style("height"))),
width = dim - margin.left - margin.right,
height = dim - margin.top - margin.bottom;
//width = 700 - ma... | voltdatalab/graficos | posts/random/prelim/back.js | JavaScript | mit | 11,316 |
// 定一个 reducer
function reducer(state, action) {
/* 初始化 state 和 switch case */
if (!state) {
return {
title: {
text: 'React.js 小书',
color: 'red'
},
content: {
text: 'React.js 小书内容',
color: 'blue'
... | BadWaka/waka-website | admin/src/redux-study/redux.js | JavaScript | mit | 2,747 |
var fs = require('fs');
var path = require('path');
var recursive = require('recursive-readdir-sync');
var git = require('simple-git');
var posts_data = __dirname + '/../data/posts_dates.json';
createFile(posts_data);
var listOfPosts = recursive(__dirname + '/../posts/');
var cleanedListOfPosts = listOfPosts.filter(... | jumasheff/jumasheff.github.io | tools/getCreationDates.js | JavaScript | mit | 1,165 |
import React from "react";
import { shallow } from "enzyme";
import App from "../../renderer/Components/App";
import EmojiPad from "../../renderer/Components/EmojiPad";
test("<App /> should have div with <EmojiPad />", () => {
const app = shallow(<App />);
expect(
app.contains(
<div id="app-container" cl... | saisandeepvaddi/winimoji | __tests__/Compontents/App.test.js | JavaScript | mit | 410 |
require([
"esri/Map",
"esri/views/SceneView",
"dojo/domReady!"
], function(Map, SceneView) {
var map = new Map({
basemap: "streets",
ground: "world-elevation"
});
var view = new SceneView({
container: "viewDiv", // Reference to the DOM node that will contain the view
map: map // References... | zxgaoray/olmapc9 | public/test/ags3d/main.js | JavaScript | mit | 363 |
'use strict';
const { readFileSync, readdirSync, writeFileSync } = require('fs');
// Get all markdown stubs
const header = readFileSync('bundler/header.md', 'utf-8');
const badges = readFileSync('bundler/badges.md', 'utf-8');
const installation = readFileSync('bundler/installation.md', 'utf-8');
const api = readFileS... | ecrmnn/collect.js | bundler/bundle.js | JavaScript | mit | 1,517 |
// JavaScript Document
//Override the default setting
$(document).bind("mobileinit", function(){
$.mobile.defaultPageTransition = 'slide';
}); | Joao-S-Martins/ecoactivist | www/js/preMobile.js | JavaScript | mit | 147 |
'use strict';
/** Module for browsing transfer endpoints. */
angular.module('stork.transfer.browse', [
'ngCookies'
])
.service('history', function (stork) {
var history = [];
var listeners = [];
this.history = history;
this.fetch = function (uri) {
stork.history(uri).then(function (h) {
history ... | didclab/stork | web/app/transfer/browse/browse.module.js | JavaScript | mit | 7,953 |
const NODE_ENV = process.env.NODE_ENV || 'development'
module.exports = {
/** The environment to use when building the project */
env: NODE_ENV,
/** The full path to the project's root directory */
basePath: __dirname,
/** The name of the directory containing the application source code */
srcDir: 'src',
... | SKing7/react-starter | project.config.js | JavaScript | mit | 1,192 |
var config = require('../config').logger;
var bunyan = require('bunyan');
var logstash = require('bunyan-logstash-tcp');
module.exports = function createLogger(){
var log = bunyan.createLogger({
name: 'rabbitmq-connector',
streams: [
{
type: 'raw',
stream: logstash.createStream({
host: config.logStash... | Miutcank/s3-connector | utils/logger.js | JavaScript | mit | 655 |
/*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Web Client
* Copyright (C) 2006, 2007, 2008, 2009, 2010 Zimbra, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obt... | nico01f/z-pec | ZimbraWebClient/WebRoot/js/zimbraAdmin/resource/controller/ZaResourceController.js | JavaScript | mit | 13,443 |
Sammy('#main', function() {
this.get('/', function() {
var zis = this;
this.something = true;
this.title = 'Hello!';
this.name = this.params.name;
// render the template and pass it through handlebars
this.partial('templates/home.hb');
s... | kantoorwolven/kantoorwolven | public/js/splash.js | JavaScript | mit | 565 |
alert(2) | Luixo/stepic_webserver | uploads/test.js | JavaScript | mit | 8 |
'use strict';
var assert = require('assert');
describe('basic', function () {
it('should compile a Smash module', function () {
var core = require('../!./fixtures/core.js');
assert.equal('string', typeof(core.hello));
assert.equal('world', core.hello);
});
});
| packetloop/smash-loader | test/basic.test.js | JavaScript | mit | 280 |
Package.describe({
name: 'rocketchat:livechat',
version: '0.0.1',
summary: 'Livechat plugin for Rocket.Chat'
});
Package.registerBuildPlugin({
name: 'Livechat',
use: [],
sources: [
'plugin/build-livechat.js'
],
npmDependencies: {
'shelljs': '0.5.1'
}
});
Npm.depends({
'ua-parser-js': '0.7.10'
});
Packa... | fazilou/chat | packages/rocketchat-livechat/package.js | JavaScript | mit | 9,936 |
(function () {
"use strict";
var PLUGIN_ID = require("./package.json").name,
MENU_ID = "Blendin generator",
MENU_LABEL = "$$$/JavaScripts/Generator/Blendin generator/Menu=Blendin generator";
var _generator = null,
_currentDocumentId = null,
_config = null;
var fs =... | kristjanmik/generator-assets | plugins/blendin/mainduplicate.js | JavaScript | mit | 7,518 |
import selectorParser from "postcss-selector-parser"
import {
isKeyframeRule,
isStandardRule,
isStandardSelector,
isStandardTypeSelector,
report,
ruleMessages,
validateOptions,
} from "../../utils"
export const ruleName = "selector-type-case"
export const messages = ruleMessages(ruleName, {
expected: ... | mghak/mghak.github.io | node_modules/stylelint/src/rules/selector-type-case/index.js | JavaScript | mit | 1,467 |
// Chord types
const SoundFontType = {
STANDARD_LIGHT: 0,
STANDARD_HEAVY: 1,
// NES_STYLE: 2,
SNES_STYLE: 2,
// OPL2FM_STYLE: 4,
GXSCC_STYLE: 3,
// GB_STYLE: 6,
getSamplesPrefix: function(type) {
switch (type) {
case SoundFontType.STANDARD_LIGHT:
... | paulpach/abundant-music | js/composer/soundfont.js | JavaScript | mit | 2,466 |
import { expect } from 'chai';
import FormLogic from '../src';
describe('Field', () => {
it('creates fields with presence validation', () => {
const field = FormLogic.Field({ presence: true });
expect(field.validations.length).to.equal(1);
expect(field.validations[0].validationName).to.equal('presence'... | jaroslawr/react-form-logic | test/Field.test.js | JavaScript | mit | 824 |
/**
* This file is a part of hale_aloha_dashboard.
*
* Created by Cam Moore on 11/12/15.
*
* Copyright (C) 2015 Cam Moore.
*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
... | wattdepot/hale_aloha_dashboard | client/subscriptions/hourly.js | JavaScript | mit | 1,260 |
/**
* Created by hbzhang on 4/2/15.
*/
angular.module('mean.front').controller('FrameSecondMainContentController', ['$scope','Global','Restangular','Program','$location',
function($scope,Global,Restangular,Program,$location) {
$scope.global = Global;
$scope.package = {
name: 'front'
... | hbzhang/me | me/packages/custom/front/public/controllers/secondary/FrameSecondMainContentController.js | JavaScript | mit | 1,473 |
var dbclient = require('mongodb').MongoClient;
var url = 'mongodb://localhost:27017/quadavore';
module.exports = function(cb)
{
dbclient.connect(url, function(err, db)
{
console.log('Connected to MongoDB');
cb(db);
});
};
| Pancakeo/quadavore | server/db.js | JavaScript | mit | 251 |
/** Net.JS 0.0.1 */
/*!
* Net.JS
* Copyright(c) 2011 Oleg Shparber <trollixx@gmail.com>
* MIT Licensed
*/
/**
* @namespace
*/
var net = this.net = {
/**
* Library version.
*/
version: '0.0.1',
/**
* Applet loading states.
*
* @type {Objects}
* @api private
*/
... | trollixx/net.js | net.js | JavaScript | mit | 10,634 |
import Button from './markdown-button';
import layout from '../templates/components/markdown-code';
export default Button.extend({
layout,
precede: '`',
succeed: '`'
});
| jswanner/markdown-buttons | addon/components/markdown-code.js | JavaScript | mit | 177 |
'use strict';
angular.module('flagMatchApp.version', [
'flagMatchApp.version.interpolate-filter',
'flagMatchApp.version.version-directive'
])
.value('version', '0.1');
| aperala/concentration-flags | app/components/version/version.js | JavaScript | mit | 174 |
"use strict";
var test = require("tape");
var ellipsize = require("../src/index");
var ELLIPSE = "…";
test("ellipsize simple cases", function (assert) {
var cases = [
{
label: "zero length string",
len: 100,
string: "",
expect: "",
},
{
... | mvhenten/ellipsize | test/index.js | JavaScript | mit | 5,818 |
module.exports = function () {
return {};
};
| Robert-W/esri-redux | __mocks__/function.js | JavaScript | mit | 47 |
// <details> polyfill
// http://caniuse.com/#feat=details
// FF Support for HTML5's <details> and <summary>
// https://bugzilla.mozilla.org/show_bug.cgi?id=591737
// http://www.sitepoint.com/fixing-the-details-element/
;(function() {
'use strict'
var NATIVE_DETAILS = typeof document.createElement('details').ope... | noms-digital-studio/licences | assets/javascripts/details.polyfill.js | JavaScript | mit | 6,475 |
// flow-typed signature: e7c03a4ac695e4a014530cf5ab6c79da
// flow-typed version: <<STUB>>/randexp_v^0.4.3/flow_v0.37.0
/**
* This is an autogenerated libdef stub for:
*
* 'randexp'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* co... | mjhm/cukelib | flow-typed/npm/randexp_vx.x.x.js | JavaScript | mit | 2,157 |
import { callbackURLPrefix } from '../server';
const callbackURL =
process.env.NODE_ENV === 'production'
? `${callbackURLPrefix}/api/oauth2/github/callback`
: 'http://localhost:8000/api/oauth2/github/callback';
const githubApp = {
clientID: '',
clientSecret: '',
callbackURL,
};
export default githubA... | XuHaoJun/tiamat | server/configs/oauth2/github.js | JavaScript | mit | 324 |
!function ($) {
$('#tooltip1').tooltip();
$('#tooltip2').tooltip();
}(window.jQuery)
| combogenomics/contiguator-webapp | static/js/misc.js | JavaScript | mit | 102 |
var mongoose = require('mongoose');
var bcrypt = require('bcrypt-nodejs');
var userSchema = mongoose.Schema({
local: {
email: String,
password: String,
isAdmin: Boolean
}
});
userSchema.methods.generateHash = function(password) {
return bcrypt.hashSync(password, bcrypt.genS... | dzt/ftp | server/user.js | JavaScript | mit | 517 |
import format from 'date-fns/format';
import { createSelector } from 'reselect';
import {
getAccountsCurrencyMap,
getAccountsAsOptions
} from '../../entities/accounts';
import { getBaseCurrency } from '../../settings';
import { defaultKind, TransationKindT } from '../../../entities/Transaction';
const { Expense, I... | ayastreb/money-tracker | src/selectors/ui/form/transaction.js | JavaScript | mit | 2,141 |
function Project(id, type, name, lastActivity) {
this.id = id;
this.type = type;
this.name = name;
this.lastActivity = lastActivity;
}
// The list of all projects currently in the system.
// (Feel free to imagine this came from a database somewhere on page load.)
var CURRENT_PROJECTS = [
new Projec... | rtre84/webdev-exer | src/projects.js | JavaScript | mit | 3,675 |
import { assert, expect } from 'chai';
import Kasmir from '../../src/kasmir';
import config from '../fixtures/config/test.config';
describe('Kasmir - successful test', () => {
let k;
let r;
// Initialize kasmir with some test actions and the
// default config
beforeEach('initialize kasmir instance', (done)... | andreasur/kasmir | test/spec/kasmir.success.js | JavaScript | mit | 775 |
var $ = require('../$'),
Utils = require('../utils/utils'),
Droppable = require('./droppable-class');
$.fn.hqyDroppable = function (options) {
var args = arguments;
return this.each(function () {
var $ele = $(this);
var instance = $ele.data('hqyDroppable');
if (Utils.isString(options)){
instance && inst... | Rockcookies/hqy-interact | src/js/interaction/droppable.js | JavaScript | mit | 970 |
var user = require(__dirname + '/models/user.js');
var bot;
var dummy = {};
function addToClientList(clientList) {
user.findOne({where: {
username: 'bot'
}}).then(function(entity) {
if (entity) {
var zone = entity.sectionX + '_' + entity.sectionY;
clientList[zo... | an-huynh/Block-and-Talk | src/bot.js | JavaScript | mit | 5,624 |
'use strict';
var resourceManager = require('./resource-manager');
var debog = require('./debog');
var relLog = debog('relationships');
var queryLog = debog('query');
/**
* @name query-builder
* @module query-builder
* @description
* build and return query object
*
* @param {object} struct - structure
*... | B-3PO/node-data-transformer | lib/query-builder.js | JavaScript | mit | 7,365 |
var container;
var canvas;
var ctx;
var canvas_height = 300; // px
var canvas_width = 1000; // px
var bar_width = 20;
var bar_count = 2;
var bar_spacing = 10; // px
var bars = []; // array
function start_visualizer() {
canvas = document.getElementById("bars");
ctx = canvas.getContext("2d");
set_canvas_si... | jackinloadup/rainmeter | main.js | JavaScript | mit | 1,091 |
'use strict';
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var config = require('../config');
module.exports = function (gulp) {
gulp.task('test', ['lint'], function (cb) {
gulp.src(['!' + config.paths.cliFile].concat(config.paths.lib))
.pipe(istanbul({
includeUntest... | nachos/native-builder | gulp/tasks/test.js | JavaScript | mit | 717 |
/* eslint-disable ember/no-classic-components */
/**
* @module ember-paper
*/
import Component from '@ember/component';
import { tagName, layout } from '@ember-decorators/component';
import template from './template';
/**
* @class PaperContent
* @extends Component
*/
@tagName('')
@layout(template)
class PaperCont... | miguelcobain/ember-paper | addon/components/paper-content/component.js | JavaScript | mit | 375 |
/* eslint-env node,mocha */
/* global window */
(function(root) {
"use strict";
//
// Run in either Mocha, Karma or Browser environments
//
if (typeof root === "undefined") {
root = {};
}
var saltthepass = root.SaltThePass ? root.SaltThePass : require("../src/saltthepass");
var... | nicjansma/saltthepass.js | test/test-domainnamerule.js | JavaScript | mit | 13,340 |
import Vue from 'vue'
import * as types from './mutation-types'
export const getUserInfo = ({ state, commit }) => {
Vue.resource(state.userInfoUrl).get()
.then(response => {
commit(types.GET_USER_INFO_SUCCESS, response.data)
})
}
| songce521963/vue-node | commodity-web-vue/src/store/actions.js | JavaScript | mit | 263 |
goog.provide('dc.Application');
goog.require('dc.BaseApplication');
goog.require('dc.services.Settings');
goog.require('zb.console');
goog.require('zb.device.Resolution');
/**
* @extends {dc.BaseApplication}
* @constructor
*/
dc.Application = function() {
zb.console.setLevel(zb.console.Level.LOG);
goog.base(thi... | htmlhero/digital-clock | app/dc/application.js | JavaScript | mit | 1,305 |
define(['jquery'], function ($) {define('select2/utils',[], function () {
var Utils = {};
Utils.Extend = function (ChildClass, SuperClass) {
var __hasProp = {}.hasOwnProperty;
function BaseConstructor () {
this.constructor = ChildClass;
}
for (var key in SuperClass) {
if (__hasProp.ca... | umeku/KunstmaanBundlesCMS | src/Kunstmaan/AdminBundle/Resources/ui/vendor_bower/select2/dist/js/select2.amd.js | JavaScript | mit | 101,567 |
/*!
* Copyright(c) 2014 Jan Blaha
*/
/*globals $data */
var async = require("async"),
express = require('express'),
_ = require("underscore"),
path = require("path"),
odata_server = require('odata-server'),
q = require("q"),
bodyParser = require("body-parser"),
cookieParser = require('c... | uttapong/thalinterpreter | node_modules/jsreport/extension/express/lib/reporter.express.js | JavaScript | mit | 5,364 |
import {TiInfinity as icon} from 'react-icons/ti'
export default {
name: 'recursivePopoverTest',
type: 'document',
title: 'Recursive Popover Test',
icon,
fields: [
{
name: 'title',
title: 'Title',
type: 'string',
},
{
name: 'arrayWithAnonymousObject',
title: 'Array w... | sanity-io/sanity | dev/test-studio/schema/debug/recursivePopover.js | JavaScript | mit | 2,699 |
const path = require('path');
const webpack = require('webpack');
const autoprefixer = require('autoprefixer');
// App files location
const PATHS = {
app: path.resolve(__dirname, '../src/js'),
styles: path.resolve(__dirname, '../src/styles'),
build: path.resolve(__dirname, '../build')
};
const plugins = [
// ... | billingb/ruby-sinatra-getting-started | message-client/config/webpack.config.dev.js | JavaScript | mit | 2,156 |
/**
* shortsort
* @param {integer} start - pixel to start at
* @param {integer} end - pixel to end at
*/
Jimp.prototype.shortsort = function shortsort(dir, start, end, cb) {
var width = this.bitmap.width,
height = this.bitmap.height,
data = new Uint32Array(this.bitmap.data),
cut, mm;
if (nullOrUndefined(start)... | JKirchartz/Glitchy3bitdither | source/glitches/shortSort.js | JavaScript | mit | 1,023 |
import _ from 'underscore'
import moment from 'moment'
import rewire from 'rewire'
import sinon from 'sinon'
const app = require('api/index.coffee')
const { fixtures, fabricate, empty } = require('api/test/helpers/db.coffee')
const resolvers = rewire('../resolvers.js')
describe('resolvers', () => {
let article, arti... | kanaabe/positron | api/apps/graphql/test/resolvers.test.js | JavaScript | mit | 12,989 |
import Mat23 from 'math/matrix/mat23/Build.js';
import Scale from 'math/transform/2d/components/Scale.js';
import Position from 'math/transform/2d/components/Position.js';
// A Minimal 2D Transform class
// Components: Position and Scale, baked to a Mat23
// Supports: Immediate or Deferred Updates, Interpolation.
... | photonstorm/lazer | src/math/transform/2d/minimal/Transform.js | JavaScript | mit | 2,352 |
import Class from '../mixin/class';
import Media from '../mixin/media';
import {
$,
addClass,
after,
Animation,
clamp,
css,
dimensions,
fastdom,
height as getHeight,
offset as getOffset,
getScrollingElement,
hasClass,
isString,
isVisible,
noop,
offsetPosit... | uikit/uikit | src/js/core/sticky.js | JavaScript | mit | 11,705 |
var ndarray = require('ndarray');
var show = require('ndarray-show');
var zeros = require('zeros');
var crout = require('../');
var A = ndarray([
2, 1, 1, 3, 2,
1, 2, 2, 1, 1,
1, 2, 9, 1, 5,
3, 1, 1, 7, 1,
2, 1, 5, 1, 8
], [ 5, 5 ]);
var L = zeros([ 5, 5 ]);
var U = zeros([ 5, 5 ]);
crout(A, L, U)... | scijs/ndarray-crout-decomposition | example/5x5.js | JavaScript | mit | 384 |
'use strict';
// Declare app level module which depends on views, and components
var app =angular.module('myApp', [
'ngRoute',
'myApp.milestones',
'myApp.stage',
'myApp.version'
]).
config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) {
$locationProvider.hashPrefix('!');... | efratoio/shecodes.gamification | app/app.js | JavaScript | mit | 1,186 |
import React, { Component } from "react";
export default class Home extends Component
render() {
return (
{this._renderHeader()}
{this._renderBody()}
);
}
_renderHeader() {
return (
<div className=""><div/>
);
}
_renderBody() {
return (
<div className=""><div/>
);
}
... | reveza/rebweb | views/js/home.js | JavaScript | mit | 395 |
if (true) { };
function foo() { };
function foo() {
};
if (true) {
};
function foo() { }; function bar() { };
| BryanDonovan/node-fixmyjs | test/fixtures/broken/unnecessarysemicolon.js | JavaScript | mit | 114 |
/**
* SignWriting 2010 JavaScript Library v1.9.1
* https://github.com/Slevinski/sw10js
* Copyright (c) 2007-2016, Stephen E Slevinski Jr
* sw10.js is released under the MIT License.
*/
var sw10 = {
key: function(text,style){
var key = text.match(/S[123][0-9a-f]{2}[0-5][0-9a-f]([0-9]{3}x[0-9]{3})?/g);
if (!key... | JonathanDDuncan/SignWriterStudio | SignWriterStudio/dist/assets/lib/sw10.js | JavaScript | mit | 63,904 |
var sql = require('mssql');
import * as PORTACTION from "../actions/PORTActionConst.js"
import * as PORTSTATE from "../actions/PORTState.js"
import * as PORTCHK from "../actions/PORTChkConst.js"
import * as CONNECT from "./PORTSQLConst.js"
import * as MISC from "./Misc.js"
var portCheck2Done=false;
var portCheck2Cn... | robogroves/Ashley | app/api/PORTSQLCheck2.js | JavaScript | mit | 5,477 |
const express = require('express');
const router = express.Router();
const pc = require('./pathway-commons-router');
router.use('/api/search', require('./search'));
router.use('/api/pc', pc);
router.use('/api/pathways', require('./pathways'));
router.use('/api/interactions', require('./interactions'));
router.use('/ap... | PathwayCommons/app-ui | src/server/routes/index.js | JavaScript | mit | 763 |
var RuleEngine = require('../index');
describe("Rules", function() {
describe(".init()", function() {
it("should empty the existing rule array", function() {
var rules = [{
"condition": function(R) {
R.when(1);
},
"consequence":... | mithunsatheesh/node-rules | __tests__/index.js | JavaScript | mit | 17,105 |
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ ret... | antpost/antpost-client | node_modules/@progress/kendo-ui/js/messages/kendo.messages.fr-MC.js | JavaScript | mit | 17,481 |
/**
* Created by saf on 1/6/17.
*/
import React, {Component} from 'react';
import {observer} from 'mobx-react';
import {observable, computed} from 'mobx';
import * as Table from 'reactabular-table';
import * as search from 'searchtabular';
import * as resolve from 'table-resolver';
@observer
export default class As... | sumpfgottheit/arps | frontend/src/modules/AsyncFilterTable.js | JavaScript | mit | 2,007 |
/*
* Copyright (C) 2013-2015 Uncharted Software Inc.
*
* Property of Uncharted(TM), formerly Oculus Info Inc.
* http://uncharted.software/
*
* Released under the MIT License.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (... | MjAbuz/influent | influent-client/influent-clientjs/src/scripts/views/accounts-view-components/accountsResultComponent.js | JavaScript | mit | 1,983 |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Tutorial Schema
*/
var TutorialSchema = new Schema({
name: {
type: String,
default: '',
required: 'Please fill Tutorial name',
trim: true
},
created: {
type: Date,
default: Date.now
},
... | friedpine/ConceptNetwork | app/models/tutorial.server.model.js | JavaScript | mit | 419 |
define(['./utilities/cookie'], function(cookie) {
/**
* sails.io.js
*
* This file is completely optional, and merely here for your convenience.
*
* It reduces the amount of browser code necessary to send and receive messages
* to & from Sails by simulating a REST client interface on top of socket.io... | SpoonX/Pike | src/scripts/core/sails.io.js | JavaScript | mit | 4,256 |
cc._RFpush({ exports: {} }, '414458STphLF75+aFmYFzfh', 'EffectPreview');
"use strict";
var Editor = parent.Editor;
cc.Class({
"extends": cc.Component,
properties: {
isAllChildrenUser: false,
frag_glsl: {
"default": null,
visible: false
},
vert_glsl_no_mvp: {
"default": null,
visible: false
},... | rraallvv/shader-graph | preview/js/cocos-component.js | JavaScript | mit | 6,078 |
define(["module-a"], function(moduleA) {
return {
"name":"main",
"submodule":moduleA,
"project":"foo"
};
}) | gjurgens/mcreqjs | spec/fixtures/foo/main.js | JavaScript | mit | 115 |
System.config({
defaultJSExtensions: true,
transpiler: "babel",
babelOptions: {
"optional": [
"runtime",
"es7.decorators"
]
},
paths: {
"github:*": "jspm_packages/github/*",
"aurelia-router/*": "dist/*.js",
"npm:*": "jspm_packages/npm/*"
},
map: {
"aurelia-dependency-i... | milunka/router | config.js | JavaScript | mit | 2,684 |
/**
* Created by Ron on 26/5/2016.
*/
"use strict";
import ReactNative, {
StyleSheet,
Text,
View,
Dimensions,
TouchableWithoutFeedback,
Image
} from 'react-native';
import React, { Component , PropTypes } from 'react';
import CommonModules,{
ThemeStyle,
dismissKeyboard,
} from '../../utils/CommonModu... | ganguo/yingping_rn | Yingping/app/components/search/SearchEmptyPage.js | JavaScript | mit | 1,535 |
import {
injectDeps
} from 'react-simple-di';
export default class App {
constructor(context) {
if (!context) {
const message = `Context is required when creating a new app.`;
throw new Error(message);
}
this.context = context;
this.actions = {};
this._routeFns = [];
}
_bindCo... | mantrajs/mantra-core | src/app.js | JavaScript | mit | 2,293 |
export type Path = {
parent: Path,
node: ASTNode,
replace: Function,
remove: Function,
}
| rofrischmann/bredon | flowtypes/Path.js | JavaScript | mit | 97 |
'use strict';
var mongoose = require('mongoose');
/**
* Schema defining the 'ticket' model.
*/
var TicketSchema = module.exports = new mongoose.Schema({
/**
* Describes on which board does this ticket belong.
*
* TODO Should we actually group the ticket's under the 'board' model as
* references, or k... | nikolauska/teamboard-api | config/schemas/ticket.js | JavaScript | mit | 1,921 |
'use strict';
/**
* Module dependencies.
*/
var _ = require('lodash'),
errorHandler = require('../errors.server.controller'),
mongoose = require('mongoose'),
passport = require('passport'),
User = mongoose.model('User'),
Client = mongoose.model('Client');
/**
* Signup
*/
exports.signup = function(req, res) ... | georgekach/iomonitor | app/controllers/users/users.authentication.server.controller.js | JavaScript | mit | 7,086 |
/*
* Copyright (C) 2009, 2010 Google Inc. All rights reserved.
* Copyright (C) 2009 Joseph Pecoraro
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the abov... | lordmos/blink | Source/devtools/front_end/DOMAgent.js | JavaScript | mit | 46,715 |
import RSVP from 'rsvp';
import XFlowHarness from './xflow-harness';
import DocRegistry from './helper/docregistry';
class XFlowRunner {
constructor(opts) {
this.name = 'XFlowRunner';
this.xfmap = new DocRegistry();
this.factory = opts.factory;
this.tickLimit = opts.tickLimit || 4096;
}
_makeH... | michiel/xflow-js | src/xflow-runner.js | JavaScript | mit | 1,537 |
import toUniqueStringsArray from "../toUniqueStringsArray";
describe("toUniqueStringsArray", () => {
it("sane defaults", () => {
expect(toUniqueStringsArray()).toEqual([]);
expect(toUniqueStringsArray(null)).toEqual([]);
expect(toUniqueStringsArray({})).toEqual([]);
expect(toUniqueStringsArray("")).t... | Kaniwani/KW-Frontend | app/common/utils/__tests__/toUniqueStringsArray.test.js | JavaScript | mit | 857 |
#!/usr/bin/env node
'use strict';
var meow = require('meow');
var clc = require('cli-color');
var terminalWallet = require('./');
var cli = meow({
help: [
'Usage',
' wallet debit <value> <purchase details> [-c <category>][-d <date in yyyy-mm-dd format>]',
' wallet credit <value> <source details> [-c <c... | icyflame/terminal-wallet | cli.js | JavaScript | mit | 1,919 |
/* eslint-disable no-sync */
const readPackages = require('./readPackages')
const writePkg = require('write-pkg')
module.exports = function transformPkgs(mapFn) {
readPackages().forEach(pkg => {
const transformedManifest = mapFn(pkg.manifest)
writePkg(pkg.path, transformedManifest)
})
}
| VegaPublish/vega-studio | scripts/transformPkgs.js | JavaScript | mit | 301 |
// Temporary code to test sending files to the server
import fs from "fs";
import net from "net";
import path from "path";
const { SERVER_PORT, SERVER_ADDRESS } = process.env;
const SERVER_OPTIONS = { port: SERVER_PORT, address: SERVER_ADDRESS };
export function send(name) {
console.log("About to send", name);
... | koral/koral-client | src/send.js | JavaScript | mit | 765 |
// All code points in the `So` category as per Unicode v9.0.0:
[
0xA6,
0xA9,
0xAE,
0xB0,
0x482,
0x58D,
0x58E,
0x60E,
0x60F,
0x6DE,
0x6E9,
0x6FD,
0x6FE,
0x7F6,
0x9FA,
0xB70,
0xBF3,
0xBF4,
0xBF5,
0xBF6,
0xBF7,
0xBF8,
0xBFA,
0xC7F,
0xD4F,
0xD79,
0xF01,
0xF02,
0xF03,
0xF13,
0xF15,
0xF16,
0x... | mathiasbynens/unicode-data | 9.0.0/categories/So-code-points.js | JavaScript | mit | 55,110 |
$(document).ready(function() {
/* Done setting the chart up? Time to render it!*/
var data = [
{
values: [],
key: 'Event queue length',
color: '#000000'
},
]
/*These lines are all chart setup. Pick and choose which chart features you want to utilize. */
nv.addGraph(function() {
... | flapjack/flapjack | lib/flapjack/gateways/web/public/js/self_stats.js | JavaScript | mit | 2,214 |
const chai = require('chai')
const expect = chai.expect
const path = require('path')
const fs = require('fs')
const os = require('os')
const YAML = require('yamljs')
const pkg = require('../package')
describe('grql', () => {
let config, grql, sampleServer
before(() => {
process.env['NODE_ENV'] = 'test'
co... | openhoat/grql | test/grql-test.js | JavaScript | mit | 2,778 |
export const fourUp = {"viewBox":"0 0 8 8","children":[{"name":"path","attribs":{"d":"M0 0v1h1v-1h-1zm2 0v1h1v-1h-1zm2 0v1h1v-1h-1zm2 0v1h1v-1h-1zm-6 2v1h1v-1h-1zm2 0v1h1v-1h-1zm2 0v1h1v-1h-1zm2 0v1h1v-1h-1zm-6 2v1h1v-1h-1zm2 0v1h1v-1h-1zm2 0v1h1v-1h-1zm2 0v1h1v-1h-1zm-6 2v1h1v-1h-1zm2 0v1h1v-1h-1zm2 0v1h1v-1h-1zm2 0v1... | wmira/react-icons-kit | src/iconic/fourUp.js | JavaScript | mit | 335 |
var express = require('express');
var router = express.Router();
var path = require('path')
router.route('/')
.get(function (req, res) {
res.render('index', {
pageTitle: "Carl Schriever",
pageDescription: "My personal website.",
pageCss: ['main'],
pageScripts... | crschriever/personal-website | server/routes/index.js | JavaScript | mit | 384 |
import {
Function as FunctionToken,
RightParenthesis
} from '../../tokenizer/index.js';
export const name = 'Function';
export const walkContext = 'function';
export const structure = {
name: String,
children: [[]]
};
// <function-token> <sequence> )
export function parse(readSequence, recognizer) {
... | csstree/csstree | lib/syntax/node/Function.js | JavaScript | mit | 974 |
define(['app'], function (app) {
app.controller('CalendarController', ['breadcrumb', function(breadcrumb) {
breadcrumb.title = 'Calendar';
breadcrumb.subTitle = 'Control panel';
breadcrumb.list = [
{ name: 'Calendar' }
];
}]);
});
| Podou/admin | app/container/calendar/controller.js | JavaScript | mit | 257 |