code stringlengths 2 1.05M |
|---|
module.exports = {
name: 'drifter',
version: '1.0.0-beta',
/*
certificate: '',
key: '',
formatters: {
},
spdy: {
}
*/
}
|
Template.card.created = function() {
// TODO: Ugly hack, make it beautiful and safe
var cardType = this.view.parentView.name.split(".")[1];
if(Template[cardType + "Details"] === undefined) {
console.error("Card details template '" + cardType + "Details', doesn't exist");
} else {
Templat... |
import compareTranspiled from "./compareTranspiled";
const tests = {
'should change relative paths': "examples/<dir>/relative2relative",
'should change relative paths dynamically': "examples/<dir>/relative2relativeD",
'should change path from a node module to relative': "examples/<dir>/module2relative",
'should dy... |
version https://git-lfs.github.com/spec/v1
oid sha256:364f6e85f525b75afac578bd6814b307a83724d568792f22c5a305739fd9dc70
size 135328
|
import React from "react";
import renderer from "react-test-renderer";
import Button from "./Button";
it("renders correctly", () => {
expect(renderer.create(<Button>Submit</Button>).toJSON()).toMatchSnapshot();
});
|
var classblackbone_1_1_m_map =
[
[ "MMap", "classblackbone_1_1_m_map.html#a73dce850d2a2b9949c3bcb6ac1ac9abe", null ],
[ "~MMap", "classblackbone_1_1_m_map.html#af0d82aa41970f29d53dfc92ada2beefa", null ],
[ "Cleanup", "classblackbone_1_1_m_map.html#a34bc7201d03a51463824d81b2e68c3b6", null ],
[ "MapImage"... |
/*
* This file is part of the Exposure package.
*
* Copyright 2013 by Sébastien Pujadas
*
* For the full copyright and licence information, please view the LICENCE
* file that was distributed with this source code.
*/
$("a[data-op='bookmark-remove']").click(function(e) {
e.preventDefault() ;
var listItem = $(... |
import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
this.resource("posts");
this.resource("simple");
});
export default Router;
|
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp", "pt-br", {title: "Instruções de Acessibilidade", contents: "Conteúdo da Ajuda. Para fechar este diálogo pressione ESC.", legend: [
... |
var getPublication = function (slug) {
var pub = Publications.findOne({slug: slug});
if (pub) {
return pub;
}
};
/*****************************************************************************/
/* Detail: Event Handlers */
/****************************************************************************... |
var searchData=
[
['ide',['ide',['../structmob__settings.html#af49f35b823927e40978d94b1f7d42a29',1,'mob_settings']]]
];
|
import './MatchListItem.scss';
import React, { Component, PropTypes } from 'react';
import { Link } from 'react-router';
import moment from 'moment';
import { connect } from 'react-redux';
import Icon from '../Icon.js';
import MatchEdit from '../MatchEdit/MatchEdit';
import { updateMatch, deleteMatch } from '../../a... |
var app = app || {};
(function(){
app.TestButton = React.createClass({displayName: "TestButton",
handleClick: function() {
this.props.submitTestTask(this.props.btnType);
},
render: function() {
return ( React.createElement("button", {onClick: this.handleClick,
... |
$(document).ready(function() {
$("#login").click(function(event){
event.preventDefault();
var username = $('#username').val();
var password = $('#password').val();
login_auth(username,password);
});
$("#change-password").click(function(event){
event.preventDefault();
$(this).text('Sending..');
$('.erro... |
/**
* Master Controller
*/
angular.module('RDash')
.controller('MasterCtrl', ['$scope', '$cookieStore', '$http', '$window', MasterCtrl]);
function MasterCtrl($scope, $cookieStore, $http, $window) {
/**
* Sidebar Toggle & Cookie Control
*/
var mobileView = 992;
$scope.hideUserMenu = true;... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const publicSuffixes = require("./public-suffixes");
/**
* Returns the apex domain (domain.com) from a subdomain (www.sub.domain.com)
*/
function apexDomain(domainName) {
const parts = domainName.split('.').reverse();
let curr = publ... |
module.exports = (root) => {
const mongoose = root.mongoose;
const Schema = mongoose.Schema;
// create a schema
const yourSchema = new Schema({
name: String,
username: { type: String, required: true, unique: true },
password: { type: String, required: true },
admin: Boolean,
location: String,
meta: {... |
import React, { Component, PropTypes } from 'react';
import { Text, View, StyleSheet, TouchableWithoutFeedback } from 'react-native';
export default class Board extends Component {
static propTypes = {
size: PropTypes.number.isRequired,
showNotation: PropTypes.bool,
rowIndex: PropTypes.number.isRequired,... |
//了解源码,要了解构造(实例化、原型链、原型链接续、继承机制),核心方法(init工厂方法)
var
// 框架内部通用的jQuery(document)的临时变量
rootjQuery,
// 1.8中DOM ready改成了deferred,这个是ready的执行列表
readyList,
// 使用当前window下的document (沙箱机制)
document = window.document,
location = window.location,
navigator = window.navigator,
// 映射 jQuery 以便重写,主要是在noConflict中用到(line ... |
const expect = require('chai').expect
const Poison = require('../lib/poison')
suite('poison', function () {
test('default', function (done) {
var p = new Poison(done)
expect(p.phase).to.be.equal('incoming')
expect(p.isEnabled()).to.be.true
p.handler()()
})
test('state', function (done) {
var... |
/*syn@0.4.2#mouse.support*/
define(function (require, exports, module) {
var syn = require('./synthetic');
require('./mouse');
(function checkSupport() {
if (!document.body) {
return syn.schedule(checkSupport, 1);
}
window.__synthTest = function () {
syn.suppo... |
var async = require('async')
var db = require('../db')
var expect = require('chai').expect
var rimraf = require('rimraf')
describe('db', function() {
var dbi
var nonExistantEmail = 'test@example.com'
var existantEmail = 'test-exists@example.com'
var password = 'test123'
var data = { some:"data" }
after(f... |
const ThenAbilityAction = require('./ThenAbilityAction');
/**
* Translates the methods of a standard game action to one that will take an
* ability context => properties factory method.
*/
class AbilityAdapter {
constructor(action, propertyFactory) {
this.action = action;
this.propertyFactory = ... |
Later = Npm.require('later');
var fetchLatestASX = function(){
var limit = 0; //TODO how many new posts to save per every fetch
try{
var url = 'https://www.kimonolabs.com/api/d24n87da?apikey=6CUR6Vw9BNVRomz1pTUSDNK8I8VaruKv';
var result = Meteor.http.get(url);
if (!result.data) {
retur... |
/**
* Created by Kane on 15/7/29.
*/
var url = require('url');
var config = require('../config');
var request = require('request');
var vermgr = {
get: function(params, callback) {
var _url = url.resolve(config[params.env].vermgr.url, 'repos/' + params.name);
var opt = {
method: 'GET',
url: _ur... |
export const LOAD_LIST = 'wp/react/LOAD_LIST';
export const LOAD_LIST_SUCCESS = 'wp/react/LOAD_LIST@SUCCESS';
export const LOAD_LIST_FAILURE = 'wp/react/LOAD_LIST@FAILURE';
export const loadList = (args) => {
return {
type: LOAD_LIST,
args
}
}
export const loadListSuccess = (response) => {
return {
... |
/**
* Durandal 2.0.0 Copyright (c) 2012 Blue Spire Consulting, Inc. All Rights Reserved.
* Available via the MIT license.
* see: http://durandaljs.com or https://github.com/BlueSpire/Durandal for details.
*/
/**
* Serializes and deserializes data to/from JSON.
* @module serializer
* @requires system
*/... |
import routeConfig from './route.config.js'
const genRoutes = (routeConfig)=>{
let routes = []
routeConfig.forEach((categoryConfig)=>{
categoryConfig.list.forEach((pageConfig)=>{
let component = require(`../pages${pageConfig.path}`)
routes.push({
name: pageConfig... |
/**
* @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
*
* @version 1.0.2
* @codingstandard ftlabs-jsv2
* @copyright The Financial Times Limited [All Rights Reserved]
* @license MIT License (see LICENSE.txt)
*/
/*jslint browser:true, node:true*/
/*global define, Event, Node*/
/... |
/**
* @author Kate Compton
*/
define(["common", "threeUtils", "graph", "ui"], function(common, threeUtils, Graph, UI) {
var useMultiMaterial = false;
defaultMaterial = new THREE.MeshNormalMaterial();
var darkMaterial = new THREE.MeshBasicMaterial({
color : 0xffffcc
});
var wireframeMateria... |
'use strict';
module.exports = {
port: 443,
db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://localhost/joyful-church',
assets: {
lib: {
css: [
'public/lib/bootstrap/dist/css/bootstrap.min.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',
],
js: [
'public/lib/... |
import Ember from 'ember';
export default Ember.Route.extend({
indexedDbPromised: Ember.inject.service('indexed-db'),
beforeModel () {
// Create or open Database before default route is loaded
Ember.run.once(() => {
this.get('indexedDbPromised').createIndexedDbStore({
$dbName: 'transportme-fa... |
import React, { Component, PropTypes } from 'react';
import Portal from '../hoc/Portal';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { TOOLTIP } from '../identifiers.js';
import events from '../utils/events';
import utils from '../utils/utils';
const POSITION = {
BOTTOM: 'bot... |
import @ from "contracts.js"
@ (x: Pos) -> res:Num | x > (res * res - 0.1) &&
x < (res * res + 0.1)
function bad_square_root(x) {
// oops, square *root* not square!
return x * x;
}
bad_square_root(100);
|
$('#setAstucesMessageAsRead').click(function (e) {
e.preventDefault();
$.ajax({
url: $(this).data('url'),
method: 'GET'
});
});
$('#modal-load-postAtip').click(function (e) {
e.preventDefault();
$('#postAtipContent').html(loadModalHTML);
$.ajax({
url: $(this).data('url'),
... |
/**
* @author Krzysztof Winiarski
* @copyright (c) 2014 Krzysztof Winiarski
* @license MIT
*/
'use strict';
var support = require('../support');
var actionWrapper = require('./action-wrapper');
function validateTypeOfArrayRecords(array, name, type) {
if (!array || !array instanceof Array) {
throw new TypeE... |
export default class Wheel {
constructor(rim, tire) {
this.rim = rim;
this.tire = tire;
}
diameter() {
return this.rim + (this.tire * 2);
}
}
|
module.exports = {
timeout: 5000,
'async-only': true,
'check-leaks': true,
recursive: true,
};
|
// Copyright (c) 2015-2018 Robert Rypuła - https://audio-network.rypula.pl
function transmitSymbol(channelIndex, ofdmIndex, symbol) {
var
pskSize = getIntById('tx-psk-size-' + channelIndex),
symbolDuration = getFloatById('symbol-duration') / 1000
;
transmitAdapter.symbol(channelIndex, ofd... |
var child_process = require('child_process');
var q = require('q');
function exec(command, options) {
var deferred = q.defer();
var childProcess;
var args = Array.prototype.slice.call(arguments, 0);
args.push(function(err, stdout, stderr) {
if (err) {
err.message += command + ' (e... |
function normalizeArgs(options, cb) {
let normalizedOptions = options || {};
let callback;
if (typeof cb === "function") {
callback = cb;
} else if (typeof options === "function" && !cb) {
normalizedOptions = {};
callback = options;
}
let returnValue;
if (!callback) ... |
/**
* This module is a wrapper for Google's gcloud module that is made specifically
* to interact with the Google Developer Cloud Datastore.
*
* @author Zack Harley @zackharley
*/
'use strict';
var async = require('async');
var gcloud = require('gcloud');
var gcloudDatastore = gcloud.datastore();
var Query = gcl... |
var __decorate = this.__decorate || function (decorators, target, key, value) {
var kind = typeof (arguments.length == 2 ? value = target : value);
for (var i = decorators.length - 1; i >= 0; --i) {
var decorator = decorators[i];
switch (kind) {
case "function": value = decorator(val... |
import 'bootstrap/dist/css/bootstrap.css';
// import 'font-awesome/css/font-awesome.css';
import 'bootstrap/dist/js/bootstrap';
import React from 'react';
import ReactDOM from 'react-dom';
import AppContainer from './containers/app';
import {createStore, applyMiddleware, combineReducers} from 'redux';
import {Provider}... |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/app/App';
import registerServiceWorker from './registerServiceWorker';
import './index.css';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
|
import React, {Component} from 'react';
import {connect} from 'react-redux';
import PropTypes from 'prop-types';
import ErrorGroupsList from './error-groups/list';
import Suites from './suites';
class MainTree extends Component {
static propTypes = {
// from store
groupByError: PropTypes.bool.isRe... |
/*jshint node:true*/
"use strict";
var program = require('commander');
var npmPackage = require('../package.json');
var JBJ = require('jbj');
var fs = require('fs');
var JSON5 = require('json5');
var JSONStream = require('JSONStream');
var Splitter = require('streaming/splitter.js').Splitter;
va... |
/**
* Gets the repositories of the user from Github
*/
import {take, call, put, select, cancel, takeLatest} from 'redux-saga/effects';
import {LOCATION_CHANGE} from 'react-router-redux';
import {GET_GALLERY, GET_GALLERY_SUCCESS, GET_GALLERY_ERROR, DOWNLOAD_FILE} from './constants';
import {getGallerySuccess, getGall... |
var Parser = require('../lib/GuitarProParser.js'),
fs = require('fs'),
expect = require('expect.js');
describe('Parser', function () {
it('Should exists', function () {
expect( Parser ).to.be.a( Function );
});
});
describe('Parsing', function() {
var parser,
parsed;
before( function() {
... |
/**
* A html visual component.
*
* # Basics
* It accommodates all of html elements and some states
* and acts as both View and Control in MVC frameworks.
* It also provides some useful methods to manipulate DOM elements.
*
* The "elem" field is root element of a Presentation and
* a Presentation expects all o... |
import { test, moduleForComponent } from 'ember-qunit';
import Ember from 'ember';
moduleForComponent('repo-actions', 'RepoActionsComponent', {
needs: ['component:build-repo-actions', 'component:job-repo-actions']
});
test('it renders', function() {
var component;
component = this.subject({});
this.render();... |
/* eslint-disable ember/no-classic-components, ember/require-tagless-components */
/**
* @module ember-paper
*/
import Component from '@ember/component';
/**
* @class PaperToolbarTools
* @extends Ember.Component
*/
export default Component.extend({
classNames: ['md-toolbar-tools']
});
|
var m = require('mraa'); //require mraa
console.log('MRAA Version: ' + m.getVersion()); //write the mraa version to the console
var ledPin = new m.Gpio(0);// pin J17-1
var buttonPin = new m.Gpio(6);// pin J17-7
var led_state = 0; //Boolean to hold the state of the led
buttonPin.dir(m.DIR_IN); //set the gpio directio... |
'use strict';
// Declare app level module which depends on views, and components
var myApp = angular.module('myApp', [
'ngRoute',
'myApp.routing',
'myApp.datelist',
'myApp.mailchimp',
'ui.bootstrap',
'mailchimp'
]).
config(['$routeProvider', function($routeProvider) {
$routeProvider.otherwise({redirectTo... |
define([
'backbone',
'app/message-dispatcher-client',
'app/view-manager',
'app/app-state'
], function(Backbone, MessageDispatcher, ViewManager, AppState) {
var LoginView = Backbone.View.extend({
templateName: 'login',
className: 'login-view',
initialize: function() {
},
events: {
... |
'use strict';
const { expect } = require('chai');
const character_sheet_reducer = require('../src/components/character_sheet/reducers');
describe('interface.components.character_sheet.reducer', function() {
let action;
let state;
context('on a LOAD_FILE_FULFILLED event', function() {
let sheet;
let fi... |
const fs = require('fs');
const math = require('mathjs');
var A = JSON.parse(fs.readFileSync('../data/A_1024.json', 'utf8'));
var B = JSON.parse(fs.readFileSync('../data/__B.json', 'utf8'));
var blocks = {
'1024': [{
start: [0, 0],
stop: [511, 511]
}, {
start: [0, 512],
stop: [... |
// Camera setup
// Ship Constructor
function ship() {
THREE.Object3D.call(this);
this.velocity = new THREE.Vector3();
var _this = this;
this.shipModel = new THREE.Mesh();
var jsonLoader = new THREE.JSONLoader();
jsonLoader.load( "assets/ship.js", function(geometry, materials) {
var material = ne... |
(function(window) {
var Moip = window.Moip || {};
window.Moip = Moip;
function SantanderValidator() {
if ( !( this instanceof SantanderValidator ) ) {
return new SantanderValidator();
}
}
SantanderValidator.prototype = {
agencyNumberIsValid: function(agencyNumber) {
return Moip.Commo... |
import React from 'react';
import { connect } from 'react-redux';
import { Modal, Button, Header, Form } from 'semantic-ui-react';
import copyToClipboard from 'copy-to-clipboard';
import { isModalOpen } from '../../store/selectors/viewModal';
import { selectData } from '../../store/selectors/edited';
import { closeModa... |
'use strict';
Meteor.methods({
addAccount: function (doc) {
check(doc, app.schemas.addAccountForm);
if(!Meteor.userId()) {
throw new Meteor.Error('not-authorized');
}
_.extend(doc, { user: Meteor.userId() });
db.accounts.insert(doc);
}
});
|
"use strict";
const os = require("os");
const fs = require("fs-extra-promise");
const Web = require("web");
const { Service } = require("service");
const { ServiceComBus } = require("servicecom");
const Monitor = require("./monitor");
const Configs = require("./controllers/configs");
const Config = require("./types/co... |
const Encore = require('@symfony/webpack-encore');
Encore.configureRuntimeEnvironment('dev');
const encoreConfig = require('./webpack-encore-config');
const webpackConfig = encoreConfig('tests/Functional/App/var/karma/build').getWebpackConfig();
delete webpackConfig.entry;
delete webpackConfig.optimization.runtimeCh... |
import {Node} from './data/node';
import {List} from './data/list';
/**
* Add an item to the front of a list.
*
* @example
* const l1 = List.empty();
* const l2 = List.add(1, l2);
* const l3 = List.add(2, l3);
*
* @memberof List
* @param {*} item
* @param {List} list
* @return {List}
*/
export function add... |
angular
.module('newsRadar')
.component('feedAdd',{
templateUrl: 'assets/news-radar-gui/scripts/feedadd.template.html',
controller: function FeedAddController($http, $rootScope) {
this.addFeed = function(feed) {
$http({
method: 'POST',
... |
define('template/helpers/todaysPageViews', ['handlebars'], function (Handlebars) {
function todaysPageViews(items) {
var pageviews = '';
if (items) {
pageviews = parseFloat(items[items.length - 1].pageviews, 10);
if (pageviews > 1000000) {
pageviews = (Math.round(pageviews / 1000000)) + ... |
export default {
key: 'E',
suffix: 'm6',
positions: [
{
frets: '022020',
fingers: '012030'
},
{
frets: '022423',
fingers: '011312',
barres: 2
},
{
frets: 'x75657',
fingers: '031214',
barres: 5,
capo: true
},
{
frets: 'xx9989',... |
function strEqModWhitespace(left, right) {
return left.replace(/\s/g,'') === right.replace(/\s/g,'');
}
export function checkRenderCase(name) {
const result = find(`#result-${name}`).text();
const expected = find(`#expected-${name}`).text();
return strEqModWhitespace(result, expected);
}
|
var Blast = __Protoblast,
Fn = Blast.Bound.Function,
Stage = require('./stage');
/**
* Sputnik class
*
* @constructor
*
* @author Jelle De Loecker <jelle@kipdola.be>
* @since 0.0.1
* @version 0.1.0
*
* @param {Object} options
*/
var Sputnik = Fn.inherits('Informer', 'Develry.Sputnik',... |
import alt from 'alt'
import axios from 'axios'
import { API_BASE } from 'consts'
// Boilerplate: ExtendedUserActions is for 'extending' a common user for things just this app needs
const ExtendedUserSource = {
fetchCurrent: function(token) {
const instance = axios.create({
headers: { 'Authorization': tok... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _lodash = _interopRequireDefault(require("lodash"));
var _nameClass = _interopRequireDefault(require("../util/nameClass"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { def... |
import { realpathSync } from 'fs';
import relative from 'require-relative';
import { handleError } from '../logging.js';
import mergeOptions from './mergeOptions.js';
import batchWarnings from './batchWarnings.js';
import loadConfigFile from './loadConfigFile.js';
import sequence from '../utils/sequence.js';
import bui... |
import { useEffect } from 'react';
export default function useHistoryNav(history) {
useEffect(() => {
const handleKeyPress = e => {
if ((e.metaKey || e.altKey) && !e.ctrlKey && !e.shiftKey) {
switch (e.code) {
case 'ArrowLeft':
e.preventDefault();
history.goBack();... |
/**
* Application Config File
*/
'use strict';
var CFG = {
// Paint Area for this application
container: document.getElementById('app'),
// apiPath: 'http://daily-scrum-api.herokuapp.com',
// apiPath: 'http://localhost:5000',
apiPath: 'http://daily-scrum-keystone.herokuapp.com',
estimateList: [
{ v... |
((bbn) => {
let script = document.createElement('script');
script.innerHTML = `<div :class="[componentClass, 'bbn-background', 'bbn-border-box']"
:style="currentStyle"
>
<div :class="['bbn-overlay', $parent.currentOrientation === 'vertical' ? 'bbn-flex-height' : 'bbn-flex-width']">
<div v-if="title"
... |
// vendored from https://github.com/amasad/sane/blob/64ff3a870c42e84f744086884bf55a4f9c22d376/src/node_watcher.js
'use strict';
const EventEmitter = require('events').EventEmitter;
const fs = require('fs');
const platform = require('os').platform();
const path = require('path');
const common = require('./common');
/... |
import mapValues from 'lodash/mapValues';
import snakeCase from 'lodash/snakeCase';
function ensureTypeSnakeCase(value) {
if (typeof value === 'string') {
return snakeCase(value);
}
return value;
}
export function assessmentMetaDataState(data) {
const blankState = {
assessment: false,
assessmentId... |
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./components/Check/index"));
//# sourceMappingURL=Check.js.map
|
export default Ember.Route.extend({
beforeModel: function(trans) {
trans.send('event', null);
}
});
|
import alt from '../alt';
import AuthorSource from '../sources/AuthorSource';
class AuthorListActions {
constructor() {
this.generateActions(
'onSuccess',
'onFailure'
);
}
getAuthor(page, limit) {
AuthorSource.getAuthor(page, limit).then((data) => this.onSuccess(data));
}
getMoreAuthor(page, limit, pa... |
(function () {
// Mock repository
let adverts = [
{
_id: 0,
_acl: {
creator: 0
},
title: "XBoss 1080",
description: "Modded gaming console",
publisher: "Pesho",
datePublished: "2017-06-04",
price: 100,
image: "./static/fuze-... |
'use strict';
var assert = require('assert');
var runProcess = require('./../../lib/util/run-process').runProcess;
var resolve = require('path').resolve;
var Q = require('q');
var readFile = Q.denodeify(require('fs').readFile);
var CONFIG_PATH = require('./../../package.json').CONFIG_PATH;
var splitInPairs, config;
d... |
//************ Êèǹ ¤ØÂà¤ÇÊ / à´Ô¹ / â´´´èÒ¹ *************
function FoundCombat(ppid){
}
function FinishBattle(){
}
function Logon(){
}
function PlayerCurrentOnline(uid){
}
|
module.exports = function() {
require('./users')
}
|
Monocle = {
VERSION: "2.3.1"
};
Monocle.pieceLoaded = function (piece) {
if (typeof onMonoclePiece == 'function') {
onMonoclePiece(piece);
}
}
Monocle.defer = function (fn, time) {
if (fn && typeof fn == "function") {
return setTimeout(fn, time || 0);
}
}
Monocle.Dimensions = {}
Monocle.Controls ... |
var assert = require('assert'),
Model = require('../lib/model'),
Definition = require('../lib/definition'),
Types = require('../lib/types'),
util = require('../lib/util'),
_ = require('lodash');
describe('Model', function() {
var User;
beforeEach(function() {
User = Model.define('User', function() {... |
module.exports = importGTFS
const async = require('async')
const path = require('path')
const load = require('require-all')({
dirname: __dirname,
filter: /import.(.+)\.js$/,
excludeDirs: /^\.(git|svn)$/
})
const importOrder = [
'agency',
'calendar_dates',
'calendar',
'stops',
'routes',
'trips',
'... |
const RedisPubSub = require("../services/RedisPubSub");
const {events, channels} = require("../constants/redis");
class AuthController {
join(req, res) {
let {authToken, meetingId, userId} = req.query;
console.log(`Controllers >> Auth controller --> join: authToken: ${authToken}
... |
var path = require('path')
, fs = require('fs')
, utile = require('utile');
var application, controllersBefore;
var Dispatch = module.exports = function (app, pwd) {
application = app;
app.routes = {};
app.c = {};
app.r = {};
controllersBefore = {};
var dir = path.join(pwd, 'app/controllers');
va... |
import { Meteor } from 'meteor/meteor';
import {formatDateISO8601Time} from '../../imports/helpers/date';
import {ConfirmationDialogFactory} from './confirmationDialogFactory';
export function isEditedHandling(element, unset, setIsEdited, evt, confirmationDialogTemplate) {
if ((element.isEditedBy != undefined && e... |
const should = require('should');
const supertest = require('supertest');
const testUtils = require('../../../utils');
const localUtils = require('./utils');
const config = require('../../../../server/config');
const ghost = testUtils.startGhost;
let request;
describe('Webhooks API', function () {
var ghostServer;... |
'use strict'
module.exports = function getInfo() {
const info = this.server.info
this.log('Retrieving server info:', info)
return info
}
|
module.exports = function (x,y) {
var array = [];
if (!y) {
for (var i = 0; i < x; i++) {
array.push(i);
}
} else {
for (var i=x; i < y; i++) {
array.push(i);
}
}
return array;
};
|
/* @flow */
import type { PredefinedGeneratorOptions } from '../../types';
const path = require('path');
const { convertToPascalCase } = require('../../utils');
const createTemplate = module.parent.createTemplate;
const classComponentTemplate = createTemplate`
/* @flow */
import React, { Component } from "react";
... |
/**
* Angular Wizard directive
* Copyright (c) 2014 Genadijus Paleckis (genadijus.paleckis@gmail.com)
* License: MIT
* GIT: https://github.com/sickelap/angular-wizard
*
* Example usage:
*
* In your template add tag:
* <div wizard="wizardConfig"></div>
*
* Then in your controller create wizard configuration... |
'use strict';
var path = require('path');
var loadGulpPlugins = require('gulp-load-plugins');
var assign = require('object-assign');
var pkg = require('../package.json');
var requirePeer = require('./helpers/require-peer');
var parentPkgPath = path.join(process.cwd(), 'package.json');
var parentPkg = require(parent... |
'use strict';
module.exports = function(arr, arrays) {
for (var i = 1; i < arguments.length; i++) {
diff(arr, arguments[i]);
}
return arr;
};
function diff(one, two) {
if (!Array.isArray(two)) return;
var len = two.length;
var idx = -1;
while (++idx < len) {
remove(one, two[idx]);
}
}
functio... |
/**
* Copyright 2017-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable max-len */
/**
* Displays the password mismatch error message and status icons.
*
* @returns {undefin... |
// reference:
// https://github.com/GoogleChrome/samples/blob/gh-pages/service-worker/custom-offline-page/service-worker.js
self.addEventListener('install', event => {
event.waitUntil(
caches.open('offline')
.then(cache => cache.addAll([
'/offline.html'
]))
... |
/**
* Created by Rodrigo on 25/01/2017.
*/
const data = {};
const subscribers = {};
const EVENTS = {
SET: 'set',
SUBSCRIBE : 'subscribe',
UNSUBSCRIBE: 'unsubscribe'
};
/**
* Notify to all the subscriber the new value.
* A subscriber must implement a _onEvent method.
* @param event
* @param detail
* ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.