code
stringlengths
2
1.05M
/*global Math */ var ObjectUtils = require('./object-utils'), StringUtils = require('./string-utils'), // WEEK_DAYS = 7, // YEAR_WEEKS = 52, // MS_HOUR = ((60 * 60) * 1000), // MS_DAY = (MS_HOUR * 24), // MS_WEEK = (MS_DAY * WEEK_DAYS), // YEAR_DAYS = (YEAR_WEEKS * WEEK_DAYS), // ZERO_WE...
define([ 'marionette', '../../templates' ], function (Marionette, templates) { 'use strict'; return Marionette.ItemView.extend({ template: templates.two }); });
define(["exports", "aurelia-framework", "../../config", "../../api", "../../record-manager", "../../deep-observer", "aurelia-binding"], function (exports, _aureliaFramework, _config, _api, _recordManager, _deepObserver, _aureliaBinding) { "use strict"; Object.defineProperty(exports, "__esModule", { val...
/** API fetcher using axios **/ import axios from 'axios'; require('dotenv').config(); const API_ENDPOINT = process.env.REACT_APP_API_ENDPOINT; const instance = axios.create({ baseURL: API_ENDPOINT, timeout: 1000, headers: {} }); class TagApi { static getAll() { return instance.get('/tags.json'). ...
var BoardgameApp = require('./boardgame/index').BoardgameRouter; var Backbone = require('backbone'); var $ = window.jQuery = require('jquery'); Backbone.$ = $; new BoardgameApp(); Backbone.history.start({pushState: false});
/** * @file REST通信用クライアント */ const axios = require('axios').default; /** * REST通信用クライアント。 * * @author Koichi Nagaoka */ class RESTClient { /** * クライアントを初期化する。 * * @param {string} url 接続先URL * @param {object} params パラメータ */ constructor(url, params) { this.url = url; this.par...
import { expect } from 'chai'; import {Yeelight} from '../src/yeelight'; import Device from '../src/device'; import dgram from 'dgram'; describe('Yeelight', () => { it('should be able to instantiate', () => { const yeelight = new Yeelight(); expect(yeelight).to.be.an.instanceof(Yeelight); }); it('should...
const migrateUtil = require('../migrate-util'); const USERNAME_MIN_LENGTH = 3; const USERNAME_MAX_LENGTH = 80; module.exports = { /** * fixes username length criteria */ async up(db) { const ops = []; await db .collection('rooms') .find({}) .forEach((room) => { if (room.us...
/** * JavaScript Template Engine * (c) 2005-2011, Juerg Lehni, http://lehni.org * * Template.js is released under the MIT license * http://dev.helma.org/Wiki/JavaScript+Template+Engine/ * http://bootstrapjs.org/ */ /** * IMPORTANT: * * Template.js is designed to be mostly independent of Bootstrap.js, * but ...
var assert = require('assert'); module.exports = function() { 'use strict'; var enteredItem; this.World = require('../support/world').World; this.Given(/^I have an empty grocery list view$/, function(callback) { this.emptyGroceryListView(); assert.equal(this.getGroceryListView().childNodes.length, 0...
import connectToStores from 'alt-utils/lib/connectToStores'; import React, { PropTypes, Component } from 'react'; import DateStore from '../stores/DateStore'; import DateHeader from '../components/DateHeader'; const propTypes = { date: PropTypes.string.isRequired, }; class DateHeaderContainer extends Component { ...
import React from "react"; import { StaticQuery, graphql } from "gatsby"; import Experience from "../components/Experience"; import Projects from "../components/Projects"; import Blogs from "../components/Blogs"; import About from "../components/Sidebar/About"; import Links from "../components/Sidebar/Links"; import La...
/** * Created by zane.deng on 13-12-15. */ (function() { /** * MVC框架的数据模型管理器 * @class * @param {string} coreId 模块核心标识 * @param {string} mid 数据模型管理器ID * @param {object} data 数据模型的初始数据 */ ss2d.Model = Class ( /** @lends ss2d.Model.prototype */ { STA...
/* */ "format global"; (function () { if (window && window.navigator) { var parseVersion = function (matches) { if (matches) { return parseFloat(matches[1]); } }; // Detect various browser versions because some old versions don't fully support the 'input' event var operaVe...
var russianDoll = { size: 'large', inner: { size: 'medium', inner: { size: 'small', inner: { size: 'tiny' } } } };
TabControl = { element: null, controls: {}, control_id: "", tab_container: null, tabs: {}, /* Initializes a tab control. The variable +element_id+ must be the id of an HTML element containing one element with it's class name set to 'tabs' and another element with it's class na...
version https://git-lfs.github.com/spec/v1 oid sha256:856b5ed3f89dbed684c542c26f99a27419b7fdc63434475bab419a5eee8bccdb size 749
'use strict' const Lab = require('@hapi/lab') const Code = require('@hapi/code') const Hapi = require('@hapi/hapi') const server = new Hapi.Server() const { expect } = Code const { experiment, it, before } = (exports.lab = Lab.script()) experiment('hapi-geo-locate uses an API auth token', () => { before(async () ...
/* eslint-disable */ // Auto-generated by generate-enums script on Thu Feb 24 2022 04:14:05 GMT-0500 (Eastern Standard Time) /** * @enum * @readonly */ const EMsg = { "Invalid": 0, "Multi": 1, "ProtobufWrapped": 2, "BaseGeneral": 100, "GenericReply": 100, "DestJobFailed": 113, "Alert": 115, "SCIDRequest": 1...
'use strict'; module.exports = function(grunt) { // Project configuration. grunt.initConfig({ // Metadata. pkg: grunt.file.readJSON('package.json'), banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %>\n' + '<%= pkg.homepage ? "* " + pkg.homep...
var path = require('path'); var webpack = require('webpack'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); module.exports = { context: path.join(__dirname, 'site'), entry: './components/client.js', output: { filename: 'app.js', path: path.join(__dirname, 'site/public') ...
import React, { Component } from 'react' export default class Loader extends Component { render () { const style = require('./loader.css') const server = __SERVER__ // eslint-disable-line return ( <div className={style['loader-wrapper']}> <div className={style.loader}> <div class...
'use strict'; describe('Directive: compensation', function () { // load the directive's module beforeEach(module('digitalCasefileApp')); beforeEach(module('mocks')); beforeEach(module('templates')); var widget; var parentScope; var scope; var template = '<compensation data="casefile.compensation" st...
var Invoker = require('./invoker').Invoker; var createSendStatusCmd = require('./createSendStatusCmd').createSendStatusCmd; var statusUpdateService = require('./statusUpdateService').statusUpdateService; var invoker = new Invoker(); var command = createSendStatusCmd(statusUpdateService, 'HI!'); invoker.run(command); i...
import React from 'react'; import Link from 'gatsby-link'; import ttc_complaints from '../assets/ttc-complaints.jpg'; import drone from '../assets/drone.jpg'; import eatxpress from '../assets/eatxpress.jpg'; const PortfolioPage = () => ( <div className="portfolio"> <h2>Portfolio</h2> <div className="item">...
var _ = require('underscore'), AmountEntry = require('../../AmountEntry'), EntriesBySequence = require('./EntriesBySequence'); var ProgressiveEntrySum = function() { }; ProgressiveEntrySum.prototype = { /** * This calculates the progressive total for all of the entries in an * AmountEntryCollection...
import Helper, { states } from './_helper'; import { module, test } from 'qunit'; module('Integration | ORM | Belongs To | One-way Polymorphic | association #new', { beforeEach() { this.helper = new Helper(); } }); /* The model can make a new unsaved belongs-to association, for all states */ states.forEach...
var class_item = [ [ "Item", "class_item.html#a4c157dbd9f8703c5a0329ef7b679775a", null ], [ "getItem", "class_item.html#a28fbe690c0831ef8a3f889531390f6b7", null ], [ "getSelectedItemId", "class_item.html#a52735bc950c2e71c79810b424165cc7c", null ], [ "paint", "class_item.html#af98fd69e4bcbc6db72fa0ddbd69...
/// <reference path="Xrm.js" /> var EntityLogicalName = "ss_backupfile"; var Form_1fc9799a_fa05_4343_ba42_aaaf1055570e_Properties = { ownerid: "ownerid", ss_entityid: "ss_entityid", ss_logicalname: "ss_logicalname", statecode: "statecode" }; var Form_1fc9799a_fa05_4343_ba42_aaaf1055570e_Controls = { ...
// Initialization CinchApp.viewModel = new CinchViewModel(); $(function () { if(Modernizr.websockets) { var socket = CinchApp.socket; //Add warning when navigating away from game window.onbeforeunload = CinchApp.viewModel.navigateAwayMessage; //Apply Knockout bindings ko....
__req.define([ ],function( ){ var URL = function( value ){ this._protocol = null; this._hostname = null; this._port = null; this._pathname = null; this._search = null; this._hash = null; var index; // hash index = value.indexOf("#"); ...
// Regular expression that matches all symbols in the `Greek` script as per Unicode v4.1.0: /[\u0374\u0375\u037A\u0384-\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03CE\u03D0-\u03E1\u03F0-\u03FF\u1D26-\u1D2A\u1D5D-\u1D61\u1D66-\u1D6A\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u...
'use strict'; require('babel-core/register'); require('./app.js');
var restify = require('restify'); module.exports = exports = function(params) { var generateUuid = params.generateUuid, Account = params.Account; return { createAccount : function(req, res, next) { var account = new Account, guid = generateUuid(); accou...
/* * Prints about info * Author : Vereis~ */ function about(args) { var helpDesc = ["This function prints out some standard about information. This function takes no arguments"]; if (args[0] == "help") { print(printHelp(helpDesc)); } else { print("Testing information"); print("More t...
"use strict"; exports.__esModule = true; /** * Description */ exports.findParent = findParent; /** * Description */ exports.getStatementParent = getStatementParent; /** * Description */ exports.getAncestry = getAncestry; /** * Description */ exports.inType = inType; /** * Description */ exports.inSh...
export const arrows_right = {"viewBox":"0 0 64 64","children":[{"name":"g","attribs":{},"children":[{"name":"polyline","attribs":{"fill":"none","stroke":"#000000","stroke-width":"2","stroke-linejoin":"bevel","stroke-miterlimit":"10","points":"27,15 44,32 \r\n\t\t27,49 \t"},"children":[{"name":"polyline","attribs":{"fil...
import Vue from 'vue' import Router from 'vue-router' Vue.use(Router) import todoList from '../components/todolist/index.vue' import writeView from '../components/todolist/write.vue' export default new Router({ mode: 'history', routes: [ { path: '/', component: todoList }, { path:...
module.exports = function trim(vlr) { while (vlr.indexOf(' ') !== -1) vlr = vlr.replace(' ', ''); return vlr; }
/** * @author Stéphane Roucheray * @extends jquery */ jQuery.fn.carousel = function(previous, next, options){ var sliderList = jQuery(this).children()[0]; if (sliderList) { var increment = jQuery(sliderList).children().outerWidth("true"), elmnts = jQuery(sliderList).children(), numElmts = elmnts.length,...
'use strict'; // // Expose the footer Pagelet. // require('./pagelet').extend({ // // Brand is replaced by Contour when the Pagelet is fetched from assets. // css: '{{brand}}/footer/base.styl', view: '{{brand}}/footer/view.hbs', dependencies: [ '{{brand}}/grid.styl', '{{brand}}/icons.styl', '{...
/** * Create fake user for testing */ import faker from 'faker'; import BaseFactory from './base.factory'; class UserFactory extends BaseFactory { /** * Create a user * * @public * @param {Object} attrs of user * @returns {Object} a fake user */ generate(attrs) { return { name: `${f...
describe( 'AppCtrl', function() { describe( 'isCurrentUrl', function() { var AppCtrl, $location, $scope; beforeEach( module( 'celestial' ) ); beforeEach( inject( function( $controller, _$location_, $rootScope ) { $location = _$location_; $scope = $rootScope.$new(); AppCtrl = $controlle...
// Get references to the DOM elements we care about. var output = document.querySelector(".output"), input = document.querySelector(".input"), codeMirror = CodeMirror(input, {mode: "javascript", theme:'blackboard', lineNumbers: true, ...
/* jshint node: true */ module.exports = function (grunt) { 'use strict'; grunt.initConfig({ // metadata pkg: grunt.file.readJSON('package.json'), banner: '/**\n' + ' * -----------------------------------------------------\n' + ' * Zweer.github.io v<%= pkg.version %> by @dotzwe...
(function () { angular .module('root') .controller('CalendarController', CalendarController) CalendarController.$inject = ['$scope', '$http', 'uiCalendarConfig']; function CalendarController( $scope, $http, uiCalendarConfig) { var vm = this; ...
import {Lexicon, Script} from '../index.js'; export class Language { constructor({lexicon, script} = {}){ this.lexicon = lexicon; this.script = script; } get code(){ return ``; } }
import selector from '../../../../lib/modules/shows/selectors/getFavoriteShows'; describe('Select show from state ', () => { const state = { shows: { 4: { id: 4 }, 3: { id: 3 }, 2: { id: 2 }, 1: { id: 1 } }, showsMembers: { 2: [ { id: 1, infos: { ...
var http = require("http") , path = require("path") , ecstatic = require("ecstatic") , setInterval = require("timers").setInterval , clearInterval = require("timers").clearInterval , setTimeout = require("timers").setTimeout , EngineServer = require("../../server") , staticHandler = ecstat...
/* * map.js: */ ;(function() { Oskari.setLang('en'); Oskari.setLoaderMode(''); Oskari.setPreloaded(true); var appSetup; var appConfig; var downloadConfig = function(notifyCallback) { jQuery.ajax({ type : 'GET', dataType : 'json', url : '/js/config.json', beforeSend : function(x) { if (x && x.overrideMime...
// ==UserScript== // @name Block From Profile // @namespace pxgamer // @version 0.5 // @description Block users from on their profile // @author pxgamer // @include *kat.cr/user/*/ // @require https://greasyfork.org/scripts/19498-get-blocked-users/code/Get%20Blocked%20Users.js // @grant...
// ==UserScript== // @name OSU Paste 365 // @name:zh-CN OSU Paste 365 // @license MIT License // @version 4 // @namespace dev.renoseven.net/scripts/osu-paste-365 // @homepageURL https://github.com/renoseven/OSU-Paste-365/ // @author RenoSeven // @description Allows cut, copy, paste and drop in OS...
'use strict'; var prettyjson = require('prettyjson'); var screen = { clear: function() { // Clear screen in octal - This is not allowed in strict mode //process.stdout.write('\033c'); // Clear screen in hexa process.stdout.write('\x1Bc'); }, write: function(data, mode) { var output = data; if (mode ...
import isAbsoluteUrl from 'axios/lib/helpers/isAbsoluteURL'; const responseTypes = ['arraybuffer', 'blob', 'formData', 'json', 'text', null]; const getData = (response, responseType) => { if (responseType === null) { return Promise.resolve(null); } return response[responseType](); }; const getResponse = (r...
/* * $Id: rawdeflate.js,v 0.3 2009/03/01 19:05:05 dankogai Exp dankogai $ * * Original: * http://www.onicos.com/staff/iz/amuse/javascript/expert/deflate.txt */ // if run as a web worker, respond to messages by deflating them var deflate = (function() { /* Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp> * V...
import FocusBox from './FocusBox'; import Context from './Context'; export default FocusBox; export { Context };
'use strict'; require('./passport-local.js');
var GJPC = require('./gj-proj-conv.js'); var fs = require('fs'); var gjpc = new GJPC(); var obj = {}; var convObj = {}; var inFilename = ""; var outFilename = ""; if(process.argv[2] && process.argv[3]){ inFilename = process.argv[2]; outFilename = process.argv[3]; fs.readFile(inFilename, 'utf8', function (err,...
if (Lifts.find().count() === 0) { // ensureIndex on the server side Lifts._ensureIndex({ fromLoc: "2dsphere" }); Lifts._ensureIndex({ toLoc: "2dsphere" }); var today = moment(); var tomorrow = moment(today).add('days', 1); var afterTomorrow = moment(today).add('days', 2); var info = 'Lorem dolor sit amet...
module.exports = function(grunt) { grunt.initConfig({ uglify: { options: { compress: {} }, in_view: { files: { 'cajas.min.js': ['cajas.js'] } } }, watch: { uglify: { files: ['cajas.js', 'Gruntfile.js'], tasks: ['uglify'] } }, release: { } }); ...
'use strict' const counselingServices = [ { id: 'familyPlanningCounselingAndServices', name: 'Family Planning Counseling and Services', description: 'Educational, comprehensive medical or social activities which enable individuals, including minors, to determine freely the number and spacing of their childre...
import React from 'react'; import {shallow} from 'enzyme'; import fs from 'fs-extra'; import temp from 'temp'; import CreateDialog, {createRepository, publishRepository} from '../../lib/views/create-dialog'; import CreateDialogContainer from '../../lib/containers/create-dialog-container'; import {dialogRequests} from ...
var express = require('express'); var router = express.Router(); var util = require('../util/'); router.get('/', util.ensureAuthenticated, function(req, res){ res.render('account', { user: req.user, message: null }); }); module.exports = router;
import React from 'react'; import renderer from 'react-test-renderer'; import PolicyCard from 'organisms/cards/PolicyCard'; describe('<PolicyCard />', () => { let defaultProps; beforeEach(() => { defaultProps = { footer: [], carrierLogo: <div></div>, information: { policyType: { ...
var _FlyingObjects = function (scene) { this.Scene = scene; this.FlyingObjects = []; for (var i=0; i<FLYING_OBJECTS.NEAREST_OBJECTS_COUNT; i++) { var el = new THREE.Mesh( new THREE.BoxGeometry(150, 150, 150), new THREE.MeshStandardMaterial({color: 0xffffff*Math.random(), opacity: Math.random()*0.2+0.7, ...
var arr = ["a", "b", "c"]; var iterator = arr.keys(); console.log(iterator.next()); // { value: 0, done: false } console.log(iterator.next()); // { value: 1, done: false } console.log(iterator.next()); // { value: 2, done: false } console.log(iterator.next()); // { value: undefined, done: true }
namespace = ""; // Connect to the Socket.IO server. // The connection URL has the following format: // http[s]://<domain>:<port>[/<namespace>] var socket = io.connect(location.protocol + '//' + document.domain + ':' + location.port + namespace); console.log(socket); // Event handler for new connections. // The call...
import constants from '../constants'; import ApiFetch from '../../../utils/fetch/ApiFetch'; /** * Retrieve wordpress posts by category * * **Dispatch**: `FETCH_WP_POSTS_WITH_CATEGORY` * * @alias module:Blog.doFetchBlogCategoryPosts * @category actions * * @example * BetaSeries.getAction('blog', 'doFetchBlogCa...
var DIAMETER = 5; var DUMPING = 0.8; function Ball(symbol) { // this.p = getEmpty(); this.p = createVector(width / 2, height / 4); this.s = createVector(random(-2, 2), random(-3, 0)); this.a = createVector(0, 0.1); this.d = DIAMETER; if(symbol == DOT) { this.color = color1; }...
import { PropTypes } from 'react'; import momentPropTypes from 'react-moment-proptypes'; import { SingleDatePickerPhrases } from '../defaultPhrases'; import getPhrasePropTypes from '../utils/getPhrasePropTypes'; import OrientationShape from '../shapes/OrientationShape'; import anchorDirectionShape from '../shapes/Anc...
/*==================================== Free To Use For Personal And Commercial Usage Author: http://binarytheme.com Share Us if You Like our work Enjoy Our Codes For Free always. ======================================*/ $(function () { // tooltip demo $('.tooltip-demo').tooltip({ selector: "[data...
const assert = require('assert'); const request = require('supertest'); const TestUtil = require('../utils'); describe('auth/passport-proxy-auth', function () { it('auto sign up creates user w/default role', async function () { const utils = new TestUtil({ authProxyEnabled: true, authProxyAutoSignUp:...
/** * Checks if the User is Authenticated */ module.exports = function(req, res, next) { if (req.isAuthenticated()) { return next(); } else { return res.redirect('/login'); } };
// Transforms a string into camel case. export default function toCamelCase(x){ return x.toString().replace(/(?:^\w|[A-Z]|\b\w)/g, function(letter, index) { return index == 0 ? letter.toLowerCase() : letter.toUpperCase(); }).replace(/\s+/g, "").replace(/[^\w\-]+/g, ""); }
// Regular expression that matches all symbols in the Old Italic block as per Unicode v10.0.0: /\uD800[\uDF00-\uDF2F]/;
function carsListController($scope, $http, $location, baseServiceUrl) { $scope.title = 'Cars list'; $scope.location = $location.url(); var allCarsUrl = baseServiceUrl + 'api/cars'; $scope.allCars = []; $http.get(allCarsUrl).then( function (res) { $scope.allCars = res.data; ...
var searchData= [ ['debug_20unit_20processor',['Debug Unit Processor',['../group__DAP__ConfigMCU__gr.html',1,'']]], ['dap_5fconnect',['DAP_Connect',['../group__DAP__Connect.html',1,'']]], ['dap_5fdefault_5fport',['DAP_DEFAULT_PORT',['../group__DAP__Config__Debug__gr.html#ga89462514881c12c1508395050ce160eb',1,...
var utils = require('./utils.js'); function Stats(game) { this.frames = 0; this.game = game; this.fpsNode = utils.getTextNode("#fps"); this.positionNode = utils.getTextNode("#position"); this.chunkNode = utils.getTextNode("#chunk"); this.lookAtNode = utils.getTextNode("#lookAt"); this.pendingChunksNode =...
/* //------------------------------------------------------------------------------ // <copyright company="LeanKit Inc."> // Copyright (c) LeanKit Inc. All rights reserved. // </copyright> //------------------------------------------------------------------------------ */ App.module("Main", function (Main, App, ...
/* ng-FitText.js v3.3.3 * https://github.com/patrickmarabeas/ng-FitText.js * * Original jQuery project: https://github.com/davatron5000/FitText.js * * Copyright 2015, Patrick Marabeas http://marabeas.io * Released under the MIT license * http://opensource.org/licenses/mit-license.php * * Date: 06/05/2015 */ v...
export function capitalize(str) { return str && str[0].toUpperCase() + str.slice(1); } export function changeLastCharToDot(str) { return `${str.substring(0, str.length - 1)}.` } export function changeLastCommaToAnd(str) { const i = str.lastIndexOf(","); return `${str.substring(0, i)} and${str.substring(i + 1...
import webpack from 'webpack' import cssnano from 'cssnano' import HtmlWebpackPlugin from 'html-webpack-plugin' import ExtractTextPlugin from 'extract-text-webpack-plugin' import config from '../config' import _debug from 'debug' const debug = _debug('app:webpack:config') const paths = config.utils_paths const {__DEV_...
/** * Free Code Camp * * Intermediate Front-End Projects. * * Show The Local Weather solution. * https://www.freecodecamp.com/challenges/show-the-local-weather */ angular.module('WeatherApp', ['ngRoute', 'ngResource']) .config(['$routeProvider', function($routeProvider) { $routeProvider .when('/', { ...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); /** * Store constants use in whole app */ exports.default = { TMP_DIR: '.tmp', OUT_FILE: '.tmp/out.json', PATTERN_JUNIT: 'TEST-*.xml', STATUS: { PASS: 'pass', FAIL: 'fail' }, HEADER: { FORM_ENCODED: 'application/x-...
module.exports = HubService; var BluetoothConnection = require(__dir + "/utils/bluetooth-connection"); function HubService($config, $logger, $event) { var self = this; this.__proto__ = new BluetoothConnection($config, $logger, $event); this.init = function() { self.__proto__.init({ keepA...
import { generateMenu } from 'containers/App/sagas'; // This method is executed before the load of the plugin const bootstrap = (plugin) => new Promise((resolve, reject) => { generateMenu() .then(menu => { plugin.leftMenuSections = menu; resolve(plugin); }) .catch(e => reject(e)); }); export...
/*! * Angular Material Design * https://github.com/angular/material * @license MIT * v1.1.0-rc.5-master-7f01138 */ goog.provide('ng.material.components.menu'); goog.require('ng.material.components.backdrop'); goog.require('ng.material.core'); /** * @ngdoc module * @name material.components.menu */ angular.modu...
const { InputMask } = require("imask"); const { format, parse, parseISO, } = require("date-fns"); const axios = require("axios"); const cloneDeep = require("lodash.clonedeep"); const ExtendedValidation = require("../../../lib/extendedValidation").default; const serializableTypes = ["text", "select", "r...
import * as REGISTER from './action_types'; import query from '../util/query'; export function setUsername(value) { return { type: REGISTER.USERNAME, value }; } export function setPassword(value) { return { type: REGISTER.PASSWORD, value }; } export function setFullNam...
var commandMap = { LL: { verbose: "Left-left", shorthand: "LL", legible: "nmm", proper: "–——" }, LR: { verbose: "Left-right", shorthand: "LR", legible: "mmn", proper: "——–" }, RL: { verbose: "Right-left", shorthand: "RL"...
require=(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o]...
import $wuxActionSheet from 'actionsheet/actionsheet' import $wuxBackdrop from 'backdrop/backdrop' import $wuxDialog from 'dialog/dialog' import $wuxGallery from 'gallery/gallery' import $wuxQrcode from 'qrcode/qrcode' import $wuxToast from 'toast/toast' export { $wuxActionSheet, $wuxBackdrop, $wuxDialog, $wuxG...
var $ui = $ui || {}; /** Create a new select control. Controls can be converted from existing `select` or `ul` elements, or generated by passing an `options` parameter HTML <!-- Generate from an existing element --> <select id='selectFromEl'> <option value='val1'> option 1 </option>...
var respond = module.exports = {}; //未知的POST请求 respond.unknownPost = function (res) { flush(res, 0, 0, '未知请求!', null); }; //用户未登录 respond.notLogin = function (res) { flush(res, 0, 1001, '抱歉,您尚未登录或登录已失效!请登录后重试!', null); }; //用户鉴权失败 respond.authFailed = function (res, message) { flush(res, 0...
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnPrope...
var _ = require('lodash') module.exports = { validate: function (obj, schema) { return ( _.isPlainObject(obj) && _.isNumber(obj.key) && obj.key >= 0 && _.isString(obj.string) && _.isString(obj.display) && _.chain(obj).keys().difference(['key', 'string', 'ctrl', 'alt', 'shift', 'cmd'...
var _ = require("underscore"); var words = ["bla", "muu", "tatta"]; function firstTwoChars(words) { return _.map(words, function(word) { return _.first(word, 2); }); } console.log(firstTwoChars(words));
/* RUN: LOG_LEVEL=off mocha test/18-exchange-promises.js */ var Promise = require('bluebird'); var sep = require('path').sep; var spawn = require('child_process').spawn; module.exports = SeeAbove; function SeeAbove() {} SeeAbove.prototype.method1 = function (opts, callback) { if (opts.errorAs == 'callback') retur...
const Context = require('gl-context') const Shader = require('gl-shader') const glslify = require('glslify') const fit = require('canvas-fit') const Quad = require('../') const canvas = document.body.appendChild(document.createElement('canvas')) const gl = Context(canvas, render) const quad = Quad(gl) const shader = ...
/** * @license AngularJS v1.3.13 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ (function(window, document, undefined) {'use strict'; /** * @description * * This object provides a utility for producing rich Error messages within * Angular. It can be called as follows: * * v...