code stringlengths 2 1.05M |
|---|
'use strict';
/*
* List of replacements used for 'say' pronunciation.
*
* Any replacement with only one field will be treated as an acronym and spelled out.
*
* Any replacement with two fields will use the first field as the matcher and thes
* second field as the replacement.
*
* Any regexp matcher will have f... |
var mocha = require('gulp-mocha');
var gulp = require('gulp');
var gutil = require('gulp-util');
gulp.task('test', function() {
return gulp.src('tests/server/**/*Spec.js', {read: false})
.pipe(mocha({reporter: 'list'}))
.on('error', gutil.log);
}); |
if (!Array.prototype.findIndex) {
Object.defineProperty(Array.prototype, 'findIndex', {
value: function(predicate) {
'use strict';
if (this == null) {
throw new TypeError('Array.prototype.findIndex called on null or undefined');
}
if (typeof predicate !== 'function') {
thro... |
flyingon.widget({
template: {
Class: 'Plugin',
padding: 8,
layout: 'vertical-line',
children: [
{
Class: 'Pagination',
width: 780,
total: 1000
},
{
Class: 'Grid',
wi... |
import { runAppend, runDestroy } from 'ember-runtime/tests/utils';
import ComponentLookup from 'ember-views/component_lookup';
import Component from 'ember-views/components/component';
import compile from 'ember-template-compiler/system/compile';
import run from 'ember-metal/run_loop';
import isEmpty from 'ember-metal/... |
#!/usr/bin/env node
process.title = 'teriaki';
var teriaki = require('../lib/teriaki');
var dir = process.argv[2];
var bucket = process.argv[3];
if (!dir || !bucket){
console.log('Usage: teriaki <sync_path> <bucket_name>');
process.exit(1);
}
teriaki.syncDir(dir, bucket);
|
var TR = {
// background
backgroundTitle: 'バックグラウンド',
backgroundReset: 'リセット',
backgroundImport: 'インポート (jpg, png...)',
backgroundFill: null,
// camera
cameraTitle: 'カメラ',
cameraReset: 'View',
cameraCenter: null,
cameraFront: null,
cameraLeft: null,
cameraTop: null,
cameraMode: 'モード',
came... |
'use strict';
/**
* Module dependencies
*/
var path = require('path'),
config = require(path.resolve('./config/config'));
/**
* Notificacaoanotacaos module init function.
*/
module.exports = function (app, db) {
};
|
/**
* Any code used inside this helper is ignored by Handlebars. Use it if your email service provider uses a Handlebars-like syntax.
* @example
* {{{{raw}}}}
* {{ this }} code won't be parsed.
* {{{{/raw}}}}
*/
module.exports = function() {
return 'giving@northpointe.org';
}
|
var api = require("./api");
var commands = require("./commands");
var eventEmitter = require("./events").EventEmitter;
var logger = require("./logger");
var parse = require("./parser");
var timer = require("./timer");
var ws = global.WebSocket || global.MozWebSocket || require("ws");
var _ = require("./utils");
// Cli... |
import { expect } from 'chai';
import getWebphoneReducer, {
getVideoElementPreparedReducer,
getConnectionStatusReducer,
getConnectRetryCountsReducer,
getWebphoneCountsReducer,
getCurrentSessionReducer,
getSessionsReducer,
getMinimizedReducer,
} from './getWebphoneReducer';
import getModuleStatusReducer f... |
var gulp = require('gulp'),
config = require('../../config').watch;
gulp.task('watch', ['browsersync'], function () {
gulp.watch(config.sass, ['sass']);
gulp.watch(config.html, ['html']);
gulp.watch(config.images, ['images']);
});
|
$_ready(function(){
$_(".js-toggle").click(function(){
var toggleEl = $_(this).data("toggle");
$_(this).toggleClass("is-toggled");
$_("." + toggleEl).toggleClass("is-toggled");
});
$_("form.new-corpse").submit(function(e){
e.preventDefault();
Request.post("/Corpse/corpse/", "title=" + encodeURI($_("input... |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Dimensions
} from 'react-native';
import ActionSheet from 'ActionSheet';
export default class SucceLover extends Component... |
PictureCanvas.prototype.syncState = function(picture) {
if (this.picture == picture) return;
drawPicture(picture, this.dom, scale, this.picture);
this.picture = picture;
};
function drawPicture(picture, canvas, scale, oldPicture) {
if (!oldPicture
|| picture.width != oldPicture.width
|| picture.height != oldPi... |
(this["webpackJsonp@visa/vds-react"]=this["webpackJsonp@visa/vds-react"]||[]).push([[105],{1617:function(s,e,a){s.exports=a.p+"static/media/illustration-person-orange-older-man-with-phone.9eb67e1e.svg"}}]);
//# sourceMappingURL=105.54bd31f4.chunk.js.map |
// 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... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M2 14h8v2H2zm0-4h12v2H2zm0-4h12v2H2zm16 4h-2v4h-4v2h4v4h2v-4h4v-2h-4z" />
, 'PlaylistAddTwoTone');
|
import angular from 'angular'
import DummyData from './dummyData.service'
export default angular.module('services.dummy-data', [])
.service('dummyData', DummyData)
.name |
function sort(numbers, callback) {
if (numbers.length <= 1) {
callback(numbers);
return;
}
const sorted = [];
numbers.forEach((number) => {
setTimeout(() => {
sorted.push(number);
if (sorted.length === numbers.length) {
callback(sorted);
}
}, number)
})
}
export de... |
var CalculatorModel = Backbone.Model.extend({
defaults: {
result: 0,
input: 0
},
doMath: function(operation) {
//get the current value
var value = this.get("result");
//get the input value
var input = this.get("input");
//add or sub or mult or divide
if(operation == "add") {
var output = value + i... |
"use strict";
var Renderer = require('./renderer');
var esc = require('../common').escapeXml;
var reUnsafeProtocol = /^javascript:|vbscript:|file:|data:/i;
var reSafeDataProtocol = /^data:image\/(?:png|gif|jpeg|webp)/i;
var potentiallyUnsafe = function(url) {
return reUnsafeProtocol.test(url) &&
!reSafe... |
class Tile {
constructor (x, y) {
this.x = x
this.y = y
this.food = game.math.between(0, 10)
this.sprite = game.add.sprite(game.TILE_SIZE * x, game.TILE_SIZE * y, game.cache.getBitmapData('tile' + this.food))
}
updateColor () {
this.sprite.loadTexture(game.cache.getBitmapData('tile' + Math.fl... |
import {
toType,
toRawType,
toRawTypeLC,
isUndefined,
isNull,
isUndefinedOrNull,
isFunction,
isBoolean,
isString,
isNumber,
isNumeric,
isPrimitive,
isDate,
isEvent,
isRegExp,
isPromise
} from './inspect'
describe('utils/inspect', () => {
it('toType()', async () => {
expect(toType(... |
/* global threads, View */
var debug = 1 ? (...args) => console.log('[PlaylistsView]', ...args) : () => {};
var PlaylistsView = View.extend(function PlaylistsView() {
View.call(this); // super();
this.search = document.getElementById('search');
this.list = document.getElementById('list');
this.search.addEve... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const assert = require('assert');
const error_code_1 = require("../error_code");
const chain_1 = require("../chain");
const util_1 = require("util");
const { LogShim } = require('../lib/log_shim');
class BaseExecutor {
constructor(logger) ... |
describe('buildUrl', function () {
var buildUrl = require('../dist/build-url');
it('should be defined', function () {
expect(buildUrl).toBeDefined();
});
it('should return undefined if called with no arguments', function () {
expect(buildUrl()).toBe(undefined);
});
it('should return a string if c... |
import config from '../constants/config';
import { createStore, applyMiddleware, compose } from 'redux';
import storage from 'redux-storage';
import { routerMiddleware } from 'react-router-redux';
import { browserHistory } from 'react-router';
import createEngine from 'redux-storage-engine-localforage';
import debounce... |
// webtask to parse @fandata_b tweets and generate google calendar events
//
// expects application/json body:
// {
// 'content': <tweet content>,
// 'url': <original tweet url>
// }
//
// example tweet:
// [우주소녀]팬싸인회 #일시:17.3.1 7:00pm #장소:그랜드프라자 청주호텔 직지홀 #추첨:100명 #판매처:영풍문고 청주점 #판매기간:2.26~2.28 #당첨발표:2.28 pm10:00 영풍... |
const babel = require('gulp-babel'),
lazypipe = require('lazypipe');
module.exports = {
bundle: {
bundle: {
scripts: [
'./app/assets/scripts/bundle/jquery-3.2.1.js',
'./app/assets/scripts/bundle/bootstrap.js',
'./app/assets/scripts/bundle... |
/*! jQuery UI - v1.10.3 - 2013-05-22
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete... |
import { Platform, StyleSheet } from 'react-native'
const styles = StyleSheet.create({
appBarStyle: {
backgroundColor: 'rgba(1, 108, 175, 1.0)',
height: 56.0,
marginLeft: 0.0,
marginTop: 0.0,
width: 360.0,
},
mobileStyle: {
flex: 1,
},
})
export default styles
|
var Save = this.$el.find("#Save").val().toUpperCase();
var Value = GetInputConstructorValue("Value", loader);
var TextValue = GetInputConstructorValue("Text", loader);
var fail = $("#Check").is(':checked')
if(TextValue["original"].length == 0)
{
Invalid("Text is empty");
return;
}
if(Save.length == 0)
{
Invalid(... |
(function() {
var templates = {
"name": "javascript",
"context": "javascript",
"templates": [{
"name": "img",
"description": "insert image",
"template": "#img \n\t@src ${docs/test.png} @width ${width} @height ${height} \n # \n ${cursor}"
}
... |
/* Copyright 2015 Dietrich Epp.
This file is part of Robot Rampage. The Robot Rampage source
code is distributed under the terms of the MIT license.
See LICENSE.txt for details. */
'use strict';
// Physics update rate, in Hz.
var RATE = 30;
module.exports = {
// Physics update rate, in Hz.
RATE: RATE,
/... |
---
install:
devDependencies: ['update', 'npm-install-global', 'delete', 'copy']
rename:
dirname: 'test'
basename: 'test.js'
---
'use strict';
require('mocha');
var fs = require('fs');
var path = require('path');
var assert = require('assert');
var update = require('update');
var npm = require('npm-install-globa... |
//Creates a bank of oscillators that get mixed together for a final output signal.
//It's a poor-man's additive synthesis technique, when I don't want to mess with wavetables
//The browser ends up using an inverse-FFT in order to get the resultant signal.
define(['inheritance', './synthUtil/gainOscillator'], function... |
var inquirer = require("inquirer");
function BasicCardHard(front, back) {
this.front = front;
this.back = back;
}
var count = 0;
var basicArray = [];
var askQuestion = function() {
if (count < 5) {
inquirer.prompt([
{
name: "name",
message: "What is your name?"
}, {
name... |
import React from 'react'
import { Message } from 'shengnian-ui-react'
const MessageExampleVisible = () => (
<Message visible>
You can always see me
</Message>
)
export default MessageExampleVisible
|
/**
* @author: Dennis Hernández
* @webSite: http://djhvscf.github.io/Blog
* @version: v1.0.0
*/
!function ($) {
'use strict';
var diacriticsMap = {};
var defaultAccentsDiacritics = [
{'base':'A', 'letters':'\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u... |
/*
var app_tests = require("../app_tests");
var mockClient = require("../mock-client");
module.exports["IMAPServer tests"] = {
setUp: function(done) {
app_tests.createSetUp()(function(err) {
app_tests.addMessages('INBOX', [
{raw: "Subject: hello 1\r\n\r\nWorld 1!", flags: ["\\S... |
let request = null,
exit = null,
change = null,
error = null,
element = null,
enabled = null;
const docEl = (typeof document !== 'undefined' && document.documentElement) || {};
if (typeof docEl.requestFullscreen !== 'undefined') {
request = 'requestFullscreen';
exit = 'exitFullscreen';
... |
// ---------------CHAT CONSTRUCTOR-----------------
var Chat = function() {
var outerDiv = document.getElementById("chatMessages");
var chatLog = [];
this.init = function() {
this.addMessage("FC", new Date().getTime(), "Welcome to Paranoia!");
};
this.getMessages = function() {
// TODO: check server for mes... |
var majordomo = require('majordomo');
var path = require('path');
module.exports = function (config) {
majordomo('init', config)
.ask('checkbox', 'modules', 'What modules do you want?', ['os', 'git', 'npm', 'bower'])
.branch(function () {
var modules = this.get('modules');
r... |
jQuery(function($) {'use strict';
// Navigation Scroll
$(window).scroll(function(event) {
Scroll();
});
$('.navbar-collapse ul li a').on('click', function() {
$('html, body').animate({scrollTop: $(this.hash).offset().top - 5}, 1000);
return false;
});
// User define function
function Scroll() {
var ... |
// Note some browser launchers should be installed before using karma start.
// For example:
// $ npm install karma-firefox-launcher
// $ karma start --browser=Firefox
// See http://karma-runner.github.io/0.8/config/configuration-file.html
module.exports = function(config) {
"use strict";
config.set... |
/**
* Schema Definitions
*
*/
import mongoose from 'mongoose';
import Document from './document';
const RoomSchema = new mongoose.Schema({
id: {type: String, unique: true},
name: { type:String }, // Human readable room name
count: { type: Number, min: 0 },
description: String, // Description of the room
s... |
import Vue from 'vue';
import Search from '@/components/Stat';
describe('Stat.vue', () => {
let Constructor;
let vm;
afterEach(() => {
vm.$destroy();
});
describe('Computed properties', () => {
describe('scorePercentage', () => {
beforeEach(() => {
Constructor = Vue.extend(Search);
... |
/*****************************************************
* #### Chat Realtime (BETA) ####
* Coded by Ican Bachors 2016.
* http://ibacor.com/labs/chat-realtime
* Updates will be posted to this site.
* Aplikasi ini akan selalu bersetatus (BETA)
* Karena akan terus di update & dikembangkan.
* Maka dari itu jangan lupa di f... |
'use strict';
const expect = require('chai').expect;
const TickerStream = require('../lib/TickerStream.js');
describe('Constructor', function() {
it('should have default property value', function() {
const ts = new TickerStream();
expect(ts._tickerState.min).to.equal(100);
expect(ts._tickerState.max).to... |
import Inferno from 'inferno';
import PollDiagram from './PollDiagram';
export default ({poll}) => {
return (
<article className="card">
<header>
<h2>{poll.title}</h2>
<h6>by <Link to={`/users/${poll.authorUrlPart}`}>{poll.author}</Link>{poll.lastModified ? <span className="label warning">... |
function SaleDetail(itemId, itemBarcode, itemName, quantity, unitId, pricePerUnit, isCustomPrice) {
this.itemId = itemId;
this.itemBarcode = itemBarcode;
this.itemName = itemName;
this.quantity = quantity;
this.unitId = unitId;
this.pricePerUnit = pricePerUnit;
this.isCustomPrice = isCustomPrice;
... |
'use strict';
module.exports = {
db: 'mongodb://localhost/facturacionmean-test',
port: 3001,
app: {
title: 'facturacionMEAN - Test Environment'
},
facebook: {
clientID: process.env.FACEBOOK_ID || 'APP_ID',
clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET',
callbackURL: '/auth/facebook/callback'
}... |
export function debounce(func, wait, immediate) {
var timeout;
return function () {
var context = this,
args = arguments;
var later = function () {
timeout = null;
if (!immediate) func.apply(context, args);
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
time... |
"use strict";
export default class Lexeme {
constructor (value, offset) {
this.value = value;
this.offset = offset;
return Object.freeze(this);
}
}
|
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "a28de7d59d58faaf35d5ccd2768323f9",
"url": "/index.html"
},
{
"revision": "7571f10d42ea1f4fc803",
"url": "/static/css/0.f574a00c.chunk.css"
},
{
"revision": "db3b73a9e8ca89a4d103",
"url": "/static/css/1.a9... |
'use strict';
// Imports
window.jQuery = window.$ = require('jquery');
var angular = require('angular');
require('angular-route');
// Application routing and startup
var Router = require('./router');
var StartUp = require('./startUp');
// Application modules
require('./components/home/home');
require('./component... |
import { expect } from 'chai';
import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import promise from 'redux-promise-middleware';
import * as t from '../actionTypes';
import * as a from '../actions';
import * as factories from './factories';
import fetchMock from 'fetch-mock';
describe... |
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { ReduxRouter } from 'redux-router';
import { IndexRoute, Route } from 'react-router';
import createStore from 'utils/createStore';
import { toChangeLevel } from 'state/actions/changeLevel';
import App from... |
'use strict';
const stringUtils = require('ember-cli-string-utils');
const useTestFrameworkDetector = require('../test-framework-detector');
module.exports = useTestFrameworkDetector({
description: 'Generates an initializer unit test.',
locals: function(options) {
return {
friendlyTestName: ['Unit', 'I... |
/* @flow */
export default function weightedFilter<T>(
input: Array<T>,
start: number,
end: number,
getValue: (value: T) => number,
): Array<[T, number]> {
const amount = input.reduce((acc, value) => acc + getValue(value), 0);
let sum = 0;
let current = 0;
const result = [];
for (const value of input... |
const op = require('object-path');
class Actions {
constructor(actions) {
if (!actions) throw new Error('No actions given');
this.actions = actions;
}
call(name, state, ...args) {
const action = this.get(name);
if (!action) throw new Error(`Undefined action: ${name}`);
const context = this.g... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define("require exports ../../core/tsSupport/assignHelper ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/i18n!./ColorSizeSlider... |
import React, { Component } from 'react';
require('./../styles/WaitingDisplay.scss')
class WaitingDisplay extends Component {
render() {
const { haveUndefineds } = this.props
return (
<div>
{haveUndefineds ?
<div className="loading"></div>:null
}
</div>
);
}
}
export def... |
/**
* De basis van alle constructors
*/
function Fieldset (field) {
this.name = field.fieldsetName;
}
Fieldset.prototype.built = function () {
var fieldset = document.createElement('fieldset');
fieldset.innerHTML = '<legend>' + this.name + '</legend>';
return fieldset;
}
/**
* Child wordt hergebruikt voor de... |
export default class pageEController {
constructor($interval,httpService,utils) {
this.httpservice = httpService;
this.ut = utils;
this.interval = $interval;
}
}
pageEController.$inject = ['$interval','httpService','utils']; |
import {
Suit
} from './Suit.js';
import {
Deck
} from './Deck.js';
import {
BlackJackHand
} from './BlackJackHand.js';
import {
BlackJackCard
} from './BlackJackCard.js';
export class BlackJackGameAutomator {
constructor(numPlayers) {
this.deck = undefined;
this.hands = [];
for (let i = 0; i < ... |
'use strict';
angular.module('gitSourceApp')
.factory('popoutWindow', function () {
return function popoutWindow(url) {
var name = 'gitsource_popout',
width = 980,
height = screen.availHeight * 0.85,
params = {
menubar: 'no', scrollbars: 'no', resizable: 'no',
... |
define(['jquery'], function($) {
function onChange(event) {
if( event && ((event.keyCode >= 38 && event.keyCode <= 40) || event.keyCode == 13) ) {
return;
}
var text = this.$input.val();
this.$list.empty();
this.listItems = [];
this.currentData = [];
this.index = 0;
for( var x in this.data ) {
... |
module.exports = [{
"type": "directory",
"name": ".",
"children": [{
"type": "file",
"name": "AUTHORS"
},
{
"type": "file",
"name": "CHANGELOG.md"
},
{
"type": "file",
"name": "CODE_OF_CONDUCT.md"
},
{
"type": "file"... |
var utils = require('node-qiniu/lib/utils');
utils.expiresIn = function (seconds) {
return function () {
return Math.round(Date.now() / 1000) + seconds;
};
};
module.exports = utils;
|
'use strict';
//Setting up route
angular.module('carts').config(['$stateProvider',
function($stateProvider) {
// Carts state routing
$stateProvider.
state('listCarts', {
url: '/carts',
templateUrl: 'modules/carts/views/list-carts.client.view.html'
}).
state('createCart', {
url: '/carts/create',
... |
/*global describe:false, it:false, beforeEach:false, afterEach:false*/
'use strict';
var kraken = require('kraken-js'),
express = require('express'),
path = require('path'),
request = require('supertest');
describe('settings', function () {
var app, mock;
beforeEach(function (done) {
... |
import React, { Component, PropTypes } from 'react';
export default class ShotListItem extends Component {
static propTypes = {
par: PropTypes.number.isRequired,
onRemove: PropTypes.func.isRequired,
shot: PropTypes.object.isRequired
}
render () {
const { lie, success, goingFor, club, distanceFro... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M15.5 13.5c0 2-2.5 3.5-2.5 5h-2c0-1.5-2.5-3-2.5-5 0-1.93 1.57-3.5 3.5-3.5s3.5 1.57 3.5 3.5zm-2.5 6h-2V21h2v-1.5zm6-6.5c0 1.68-.59 3.21-1.58 4.42l1.42 1.42C20.18 17.27 21 15.23 21 13c0-2.74-1.23-5... |
version https://git-lfs.github.com/spec/v1
oid sha256:9ad41e618160b34ebb9ede53893ae212023bd831d655de37c52af41e0ec460f3
size 1750
|
module.exports = Observer;
var Class = require('chip-utils/class');
var LinkedList = require('chip-utils/linked-list');
var expressions = require('expressions-js');
var diff = require('differences-js');
// # Observer
// Defines an observer class which represents an expression. Whenever that expression returns a new v... |
/**
* Client tests
*/
/*eslint-disable max-nested-callbacks */
import React from "react";
import { mount } from "enzyme";
import VictoryGroup from "src/components/victory-group/victory-group";
import VictoryBar from "src/components/victory-bar/victory-bar";
describe("components/victory-group", () => {
describe("d... |
define(function() {
'use strict';
/* @ngInject */
var highScoreSrvc = function($angularCacheFactory, $filter) {
this.cache = $angularCacheFactory('cache');
this.highScores = this.cache.get('highScores') || [];
this.$filter = $filter;
};
highScoreSrvc.prototype.add = function(score) {
var pri... |
import dateUtil from 'element-ui/src/utils/date';
import { t } from 'element-ui/src/locale';
const weeks = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
const months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];
const getI18nSettings = () => {
return {
dayNamesShort... |
document.addEventListener("DOMContentLoaded", function(event) {
var apollo_11 = new buzz.sound('sounds/effects/apollo_11_speech.mp3', {
preload: true,
loop: false
});
apollo_11.setVolume(50);
$(".astronaut").click(function() {
apollo_11.togglePlay();
});
$(window).scrol... |
/*
Utility function to fetch required data for component to render in server side.
This was inspired from https://github.com/caljrimmer/isomorphic-redux-app/blob/73e6e7d43ccd41e2eb557a70be79cebc494ee54b/src/common/api/fetchComponentDataBeforeRender.js
*/
import { sequence } from './promiseUtils';
export function fetch... |
const InputBlock = require('../inputBlock')
class Keyword extends InputBlock {
constructor (data) {
super(data)
this.keyword = data.keyword || this.requiredField('keyword')
this.title = data.title || this.requiredField('title')
this.subtitle = data.subtitle
this.icon = data.icon
}
respondsTo... |
define(function () {
"use strict";
// utility functions
var that = {};
that.map = Array.prototype.map;
that.reduce = Array.prototype.reduce;
that.mapcar = function (fn, lists) // ad-hock: assume all list lengths are the same. maybe fixed after.
{
var r = [];
for (var i... |
'use strict';
//const Boom = require("boom");
var app = {
register: function(server, options, next) {
// server.route({
// method: 'GET',
// path: '/',
// handler: function(request, reply) {
// reply(Boom.unauthorized());
// }
// });
... |
// eslint-disable-next-line global-require
if (process.env.NODE_ENV !== 'production' && !process.env.CI) require('dotenv').config()
const nodeEnv = process.env.NODE_ENV
const config = {
log: {}
}
if (nodeEnv === 'development') {
config.log.consoleLevel = 'debug'
config.log.logentriesLevel = 'debug'
} else if (n... |
// Generated on 2016-02-12 using generator-angular-fullstack 3.3.0
'use strict';
module.exports = function (grunt) {
var localConfig;
try {
localConfig = require('./server/config/local.env');
} catch(e) {
localConfig = {};
}
// Load grunt tasks automatically, when needed
require('jit-grunt')(grunt... |
// flow-typed signature: b9faafba9cc54e6eb26b2eb7d71123ec
// flow-typed version: <<STUB>>/lodash.trim_v^4.5.1/flow_v0.53.1
/**
* This is an autogenerated libdef stub for:
*
* 'lodash.trim'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with th... |
import Ember from 'ember';
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
export default Ember.Route.extend(AuthenticatedRouteMixin, {
sessionTypes: [],
afterModel() {
var self = this;
var course = this.modelFor('course');
var deferred = Ember.RSVP.defer();
... |
/**
* A collection of validation utility functions.
* @constructor
*/
function ValidationUtilities() {
}
/**
* Is the specified value set to something that is not null or undefined?
* @param value {*} The value.
* @returns {boolean} True, if the value is set to something; otherwise, false.
*/
ValidationUtilitie... |
import React, { Component, PropTypes } from 'react'
// components
import { InHeader } from 'components'
import { asyncConnect } from 'redux-async-connect'
@asyncConnect([
{ key: 'participant_events',
promise: ({ helpers }) => helpers.client.get('events/participant_events')
}
])
export default class InnerLayout... |
/* global THREE:false, requestAnimationFrame:false, Promise:false, HMDVRDevice:false, PositionSensorVRDevice:false, moment:false, navigator:false, document:false */
'use strict';
var container;
var context;
var camera, scene;
var vrEffect, renderer;
var vrControl, monoControl;
var modeVR = false;
function addAxisGr... |
/* ===================================================
* jquery.oas.validate.js
* 表单验证插件脚本
* ===================================================
*/
/**
* 需要校验的地方
* 1 登陆窗口的用户名
* 2 资金资金日报的资金填充格
* 3 所有查询界面可以输入文字的地方
* 校验的时机:
* 用户结束录入的时候。
* 校验失败提示:
* 在录入格的旁边显示一个提示,录入错误的地方成为焦点,当用户进入编辑状态时消失,
* 校验规则:
*
*/
... |
import 'core-js/fn/object/assign';
import injectTapEventPlugin from 'react-tap-event-plugin';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { Router, Route, Redirect, IndexRoute, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 're... |
System.register([], function (exports, module) {
'use strict';
return {
execute: function () {
console.log();
}
};
});
|
jest.dontMock('../Card');
jest.dontMock('../CardTitle');
describe('Card', function() {
var React = require('react'),
TestUtils = React.addons.TestUtils,
Card = require('../Card'),
CardTitle = require('../CardTitle'),
instance = null;
beforeEach(function() {
instance = TestUtils.renderI... |
// @flow
import filter from 'lodash/filter'
import type {GTFSStop, Segment} from '../types'
/**
* Create a point as a psuedo-segment for reroute modifications from stop info.
*/
export const stopToPoint = (coordinates: [number, number], id: string) => ({
geometry: {
type: 'Point',
coordinates
},
stopA... |
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var __decorate = (this && this.__decorate) || function (decora... |
'use strict';
/**
* Module dependencies.
*/
var glob = require('glob');
/**
* Module init function.
*/
module.exports = function() {
/**
* Before we begin, lets set the environment variable
* We'll Look for a valid NODE_ENV variable and if one cannot be found load the development NODE_ENV
*/
var environment... |
'use strict';
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
htmlhint: {
build: {
options: {
'tag-pair': true,
'tagname-lowercase': true,
'attr-lowercase': true,
'attr-value-double-quotes':... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.