code
stringlengths
2
1.05M
'use strict'; angular.module('myApp.filmsView', ['ngRoute']) .config(['$routeProvider', function($routeProvider) { $routeProvider.when('/filmsView', { templateUrl: 'filmsView/filmsView.html', controller: 'FilmsViewCtrl' }); }]) .controller('FilmsViewCtrl', [function() { }]);
/** * @param {number[][]} rooms * @return {boolean} */ const canVisitAllRooms = function (rooms) { let visited = new Set(), queue = [0]; while (queue.length > 0) { let nq = []; for (let idx of queue) { visited.add(idx); for (let key of rooms[idx]) { if ...
$('.upload-btn').on('click', function (){ $('#upload-input').click(); $('.progress-bar').text('0%'); $('.progress-bar').width('0%'); }); $('#upload-input').on('change', function(){ var files = $(this).get(0).files; if (files.length > 0){ // create a FormData object which will be sent as the data ...
!function(e){e.module("app",["resources","ui.router","gpyComponents"])}(angular),function(e){var r=e.module("app");r.config(["$resourcesProvider","$stateProvider","$urlRouterProvider",function(e,r,o){r.state("stateX",{url:"/state-x",template:"State X"})}])}(angular),function(e){var r=e.module("app");r.controller("appCo...
import chai from 'chai'; import chaiAsPromised from 'chai-as-promised'; import {jenkinsOnly} from '@webex/test-helper-mocha'; import {createWhistlerTestUser, removeWhistlerTestUser} from '@webex/test-users'; const {assert} = chai; chai.use(chaiAsPromised); assert.hasAccessToken = (user) => { assert.isDefined(user...
'use strict'; (function ($) { $(document).ready(function () { // Setup media query for enabling dynamic layouts only on // larger screen sizes var mq = window.matchMedia("(min-width: 320px)"); if ($(".userrole-anonymous")[0]){ $('input[type="password"]').showPassword('focus', { }); ...
import './Admin.css'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Field, reduxForm } from 'redux-form'; import { Link } from 'react-router-dom'; class AdminForm extends Component { renderField(field) { const { meta: { touched, error } } = field; const className =...
/** * Created by desver_f on 06/02/17. */ import { action, computed, observable } from 'mobx'; import bluebird from 'bluebird'; import autobind from 'autobind-decorator'; import storage from 'react-native-simple-store'; import _ from 'lodash'; import stores from './index'; import * as Intra from '../api/intra'; imp...
import React from 'react' import MediaQuery from 'react-responsive' import Link from 'gatsby-link' export default ({ data }) => { const post = data.markdownRemark return ( <div style={{textAlign: 'justify'}}> <Link to='/' style={{letterSpacing: '.125em', textTransform: 'uppercase', fontSize: '1rem'}} hre...
const util = require('util'); exports.run = async (client,message, args = []) => { const suffix =args.join(' '); try { let evaled = await eval(suffix); const type = typeof evaled; const insp = util.inspect(evaled, {depth: 0}); const toSend= []; if (evaled === null) evaled ='null'; toSend.p...
function Battle() { this.user = new User(); this.pokemon; this.view = new View(); } Battle.prototype.Battle_Checker = function() { var rnd = Math.random(); if (rnd > 0.8) { this.Initiate_Battle_Conditions(); } } Battle.prototype.Initiate_Battle_Conditions = function() { inBattle = true; this.view.ShowBattle...
// From http://github.com/Caged/javascript-bits/tree/master/datetime/format.js Object.extend(Date.prototype, { /** * @param format {String} The string used to format the date. * Example: new Date().strftime("%A %I:%M %p") */ strftime: function(format) { var day = this.getUTCDay(), month = this.getUTCM...
var gulp = require( 'gulp' ), livingcss = require( 'gulp-livingcss' ), sass = require( 'gulp-sass' ), fs = require( 'fs-extra' ), path = require( 'path' ), runSequence = require( 'run-sequence' ), clean = require( 'gulp-dest-clean' ), sublime = require( './lib/gulp-sublime.js' ), intelli...
this.NesDb = this.NesDb || {}; NesDb[ 'F31824D16504B44948DE2CE53FD10C0CFAD3D41C' ] = { "$": { "name": "Big Nose the Caveman", "class": "Unlicensed", "catalog": "CAM-BN", "publisher": "Camerica", "developer": "Codemasters", "region": "USA", "players": "1", "date": "1991" }, "cartridge": [ { "$":...
import ProjectModel from '../model/ProjectModel'; //TODO make sure *all* calls make use of the ObjectModelUtil to ensure proper project objects! //TODO check to see if the response contains the 'error' key/value const ProjectAPI = { save : function (userId, project, callback) { let url = _config.PROJECT_API_BASE +...
class WorkRouting { constructor(twilioClient, accountSid, twilioNumber) { this.twilioClient = twilioClient; this.accountSid = accountSid; this.twilioNumber = twilioNumber; } createTask(workspaceSid, workflowSid, attributes) { return new Promise((resolve, reject) => { ...
import calculatables from '../calculations'; import getItems from '../../helpers/data/get-items'; export default function (transformedData, params) { const calculations = Object.keys(calculatables) .filter(calc => calculatables[calc].check(transformedData)); const items = getItems(transformedData); ...
"use strict"; const React = require("react"); const PropTypes = require("prop-types"); class ProductHeader extends React.Component { render() { return <div>{this.props.children}</div>; } } class Cart extends React.Component { static propTypes = { products: PropTypes.arrayOf( P...
"use strict"; /** * sliceSet.js * @createdOn: 01-Nov-2017 * @author: SmartChartsNXT * @version: 1.0.0 * @description:This is a parent class of slice class which create all the slices. */ import defaultConfig from "./../../settings/config"; import Point from "./../../core/point"; import {Component} from "./../....
var angular = require('angular'); var ngApp = require('ngApp'); var moment = require('moment'); var _ = require('lodash'); ngApp.directive('speciesPropForm', function () { return { restrict: 'C', template: require('raw-loader!./templates/species-property-form.html'), controller: function ($...
define([ 'vehicle-licensing/collections/services' ], function (ServicesCollection) { describe("ServicesCollection", function () { var response = { "data": [ { "volume:sum": 5, "values": [ { "_end_at": "2012-09-01T00:00:00+00:00", "volume:sum": 3, "_start...
import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('site-header', 'Integration | Component | site header', { integration: true }); test('it renders', function(assert) { assert.expect(2); // Set any properties with this.set('myProperty', 'val...
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.16/esri/copyright.txt for details. //>>built define({widgetLabel:"Keres\u00e9s",searchButtonTitle:"Keres\u00e9s",clearButtonTitle:"Keres\u00e9s t\u00f6rl\u00e9se",placeholder:"C\u00edm vagy hely keres\u00e9se...
// https://github.com/dimsemenov/PhotoSwipe //= require photoswipe/v4.0.0/photoswipe.js
import { customerSaveCompleted } from './customerSaveCompleted'; import { customerFormValidation } from '../components/sampleForm/validations/customerFormValidation'; export function customerSaveStart(viewModel) { return (dispatcher) => { customerFormValidation.validateForm(viewModel).then( (formValidatio...
import baseConfig from './base'; const config = Object.assign({}, baseConfig, { peerServer: { host: 'localhost', port: 9000, key: 'doppelchat', path: '/' } }); export default config;
// Search script generated by doxygen // Copyright (C) 2009 by Dimitri van Heesch. // The code in this file is loosly based on main.js, part of Natural Docs, // which is Copyright (C) 2003-2008 Greg Valure // Natural Docs is licensed under the GPL. var indexSectionsWithContent = { 0: "000000000000000000000000000000...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Button } from 'react-bootstrap'; require('../../styles/TwitterAuthentication.scss') class TwitterAuthentication extends Component { render() { var isProduction = process.env.NODE_ENV === 'production'; if (isProduction) ...
// Copyright 2017, University of Colorado Boulder /** * Copies a single file. * * @author Jonathan Olson <jonathan.olson@colorado.edu> */ const fs = require( 'fs' ); const winston = require( 'winston' ); /** * Copies a single file. * @public * * @param {string} sourceFilename * @param {string} destinationFi...
$(document).ready(function () { var chatPublishChannel = 'chat_send', chatSubscribeChannel = 'chat_receive', inputMessage = $('#inputMessage'), inputMessageSubmit = $("#inputMessageSubmit"), messageList = $("#message-list"), onlineUsersList = $("#onlineUsers"), ATCUserName = $("#ATCUserNam...
import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(h("path", { d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm7.48 7.16l-5.01-.43-2-4.71c3.21.19 5.91 2.27 7.01 5.14zm-5.07 6.26L12 13.98l-2.39 1.44.63-2.72-2.11-1.83 2.78-.2...
// Automatically generated by scripts/createStyleInterpolations.js at Tue Jun 20 2017 00:01:09 GMT+0900 (JST) // Imported darkula.css file from highlight.js export default ` /* Deprecated due to a typo in the name and left here for compatibility purpose only. Please use darcula.css instead. */ @import url('darcula...
var app = angular.module('app', ['ngRoute','restangular','tien.clndr']);
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var edit = exports.edit = { "viewBox": "0 0 24 24", "children": [{ "name": "path", "attribs": { "d": "M21.561 5.318l-2.879-2.879c-.293-.293-.677-.439-1.061-.439-.385 0-.768.146-1.061.439l-3.56 3.561h-9c-.552 0-1 .447-1 1v13c0 .553.448 1 1 1...
var db = global.db; module.exports = { secure: function (req, res, next) { var token = req.headers.token || ""; var tokenModel = db('tokens').find({token: token}); if (typeof tokenModel === "undefined") { res.status(500).send({ error: "token_not_found" }); } else { var user...
import { Meteor } from 'meteor/meteor'; Meteor.methods({ /** * Meteor.methods get called by the client and the server simultaneously * when invoked by the client. This allows us to update the client's version * of the database immediately - latency compensation. If for whatever reason, * the server respo...
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.8/esri/copyright.txt for details. //>>built define({transparency:"Transpar\u00eancia",suggested:"Sugerido",recent:"Recente",more:"Mais",moreColorsTooltip:"Visualize mais cores.",paletteTooltip:"Selecione uma ...
import React from 'react' import Modal from 'react-modal' import {connect} from 'react-redux' import {Link} from 'react-router' import RequestPasswordReset from './RequestPasswordReset' import PendingAccountModal from './PendingAccountModal' import validator from 'validator' import {login} from '../../actions/authActio...
'use strict'; module.exports = function(app) { var users = require('../../app/controllers/users.server.controller'); var emails = require('../../app/controllers/emails.server.controller'); // Emails Routes app.route('/api/emails') .get(emails.list) .post(users.requiresLogin, emails.create); app.route('/api/...
var lang = { "lang_code": "en", "lang_name": "English", "title": "Data retention in Switzerland", "town_zuerich": "Zurich", "town_bern": "Bern", "town_basel": "Basel", "town_genf": "Geneva", "town_luzern": "Lucerne", "town_lausanne": "Lausanne", "weekday_short_mon": "Mon", "weekday_short_tue": "Tue", "weekd...
"use strict"; require("./document_test"); require("./selection_test");
/** * builder funciton. return jQuery object for chaining and triggering events * @return {jQuery} */ ChartAPI.Build = function (settings) { var $container; if (typeof settings === 'string' && (/\.json$/).test(settings)) { $container = $('<div class="mtchart-container">'); ChartAPI.Data.getData($.getJSON...
var assign = require('object-assign'); var isFunction = require('lodash/lang/isFunction'); var omit = require('lodash/object/omit'); var actionMixin = { /** * Get the entity identifier for the form loading. * @returns {object} - The identifier of the entity. */ _getId: function formGetId() { if(this.get...
'use strict'; var chai = require('chai'); var should = chai.should(); var Response = require('../lib/response'); var Request = require('../lib/request'); var Method = require('../lib/method'); describe('Response', function() { var responseMock, requestMock; beforeEach(function() { var methodMock = new Metho...
"use strict"; 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 XmlElementNames_1 = require("../../../...
const Koa = require('koa') const request = require('koa-test') const supertest = require('supertest') const agent = app => supertest.agent(app.callback()) const utils = require('utility') const test = require('ava') supertest.Test.prototype.testJson = function (value, status = 200) { if (typeof(value) === 'object') ...
/* Grunt Task configuration */ module.exports = function(grunt) { /* using jit-grunt for automatically loading all required plugins */ require('jit-grunt')(grunt); grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), // Compile Sass to CSS and produce SoureMaps; sass: { options: { ...
{ a: 1, b: 2, }
/*jslint node: true, nomen: true*/ /*global describe, it*/ /** * Developed By Carlo Bernaschina (GitHub - B3rn475) * www.bernaschina.com * * Distributed under the MIT Licence */ "use strict"; var assert = require("assert"), validator = require("../").validator, field = require("../").field; describe('validato...
define(['ko', 'text!app/components/borat-flag/template.html'], function (ko, htmlString) { function BoratFlag(model) { var self = this; }; return { viewModel: BoratFlag, template: htmlString }; });
/* global define */ define([ 'backbone', 'behaviors/pagination-behavior', 'templates/pagination-template' ], function (Backbone) { 'use strict'; var PaginationView = Backbone.Marionette.ItemView.extend({ template: 'pagination-template.dust', tagName: 'div id="paginated"', ui: { pageNumber...
'use strict'; var express = require('express'); var app = express(); var path = require('path'); var cron = require('cron'); var shjs = require('shelljs'); var windData = require('./public/data/wind.json'); app.set('port', process.env.PORT || 8080); app.use(express.static(path.join(__dirname, 'public'))); app.get...
(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...
import React from "react"; import PACKAGE_API from "../../../../constants/packages"; import ActiveLink from "../../../links/ActiveLink"; import Container from "./Container"; import DropdownMenu from "./DropdownMenu"; import usePrefetch from "./usePrefetch"; let GroupPackages = ({ packages }) => ( <ul> {packages...
// @flow /* eslint-env mocha */ import assert from 'power-assert' import plugins from './plugins' import type {Rec} from './plugins' import getAtom from '../getAtom' plugins.forEach(([name, atmover]: Rec) => { describe(`${name} get atom`, () => { it('from constructed', () => { class A {} ...
import Vue from 'vue'; import VueResource from 'vue-resource'; Vue.use(VueResource); var data = { message: null, list: null }; new Vue({ el: "#app", data: data, methods: { addListItem() { this.list.push(this.message); } }, created: function(){ this.$http.get('...
(function(){ var Roles = function() { if ($('#controller-roles').length > 0) { this.init(); } }; Roles.prototype.init = function() { this.bindRemovePermissions(); this.bindAddPermission(); this.bindRemoveRole(); this.bindAddRole(); }; /** * Bind Delete button action */ ...
"use strict"; const should = require("should"); const ClientSecureChannelLayer = require("..").ClientSecureChannelLayer; const ServerSecureChannelLayer = require("..").ServerSecureChannelLayer; const describe = require("node-opcua-leak-detector").describeWithLeakDetector; describe("Testing ClientSecureChannel 1", fu...
import React, { Component } from 'react'; import { StyleSheet, Text, View, Platform, ListView, Image, Dimensions, } from 'react-native'; import styles from '../../../../app/components/Styles/shared'; import layoutStyles from '../../../../app/components/Styles/layout'; import Icons from '../../../../app/components/Icons...
(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...
import { createStore, applyMiddleware } from 'redux' import { persistStore, autoRehydrate } from 'redux-persist' import { AsyncStorage } from 'react-native' import createLogger from 'redux-logger' import rootReducer, { persistentStoreBlacklist } from '../Reducers/' import Config from '../Config/DebugSettings' import sa...
import * as React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><circle cx="9" cy="13" r="1.25" /><path d="M17.5 10c.75 0 1.47-.09 2.17-.24.21.71.33 1.46.33 2.24 0 1.22-.28 2.37-.77 3.4l1.49 1.49C21.53 15.44 22 13.78 22 12c0-5.52-4.48-10-10-10-1.78 0-3...
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // //= require_tree ./jquery //= require_tree ./layout //= require_tree ./templ
import { connect } from 'react-redux'; import { makeSelectFileInfoForUri, makeSelectDownloadingForUri, makeSelectLoadingForUri, makeSelectClaimIsMine, makeSelectClaimForUri, makeSelectClaimWasPurchased, makeSelectStreamingUrlForUri, } from 'lbry-redux'; import { makeSelectCostInfoForUri } from 'lbryinc'; ...
(function () { 'use strict'; angular .module('split', []) .factory('split', split); /* @ngInject */ function split () { return { 0: { rose: 1, white: 3, red: 2 }, 17: { rose: 1, white: 1, red: 4 }, 1...
(function(angular,JSON, undefined) { "use strict"; var login = angular.module("login",[]); login.controller("loginCtrl",["$http", "$scope", function($http,$scope){ $scope.logar = function(){ $http.post(Routing.generate("logar"),{cpf:$scope.cpf,senha:$scope.senha}).success(function(data){ ...
'use strict'; // this file is not automatically re-loaded during watched build because it's // slow to do so. if you make changes, you should re-launch the build process. // globally expose jQuery for other vendor scripts window.jQuery = window.$ = require('../bower_components/jquery/dist/jquery.js'); // include all...
var cli = require('../lib') , nitrogen = require('nitrogen'); var passthrough = function(value) { return function(callback) { return callback(null, value); }; }; // TODO: store away session details and just return those if email/password haven't been changed. var startSession = function(callback) {...
#!/usr/bin/env node var fs = require('fs') var http = require('http') var path = require('path') var ecstatic = require('ecstatic') var util = require('util') var mime = require('mime') var filename = process.argv[2] || '.' var port = process.argv[3] || 12345 var realFilename = path.resolve(process.cwd(), filename) ...
var blessed = require('../') , screen; var auto = true; screen = blessed.screen({ dump: __dirname + '/logs/listbar.log', autoPadding: auto }); var box = blessed.box({ parent: screen, top: 0, right: 0, width: 'shrink', height: 'shrink', content: '...' }); var bar = blessed.listbar({ parent: scree...
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 9h-2V5h2v6zm0 4h-2v-2h2v2z" /></g> , 'Announcement');
/* https://github.com/tlseabra */ function breakInHalf(input){ var top = [], length = input.length; for(var i=0; i < Math.floor(length/2); i++){ top.push(input.shift()); } return [top, input]; }
var utils = require('./utils'); // Get a reference to the global scope. We do this instead of using {global} // in case someone decides to bundle this up and use it in the browser var _global = (function() { return this; }).call(); // // Install the Promise constructor into the global scope, if and only if a // nat...
/** @jsx React.DOM */ var DataBox = React.createClass({ render() { return <div> <textarea className="data" id="data1" onChange={this.onChange} onPaste={this.onPaste} defaultValue={this.props.defaultValue.join('\n')}></textarea> </div>; }, onChange(ev) { var values = _.ch...
function songDecoder(song){ var unWubbed = song.replace(/WUB/g,' ').replace(/\s{2,}/g, ' ').trim(); return unWubbed; }
const argv = require('yargs').argv const webpackConfig = require('./webpack.config') const sauceLabsIdentity = process.env.SAUCE_USERNAME ? {username: process.env.SAUCE_USERNAME, accessKey: process.env.SAUCE_ACCESS_KEY} : require('./saucelabs.identity') const TEST_BUNDLER = './tests/test-bundler.sauce.js' const b...
import assert from 'assert'; import { Recurly } from '../../lib/recurly'; import { initRecurly, apiTest } from './support/helpers'; const sinon = window.sinon; apiTest(function (requestMethod) { describe('Recurly.tax (' + requestMethod + ')', function () { let recurly; const us = { country: 'US', ...
'use strict'; const { execFile } = require('child_process'); module.exports = { friendlyName: 'File size', description: 'Get size of a file in KB', inputs: { filename: { type: 'string', required: true, description: 'Path to the file', }, }, exits: { }, fn: async func...
/* eslint no-var: 0 */ var main = require('./dist/cjs/i18nextXHRBackend.js').default; module.exports = main; module.exports.default = main;
(function (factory) { typeof define === 'function' && define.amd ? define(factory) : factory(); }((function () { 'use strict'; /** * The code was extracted from: * https://github.com/davidchambers/Base64.js */ var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/...
// Convert our unix timestamps to human-readable string using Moment.js library import moment from 'moment' import _ from 'lodash' import GoogleMapsLoader from 'google-maps' import MarkerGenerator from './marker-generator' module.exports = { /*************************************************************** * Creat...
const {User} = require('../models') const jwt = require('jsonwebtoken') const config = require('../config/config') function jwtSingUser(user) { const ONE_WEEK = 60 * 60 * 24* 7; return jwt.sign(user, config.authentication.jwtSecret, { expiresIn: ONE_WEEK }) } module.exports = { async register (req, res) {...
var SOAPFault = BaseClass.extend({ LOG_SOURCE: "soapfault.js: ", /** * Constructor * @param fault XML response body containing the SOAP Fault * @param version SOAP version to determine the initialization of the class */ init: function(fault, version) { this.log = new Logger(this.LOG_SOURCE); ...
angular.module('parrotPollApp') .service('pollService', ['dataFactory', function(dataFactory) { this.getMaxPaginas = function functionName(pollsPorPagina, callBack) { dataFactory.getCountPolls() .then(function(res) { callBack(Math.floor(res.data / pollsPorPag...
const schema = { _id: { type: String, }, createdAt: { type: Date, optional: true, }, userId: { type: String, optional: true, }, scheduledAt: { type: Date, optional: true, }, subject: { type: String, optional: true, }, data: { type: String, optional: true...
import $ from 'jquery'; $(() => { const template = $('#new-prof-template').html(); const select = $('#std_information'); select.prepend(template); });
const path = require('path'); const webpack = require('webpack'); const deepAssign = require('deep-assign'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin'); const excludes = ['/node_modules/', '/elm-stuff/']; const config = ...
import Vue from 'vue' import Vuelidate from 'vuelidate' import { shallowMount } from '@vue/test-utils' import useI18nGlobally from '../../__utils__/i18n' import { ModalAdditionalLedgers } from '@/components/Modal' Vue.use(Vuelidate) const i18n = useI18nGlobally() let wrapper beforeEach(() => { wrapper = shallowMoun...
// Find all bytes in current directory const req = require.context('./', true, /^\.\/.*\/index.js/); // Export each byte req.keys().forEach(modulePath => { // Export name is based on byte directory const moduleName = modulePath.match(/\.\/(.*)\//)[1]; // Export default module module.exports[moduleName] = req(...
const _ = require('underscore'); const DrawCard = require('../../drawcard.js'); class StayYourHand extends DrawCard { setupCardAbilities() { this.wouldInterrupt({ title: 'Cancel a duel', when: { onDuelInitiated: (event, context) => event.context.p...
var gulp = require('gulp'); var imagemin = require('gulp-imagemin'); var imageResize = require('gulp-image-resize'); var rename= require('gulp-rename') var path = require('path'); var mime = require('mime-types') const fs = require('fs'); var lwip = require('pajk-lwip'); function processImg(file) { var filesrc= fi...
'use strict'; const http = require('http'); const https = require('https'); const fs = require('fs'); const debug = require('debug')('grm:init'); const koa = require('koa'); const config = require('./config.json'); const app = koa(); debug('configuring app'); require('./src/server/load')(app); const httpServer = ...
// This library started as an experiment to see how small I could make // a functional router. It has since been optimized (and thus grown). // The redundancy and inelegance here is for the sake of either size // or speed. function Rlite() { var routes = {}, decode = decodeURIComponent; function noop(s) { re...
const anymatch = require('anymatch') const {createVariableRule} = require('./lib/variable-rules') const spacerVarPatterns = ['$spacer-*', '$em-spacer-*'] const values = [...spacerVarPatterns, '0', 'auto', 'inherit'] module.exports = createVariableRule( 'primer/spacing', ({variables}) => { const spacerVars = O...
'use strict'; var fs = require('fs'); var jsStringEscape = require('js-string-escape'); var uglifyJs = require("uglify-js"); var PACKAGE_FILE = './distribution/es6pack.js'; var minified = uglifyJs.minify('./source/es6pack.js'); console.info(Buffer.byteLength(minified.code, 'utf8') + ' bytes'); var distributionString...
var HashTable = function(limit) { this._storage = []; this._storageLimit = limit || 128; this.insert = function(key, value) { var index = getIndexBelowMaxForKey(key, this._storageLimit); var bucket = this._storage[index]; var found = false; if (!bucket) { bucket = []; } bucket.for...
import React from 'react' import Document, { Head, Main, NextScript } from 'next/document' import { ServerStyleSheet, injectGlobal } from 'styled-components' injectGlobal` html { box-sizing: border-box; background-color: #141518; } *, *:before, *:after { box-sizing: inherit; } body { font-fam...
var pacbot = require('../../lib/pacbot'); var fss = require('../../lib/fss'); exports.setUp = function (callback) { pacbot.config({ appdir: 'spec/cases/tmpl', pubdir: 'spec/out/tmpl', packed: 'assets', config: 'spec/cases/tmpl/config.js' }); callback(); }; var js = function...
/* */ (function(process) { module.exports = DirReader; var fs = require('graceful-fs'); var inherits = require('inherits'); var path = require('path'); var Reader = require('./reader'); var assert = require('assert').ok; inherits(DirReader, Reader); function DirReader(props) { var self = this; ...
(function (FunnyRain) { "use strict"; function BlocksFactory (game) { var _game = game; var _isEnabled; var _blockClassList = [ { blockCategory: "fruit", blockClass: FunnyRain.Plugins.Blocks.FruitBlock, blockTypes: ["apple","peach","orange"] }, { blockC...