code
stringlengths
2
1.05M
var rc = require('rc') module.exports = rc('gscd', { })
'use strict'; const mongoose = require('mongoose'); const UserSchema = new mongoose.Schema({ username: { type: String, index: true, sparse: true }, passwordHash: String, ids: { facebook: { type: String, index: true, sparse: true }, github: { type: String, index: true, sparse: true }, google: { type:...
// @flow /* eslint-env mocha */ /* global suite, benchmark */ import min from '.' import moment from 'moment' suite( 'min', function() { benchmark('date-fns', function() { return min([this.dateA, this.dateB]) }) benchmark('Moment.js', function() { return moment.min(this.momentA, this.mome...
var expect = require('expect.js'); var neo4j = require('../lib/neo4j'); var async = require('async'); var database; before(function(done) { this.timeout(10000); neo4j.setDatabaseProperties(['-Xmx4096m']); neo4j.connect('test/GraphDatabase.db', function(err, db) { database = db; done(err); }); }); aft...
/** * Clamper. * Detects proper clamp min/max. * * @param {number} a Current value to cut off * @param {number} min One side limit * @param {number} max Other side limit * * @return {number} Clamped value */ module.exports = require('./wrap')(function(a, min, max){ return max > min ? Math.max(Mat...
/** * Created by aliaksei on 28.12.2014. */ define([], function(){ function OnCategoryPreviewShow(rooms, anchor){ var _this = this; _this.rooms = function() { return rooms; }; _this.anchor = function () { return anchor; }; } return OnCateg...
angular.module("proton", [ // "ngAnimate", // We can't use the `ngAnimate`, it causes delays on application and also a problem with the iframe sandbox. "ngSanitize", "ngResource", "ngCookies", "btford.markdown", "ngFileUpload", "cgNotify", "pikaday", "toggle-switch", "pascalprech...
"use strict"; var _ = require('lodash'); var Promise = require('bluebird'); /** * Cryptography routines. * @returns {{ * sha256: sha256, sha384: sha384, sha512: sha512, * rsaSha256Signature: rsaSha256Signature, * verifyRsaSha256Signature: verifyRsaSha256Signature, * randomNumber: randomNumber, rando...
'use strict'; //Manage events service used to communicate Manage events REST endpoints angular.module('manage-events').factory('ManageEvents', ['$resource', function($resource) { return $resource('api/manage-events/:manageEventId', { manageEventId: '@_id' }, { update: { method: 'PUT' } }); } ]);
(function(module) { var repoView = {}; var repoCompiler = Handlebars.compile($('#repo-template').html()); repoView.renderRepos = function() { $('#repos').append( repos.withTheAttribute('name') .map(repoCompiler) ); }; repos.requestRepos(repoView.renderRepos); module.repoView = repoView;...
import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(h("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z" }), 'CropDin');
const sink = (a, k, N) => { /* * While the comparison node (k) still has children (2k or 2k+1), check * the parent against both its children. If it is less than either, swap * it with the larger of its children. Continue sinking down the heap * until a parent is larger than its two children. */ while...
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex...
// 获取随机数 export function getRandomCode(){ var result = []; for(var i=0;i<20;i++){ var t = Math.floor(Math.random()*10); result+=t; } return result; } export function FormatMoney(s) { var s = (s!== void 0 && s!== null) && s.toString(); if (/[^0-9\.]/.test(s)){ retur...
angular.module('common') .factory('howidriveSettings', function($localstorage) { return { isFirstLaunch: function () { return $localstorage.get('isFirstLaunch', true); }, setFirstLaunchToFalse: function () { $localstorage.set('isFirstLaunch', false); }, } });
define(['exports', 'aurelia-dependency-injection', './array-collection-strategy', './map-collection-strategy', './number-strategy'], function (exports, _aureliaDependencyInjection, _arrayCollectionStrategy, _mapCollectionStrategy, _numberStrategy) { 'use strict'; exports.__esModule = true; function _classCallCh...
// Copyright (c) 2015 Isode Limited. // All rights reserved. // See the LICENSE file for more information. var View = require('ampersand-view'); var templates = require('../templates/compiled'); var FormView = require('ampersand-form-view'); var InputView = require('ampersand-input-view'); var LoginForm = FormView.ex...
const mongoose = require('mongoose'); const Schema = mongoose.Schema; const passportLocalMongoose = require('passport-local-mongoose'); const userSchema = new Schema({ username: { type: String, required: 'Username is required', trim: true, }, savedJobs: [ { type: Schema.Types.ObjectId, ...
const _ = require('../lib/utilbox.js') describe('Queue data structure', () => { let queue = new _.Queue() queue.enqueue(5) queue.enqueue(6) queue.enqueue(7) test('[Queue] Enqueues in the correct order', () => { queue.enqueue(8) expect(queue._queue[0]).toBe(8) expect(queue._queue.length).t...
import * as types from '../Action/actionType'; import initialState from './initialState'; export default (state = initialState.appMessage, action) => { switch(action.type) { case types.APP_MESSAGE: return action.appMessage; default: return state; } }
var nodemailer = require("nodemailer"); var mailConfig = require('./../../config/mailing'); var sendMail = function (item) { var smtpConfig = { host: mailConfig.host, port: mailConfig.port, secure: mailConfig.secure, // use SSL auth: { user: mailConfig.auth.user, pass: mailConfi...
import { run } from '@ember/runloop'; import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render } from '@ember/test-helpers'; import { TextMode, TextHighlightRules, Range } from 'ember-ace'; import PageObject from 'ember-cli-page-object'; import pollCondition from 'em...
version https://git-lfs.github.com/spec/v1 oid sha256:4288dd881d83e7420cc429902314fa45131d228174f70ec886eea687829fc543 size 2420
// Workaround for clipboard.js in bootstrap modal. $.fn.modal.Constructor.prototype.enforceFocus = function() {}; $('#newusername').on('change keyup', function() { var username = $(this).val(); $.getJSON(username_available_endpoint, { user: username }, function(data) { if (data.available) { $('#newuserna...
'use strict'; var obj = { a: { b: { c: 'hello' } } } var c = 'this is important'; /* with(obj.a.b){ console.log(c); } */ (function(newVar){ console.log(newVar); }(obj.a.b.c))
// import Parse from 'parse/node'; // import { // PARSE_API_KEY, // PARSE_JS_KEY, // SERVER_URL, // } from '../constants';
(function () { 'use strict'; var BusRoutesMapController = function($rootScope, $ionicModal, $interval, $timeout, $q, $http, $scope, $log, leafletData, $window) { //objects var leafletMap;//leaflet map object reference var geojsoncollection;//object containing data from the geojson busroute file var eta...
/************************************************************* * * MathJax/localization/kn/kn.js * * Copyright (c) 2009-2018 The MathJax Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy ...
/* * Swiper 2.7.6 * Mobile touch slider and framework with hardware accelerated transitions * * http://www.idangero.us/sliders/swiper/ * * Copyright 2010-2015, Vladimir Kharlampidi * The iDangero.us * http://www.idangero.us/ * * Licensed under GPL & MIT * * Released on: February 11, 2015 */ var Swiper = fun...
import { expect } from 'chai'; import { Shared } from '../../../../src/base/core/shared'; describe('Shared', () => { describe('constructor', () => { it(`should default redirectUrl to 'location.origin'`, () => { class Example extends Shared {}; const example = new Example(); expect(example.co...
var c = require('chalk') var converters = { aldc: require(__dirname + '/aldc'), gws: require(__dirname + '/gws'), nes: require(__dirname + '/nes'), pss: require(__dirname + '/pss'), abk: require(__dirname + '/abk') } module.exports = { convert: function(string, from, to, path) { if (from === 'defa...
var loaderUtils = require('loader-utils'); var strRepeat = function(str, times) { var result = ''; for (var i = 0; i < times; i++) { result += str; } return result; }; // Default macros module.exports = { // Includes a child template using the same context require: function(resourceP...
/** * Module dependencies */ var config = require('./config'), express = require('express'), db = require('./server/model/db'), mongoose = require('mongoose'), routes = require('./server/routes'), api = require('./server/routes/api'), http = require('http'), path = require('path'), fs...
/** * Created by zhaoxiaoqiang on 2017/1/28. */ function p1() { return new Promise(function (resolve, reject) { setTimeout(function () { resolve('p1'); }, 2000); }); } function p2(value) { console.log('第一个promise向第二个promise传入参数: ' + value); return new Promise(function (re...
import Ember from 'ember'; import Resolver from 'ember/resolver'; import loadInitializers from 'ember/load-initializers'; /** * Flag to enable/disable model factory injections (disabled by default) * If model factory injections are enabled, models should not be * accessed globally (only through `container.lookupFac...
ZUTOOLS.LayoutManager = function ( config ) { var self = this; config.tools[ 0 ].push( this.generateLanguageTool( config.languages, self ) ); this.circuit = ZUTOOLS.Utils.loadXML( 'projects/adder/circuit.svg' ).lastChild; this.tooltip = new ZUTOOLS.TooltipManager(); this.toolbar = new ZUTOOLS.Toolbar( confi...
import Parse from 'parse'; import Constants from '../appConfig'; Parse.initialize(Constants.XParseApplicationId); Parse.masterKey = Constants.XParseMasterKey; Parse.serverURL = Constants.ApiBaseURL; export function logout() { /* eslint no-console: 0 */ console.log('logging out...'); Parse.User.logOut(); windo...
var gulp = require('gulp'); var jshint = require('gulp-jshint'); var uglify = require('gulp-uglify'); var rename = require('gulp-rename'); var concat = require('gulp-concat'); var compass = require('gulp-compass'); var minifyCSS = require('gulp-minify-css'); var pkg = require('./package.json'); var paths = { images: ...
import { Point } from 'slate' export const input = { point: { path: [0, 1], offset: 0, }, another: { path: [0, 1], offset: 3, }, } export const test = ({ point, another }) => { return Point.isAfter(point, another) } export const output = false
import { API_ROOT } from '../../config/global'; import { mergeQueries, resolveQueries } from '../../lib/state_tools/queries_resolver_server'; import serverState from '../../config/server_state'; import mutateState from '../../lib/state_tools/mutator_server'; export default function api(router) { // Asking for data ...
const ChatCommands = require('../../../build/server/game/chatcommands.js'); describe('ChatCommands', function() { beforeEach(function() { this.gameSpy = jasmine.createSpyObj('game', ['addMessage', 'promptForSelect', 'getFrameworkContext', 'queueStep','queueSimpleStep', 'openEventWindow']); this.gam...
'use strict'; let should = require('should'), isq = require('..'); describe('isq', () => { it('should create a Number from a string', () => { isq.Number('1.234 56').toNumber().should.equal(1.23456); isq.Number('1.234 56(78)').value.toNumber().should.equal(1.23456); isq.Number('1.234 5...
import React from 'react'; import PropTypes from 'prop-types'; import Relay from 'react-relay/classic'; import { commitMutation, createFragmentContainer, graphql } from 'react-relay/compat'; import { FormattedMessage } from 'react-intl'; import Typography from '@material-ui/core/Typography'; import { MultiSelector } fr...
/** * Configuration for head elements added during the creation of index.html. * * All href attributes are added the publicPath (if exists) by default. * You can explicitly hint to prefix a publicPath by setting a boolean value to a key that has * the same name as the attribute you want to operate on, but prefix w...
/* */ "format cjs"; // moment.js locale configuration // locale : canadian english (en-ca) // author : Jonathan Abourbih : https://github.com/jonbca (function (factory) { if (typeof define === 'function' && define.amd) { define(["moment"], factory); // AMD } else if (typeof exports === 'object') { ...
function sign(a, b, c) { var arr = [a, b, c], negative = 0; for (var i = 0; i < arr.length; i += 1) { if (arr[i] < 0) { negative += 1; } } if (a * 1 === 0 || b * 1 === 0 || c * 1 === 0) { return '0'; } else if (negative % 2 === 0) { return '+'; ...
UI.registerHelper('fullNameOf', function(person) { if(person) { return person.lastName + ", " + person.firstName; } }); UI.registerHelper('activeIfTemplateIs', function(templateName) { var currentRoute = Router.current(); return currentRoute && templateName === currentRoute.lookupTemplate() ? '...
'use strict'; const electron = require('electron'); const app = electron.app; const shell = electron.shell; const appName = app.getName(); const macTemplate = [ { label: appName, submenu: [ { label: `About ${appName}`, role: 'about' }, ...
module.exports = { renderView: function (callback, path, model, viewBag, routeValues) { callback(null, { html: "<html><head></head><body>" + "<p><strong>Model:</strong> " + JSON.stringify(model) + "</p>" + "<p><strong>ViewBag:</strong> " + JSON.stringify(viewBag) + "</p>...
var EventEmitter = require('events').EventEmitter; var util = require('util'); function _Channel(name, redisClient, options) { options = Object.assign(options || {}, { size: (1024 * 1024 * 1 ), // the Data max size is 1mb }); this.name = name; this.redis = redisClient; this.namespace = 'nod...
var util = require("util") var widgetUtil = require('../lib/widget_util.js'); exports.show = function (req, res) { var async = require('async'); if (!req.session.widget) { req.session.messages = { errors: ['widget not found'] }; res.redirect('/'); return; } widgetUtil.render_widget(req.session.widget, funct...
version https://git-lfs.github.com/spec/v1 oid sha256:208358d4b12b982be6323f685c828802f42625f1df470af135e5baeeb9b4c1dc size 3056
import cx from 'clsx' import _ from 'lodash' import PropTypes from 'prop-types' import React from 'react' import { childrenUtils, customPropTypes, getElementType, getUnhandledProps, SUI, useKeyOnly, useKeyOrValueAndKey, useTextAlignProp, useValueAndKey, } from '../../lib' import SegmentGroup from './...
import 'next/dist/build/polyfills/polyfill-nomodule'
/* Axis label plugin for engineering-flot Derived from: Axis Labels Plugin for flot. http://github.com/markrcote/flot-axislabels Original code is Copyright (c) 2010 Xuan Luo. Original code was released under the GPLv3 license by Xuan Luo, September 2010. Original code was rereleased under the MIT license by Xuan Luo,...
var fs = require('fs'); var gulp = require('gulp'); var rename = require('gulp-rename'); var awspublish = require('../'); var credentials = JSON.parse(fs.readFileSync('aws-credentials.json', 'utf8')); var publisher = awspublish.create(credentials); // gulp.src('examples/fixtures/*.js') // .pipe(rename(function (pat...
var LanguageDetector = function() { this.supportedLanguages = ['xml', 'json']; } // Try to autodetect language // Returns xml, json or null if no language could be identified LanguageDetector.prototype.autoDetectLanguage = function(content) { if(!content || content === 'undefined') { return null; }...
{ if (this.props.x === 226) { return React.createElement(_render98, { x: 225 }); } if (this.props.x === 255) { return React.createElement(_render111, { x: 254 }); } if (this.props.x === 258) { return React.createElement(_render113, { x: 257 }); } if (this.props...
(function () { function updateChildren(item) { var text = item.find(".text")[0]; var border = item.find(".border")[0]; var datepicker = item.find(".datepickerIcon")[0]; var calendar = item.find(".calendarIcon")[0]; text.setText(item.getText()); text.setFontFamily(...
var cfg = { _id: 'rs0', members: [ { _id: 0, host: '#AUTO_REPLACE_SERVER_1:27001', "priority": 5}, { _id: 1, host: '#AUTO_REPLACE_SERVER_2:27001', "priority": 2}, { _id: 2, host: '#AUTO_REPLACE_SERVER_1:27002', "priority" : 0, "arbiterOnly" : true} ] }; var error = rs.initiate(cfg); pri...
var bookshelf = require('../config/db'); var User = bookshelf.Model.extend({ tableName: 'users', role: function () { return this.belongsTo('Role', 'role_id'); }, lists: function () { return this.belongsToMany('List', 'users_lists', 'user_id', 'list_id'); } }); module.exports = book...
import builder from 'focus-core/component/builder'; import types from 'focus-core/component/types'; const React = require('react'); const Checkbox = require('../../../components/input/checkbox'); const i18nBehaviour = require('../../i18n/mixin'); const {pull} = require('lodash/array'); const selectCheckboxMixin = { ...
import Welcome from '../../app/components/Welcome'; import { shallow } from 'enzyme'; import React from 'react'; test('Welcome loaded', () => { expect(Welcome).toBeDefined(); }); test('Welcome Compenent:test', () => { const WelcomeShallow = shallow(<Welcome />); expect(WelcomeShallow).toBeDefined(); });
// Create the utility object var objUtil = new ActiveXObject("TCUtil"); // Create an object, using the JScript operator new var objStrings = new ActiveXObject("TCObj.Strings"); // Add some strings to the collection objStrings.Add("One"); objStrings.Add("Two"); objStrings.Add("Three"); // Create an ObjRef string for ...
"use strict"; var mongoose = require('mongoose'); mongoose.connect(process.env.mongoConnection); function template(fields) { return function (data) { var item = {}; for (var index = 0; index < fields.length; index++) { var field = fields[index]; item[field] = data[field]; ...
var xhr = new XMLHttpRequest(); xhr.open("POST", "http://ctcprojects.apiary.io/project"); xhr.setRequestHeader("Content-Type", "application/json"); xhr.onreadystatechange = function () { if (this.readyState == 4) { //alert('Status: '+this.status+'\nHeaders: '+JSON.stringify(this.getAllResponseHeaders())+'\nBody: ...
const Long = require('./long.js').Long; class Buffer extends Uint8Array { constructor(len) { let b; if (len && ArrayBuffer.prototype.isPrototypeOf(len)) b = len; else if (typeof len === 'string') b = $toArrayBuffer(len); else b = new ArrayBuffer(l...
Given a binary matrix, find out the maximum size square sub-matrix with all 1s. For example, consider the below binary matrix. 0 1 1 0 1 1 1 0 1 0 0 1 1 1 0 1 1 1 1 0 1 1 1 1 1 0 0 0 0 0 The maximum square sub-matrix with all set bits is 1 1 1 1 1 1 1 1 ...
'use strict'; /** * Module dependencies. */ var should = require('should'), mongoose = require('mongoose'), User = mongoose.model('User'), Sponsor = mongoose.model('Sponsor'); /** * Globals */ var user, sponsor; /** * Unit tests */ describe('Sponsor Model Unit Tests:', function() { beforeEach(function(done...
define(['exports', './configuration', './user', './authentication', './collection', './events'], function (exports, _configuration, _user, _authentication, _collection, _events) { 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); exports.configure = configure; function _intero...
'use strict'; var React = require('react'); var mui = require('material-ui'); var SvgIcon = mui.SvgIcon; var createClass = require('create-react-class'); var ActionSettingsApplications = createClass({ displayName: 'ActionSettingsApplications', render: function render() { return React.createElement( Sv...
(function() { jQuery(function() { var attr, key, radioAttrs, radioHtml, searchHtml, searchTextBefore, style; style = "height: 30px; font: bold 20px Helvetica;"; radioAttrs = { task: { value: 1, name: "タスク" }, timeLine: { value: 2, name: "タイムライン" } ...
var postmark = require('./notifications/email/postmark'); var events = require('events'); function WatchMen(services, storage, options){ this.storage = storage; this.services = services; this.daemon_status = 0; //0=stopped, 1=running this.current_requests = 0; } require('util').inherits(WatchMen, events.Event...
/*global $,activateTagCloud*/ /** * Scripts specific to the TagCloud page. * * NOTE: we require jQuery TagCloud! */ $(function () { /** * This function activates the tag cloud functionality. * Call it from the TagCloud page. *` * @note It's actually defined on the TagCloud page! * * @param smaller T...
export default { classes: [ { name: 'Test Class 1', type: 'classes' }, { name: 'Test Class 2', type: 'classes' }, { name: 'Test Class 3', type: 'classes' } ], description: 'Test App Fixture data', guides: [ { id: 'test-1', attributes: { linkText: 'Test 1' } }, { id: 'test-1', attributes: { l...
'use strict'; var chai = require('chai'), expect = chai.expect, request = require('supertest'); describe('INTEGRATION /pushwoosh/json/1.3 default', function () { var app, url = '/pushwoosh/json/1.3'; before( function () { app = require('../../index')({ startServer: false, pushwoosh: {} ...
import Group from './Group'; export default Group;
/** * TaskFeedController * @namespace crowdsource.template.controllers * @author dmorina */ (function () { 'use strict'; angular .module('crowdsource.template.controllers') .controller('TemplateController', TemplateController); TemplateController.$inject = ['$window', '$state', '$scope...
var UnitTestRunner = function(options) { this._markedUnseen = false; this.testsRegex = options.testsRegex || /^tests\//; this.modulesNames = options.modulesNames || []; this.require = options.require || AMD.require; this.markAsUnseen = options.markAsUnseen || AMD.markAsUnseen; }; var extend = function(modu...
const HttpStatus = require('http-status'); const services = require('../services'); const utils = require('../../config/utils'); module.exports = { /** * Get status of system */ getStatus: (req, res) => Promise.all([ services.manager.isRunning(), services.manager.getWorkersStatus() ...
// @AngularClass // Helper var sliceArgs = Function.prototype.call.bind(Array.prototype.slice); var NODE_ENV = process.env.NODE_ENV || 'development'; // Node var webpack = require('webpack'); var path = require('path'); var pkg = require('./package.json'); // Webpack Plugins var OccurenceOrderPlugin = webpack.optim...
/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // THIS CODE IS GENERATED - DO NOT MODIFY // See angular/tools/gulp-tasks/cldr/extract.js (function(global) { glo...
var keystone = require('keystone'), Types = keystone.Field.Types; // Create model. Additional options allow menu name to be used what auto-generating URLs var Race = new keystone.List('Race', { autokey: { path: 'key', from: 'Race', unique: true }, map: { name: 'race' } }); // Create fields Race.add({ race: { type...
(function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS return mod(require("../lib/infer"), require("../lib/tern")); if (typeof define == "function" && define.amd) // AMD return define(["../lib/infer", "../lib/tern"], mod); mod(tern, tern); })(function(infer, tern) { "u...
module.exports = function (grunt, data) { return { build: { files: { '<%= _PATH.pub_scripts %>/<%= _FILE.scripts_min %>': ['<%= _PATH.pub_scripts %>/<%= _FILE.scripts %>'] } } } };
import { trace } from '~/utils/Potrace.js' describe('Potrace.trace', () => { it('should return an SVG path for a canvas', done => { let testCanvas = document.createElement('canvas') testCanvas.width = 100 testCanvas.height = 100 const path = 'M1 15.5 L 1 30 1.518 30 L 2.036 30 11.848 25.076 L 2...
backman.factory('_setting', function ($rootScope) { 'use strict'; var _data = { base: location.protocol + '//' + location.host, path: '/' + location.pathname.split('/index.html')[0], globAjaxParams: {} }; _data.path = _data.path == '/' ? '' : _data.path; //左侧导航栏接口地址 _d...
'use strict'; const secrets = require('./lib/secrets'); // eslint-disable-line global-require /* istanbul ignore if */ if (process.env.NODE_ENV === 'production') { process.env.NEW_RELIC_LICENSE_KEY = secrets.NEW_RELIC_LICENSE_KEY; /* eslint-disable no-console */ console.log('Starting newrelic application monit...
export default function style_swing(playback) { var style = {}; style.swing = true; style.requireInstruments = [ 'percussion', 'acoustic_grand_piano', 'acoustic_bass' ]; var drums = function() { playback.schedule( () => playback.drum('Open Hi-Hat', 0.1), [1,2,2.5,3,4,4.5]...
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), less: { avnpc: { options: { strictMath: true, sourceMap: true, outputSourceFiles: true, //写在 cs...
module.exports = function createMiddleware(db, config, modify_) { if (!db) { throw new Error('must supply a db instance') } if (typeof config === 'function') { modify_ = config config = undefined } config = config || {} var modify = modify_ || modifyNoop if (config.writeBody === undefined) { // TODO:...
/*wipe global object*/ var wipe = wipe || {}; /*Variables*/ wipe.models = {}; wipe.partials = {}; wipe.templates = {}; /**/ (function() { var baseModelHtml = wipe.get("misc/base.json") || ""; ["base", "partials", "templates"].forEach(function(modelName) { var html = ("base" == modelName) ? baseMode...
'use strict'; // `debug.js` - how to validate swagger output and get warning/error messages during development const Hapi = require('hapi'); const Inert = require('inert'); const Vision = require('vision'); const Chalk = require('chalk'); const HapiSwagger = require('../'); const Pack = require('../package'); let Ro...
import Octicon from '../components/Octicon.vue' Octicon.register({"chevron-up":{"width":10,"height":16,"d":"M10 10l-1.5 1.5L5 7.75 1.5 11.5 0 10l5-5z"}})
"use strict"; exports.isPending = require("./is") exports.deliver = require("./deliver") exports.await = require("./await")
/** @jsx jsx */ import { jsx } from 'slate-hyperscript' export const schema = [ { for: 'node', match: { a: true }, validate: { children: [{ min: 2 }], }, }, ] export const input = ( <editor> <element a> <element b>one</element> </element> </editor> ) export const output =...
'use strict'; const errorFactory = require('error-factory'); module.exports = errorFactory('DuplicationError'); module.exports.prototype.statusCode = 208;
const {bookshelf} = require('../db/config') require('./datasetMd') const Graph = bookshelf.Model.extend({ tableName: 'graphs', dataset: function() { return this.belongsTo('Dataset') } }) module.exports = bookshelf.model('Graph', Graph)
/* Helper class to read data from config.xml file. */ (function() { var path = require('path'), xmlHelper = require('./xmlHelper.js'), ANDROID = 'android', IOS = 'ios', CONFIG_FILE_NAME = 'config.xml', context, projectRoot; module.exports = ConfigXmlHelper; // region public API /** ...
/** * array_unique for phpjs */ function array_unique (inputArr) { // eslint-disable-line camelcase // discuss at: http://locutus.io/php/array_unique/ // original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com) // input by: duncan // input by: Brett Zamir (http://brett-zamir.me) // bugfixed by...