code
stringlengths
2
1.05M
var getRequest = function(val) { console.log(val); var phrase = val, key = '3ed40dc640c04223adba52fddb235425', capitolWordsAPI = 'http://capitolwords.org/api/1/dates.json', startDate = '1995', granularity = 'year'; phrase = phrase.replace(/\s/, '+'); var requestURI = capitolWordsAPI + '?phrase=' + phra...
function rangestart_loop_object_firstSubRule (start) { // Common properties this.idx = -1 this.length = 1 this.next = lastSubRule // Specific properties this.start = start } rangestart_loop_object_firstSubRule.prototype.test = function (buf, offset) { var isString = typeof buf === 'string' var start = this.sta...
"use strict"; const _ = require ('underscore'), http = require ('http'), util = require ('./base/util'), ass = require ('./base/assertion_syntax'), fs = require ('./base/fs'), url = require ('url'), path = require ('path'), ...
var quad = require('./') var test = require('tape') var bufferEqual = require('buffer-equals') test('creates the indices for a quad mesh (two triangles)', function(t) { t.deepEqual(quad({ type: 'array' }), [0, 1, 2, 0, 2, 3], 'clockwise array') t.deepEqual(quad({ clockwise: false, type: 'array' }), [0, 1, 2, 2...
import { API_EVENTS_URL } from '../constants'; export const getEvents = async () => { try { const response = await fetch(API_EVENTS_URL, { method: 'GET', mode: 'cors', }); const data = await response.json(); return data.results; } catch { return null; } };
/** * The MIT License (MIT) * * Copyright (c) 2016 Ricardo Pallas * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to...
'use strict'; if (typeof Promise === 'undefined') { // Rejection tracking prevents a common issue where React gets into an // inconsistent state due to an error, but it gets swallowed by a Promise, // and the user has no idea what causes React's erratic future behavior. require('promise/lib/rejection-tracking'...
var x$; x$ = angular.module('loadingio', []); x$.directive('ldbar', ['$compile', '$timeout'].concat(function($compile, $timeout){ return { restrict: 'A', scope: { model: '=ngModel', config: '=config' }, link: function(s, e, a, c){ var bar; if (e[0]) { bar = !e[0].ldBar ...
'use strict' const WSlibp2p = require('libp2p-websockets') const multiaddr = require('multiaddr') const pull = require('pull-stream') const multiplex = require('./src') let listener const boot = (done) => { const ws = new WSlibp2p() const mh = multiaddr('/ip4/127.0.0.1/tcp/9095/ws') listener = ws.createListene...
import assert from 'assert' import float from './support/float.js' import { julian, jupitermoons, planetposition } from '../src/index.js' import data from '../data/index.js' describe('#jupitermoons', function () { describe('positions', function () { it('positions()', function () { const pos = jupitermoons....
;(function(){ // Consider cross browser compatibility var DOMReady = function(a,b,c){b=document,c='addEventListener';b[c]?b[c]('DOMContentLoaded',a):window.attachEvent('onload',a)} // Some mock-jQuery helper methods, whoo! var querySelectorAll = function(selector){ var elements = document.querySelectorAll(sel...
/** * A series of helpers around the migration database. * * @author bshai date 8/12/15. */ var mysqlHelpers = require('./MysqlHelpers'); var MigrationDatabseHelpers = { MIGRATION_TABLE: 'migration_versions', MIGRATION_TABLE_CREATE: "CREATE TABLE migration_versions ( " + "table_name VARCHAR...
/* * grunt-util * http://gruntjs.com/ * * Copyright (c) 2012 "Cowboy" Ben Alman * Licensed under the MIT license. * https://github.com/gruntjs/grunt-util/blob/master/LICENSE-MIT */ 'use strict'; // What "kind" is a value? // I really need to rework https://github.com/cowboy/javascript-getclass var kindsOf = {}...
$(document).ready(function(){ $('#FirstName').bind("cut copy paste",function(e) { e.preventDefault(); }); }); $(document).ready(function(){ $('#MiddleName').bind("cut copy paste",function(e) { e.preventDefault(); }); }); $(document).ready(function(){ $('#LastNa...
module.exports = { entry: './src/index.js', output: { path: './dist', filename: `bundle.js`, }, resolve: ['', '.js', '.jsx'], module: { loaders: [ { test: /\.js$/, loader: 'babel' }, { test : ...
'use strict'; const _ = require('lodash'); function populateValues (object, map) { if (!map) { map = {}; } return _.mapValues(object, value => { if (typeof value === 'string') { _.forIn(map, function (v, k) { value = value.replace(new RegExp(k, 'g'), v); }); return value; }...
define(["require", "exports", '../../../unitTesting/grid/base', '../column-chooser', '../column-reordering', '../toolbox'], function (require, exports, base_1, column_chooser_1, column_reordering_1, toolbox_1) { "use strict"; describe('Column chooser component', function () { var h; var columns;...
'use strict'; /** * Module dependencies. */ var acl = require('acl'); // Using the memory backend acl = new acl(new acl.memoryBackend()); /** * Invoke Restaurants Permissions */ exports.invokeRolesPolicies = function() { acl.allow([{ roles: ['admin'], allows: [{ resources: '/api/restaurants', permissi...
/** * Created by cecheveria on 2/9/14. */ function Page(page) { this.page = []; this.totalRows = 0; this.totalPages = 0; this.pageNumber = 0; this.pageSize = 0; if (page) { this.page = page.page ? page.page : []; this.totalRows = page.totalRows ? page.totalRows : 0; t...
/* * Copyright (c) 2012 Dmitri Melikyan * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, ...
'use strict' const test = require('ava') let h = require('../lib/helpers') let fakeSpawn = function (closeVal) { return { stderr: { on: function (str, cb) { cb(str) } }, on: function (str, cb) { cb(closeVal) } } } test('#promisify() should return a promise', function (t)...
/* jshint node: true, esversion: 6 */ 'use strict'; const router = require("express").Router(); const Invoice = require("../models/invoice"); const { requireLogin, requireToken } = require("../services/auth"); router.get("/", (req, res) => { res.json({ version: 1 }); }); router.post("/", requireToken, (req, res) =>...
var http = require('http') , https = require('https') , url = require('url') , Serializer = require('./serializer') , Deserializer = require('./deserializer') , Cookies = require('./cookies'); /** * Creates a Client object for making XML-RPC method calls. * * @constructor * @param {Object|String} options - Se...
/* */ var Url = require("url"); var Code = require("code"); var Hawk = require("../lib/index"); var Hoek = require("hoek"); var Lab = require("lab"); var Browser = require("../lib/browser"); var internals = {}; var lab = exports.lab = Lab.script(); var describe = lab.experiment; var it = lab.test; var expect = Code.ex...
function eventCalendar() { var parameter = $('#calendar').attr('data-room-id'); return $('#calendar').fullCalendar({ locale: 'ru', contentHeight: 600, header: { left: 'month,agendaWeek,agendaDay', center: 'title' }, views: { month: { buttonText: 'месяц' }, a...
const { jest: lernaAliases } = require('lerna-alias'); module.exports = { preset: 'ts-jest', moduleNameMapper: lernaAliases(), transform: { // process *.vue files with vue-jest '^.+\\.vue$': require.resolve('vue-jest') } };
/* ----------------------------------------------------------------------------- Copyright (c) 2014-2018 Seth Anderson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, includin...
const defaultErrorToString = require('./errorToString'); const defaultDateToString = require('./dateToString'); const defaultColors = require('./colors'); const defaultConfig = { indent: ' ', prefix: '\n', postfix: '', }; module.exports = function getConfig (config = {}) { return { indent: simpleChoice(co...
const bubble = require('../bubble'); /** * @param {Event} event */ module.exports = function (event) { bubble.bubbling(event.currentTarget); };
/* global document */ import 'babel-polyfill'; import React from 'react'; import ReactDOM from 'react-dom'; import AnnotationEditorWidget from '..'; import SelectionBuilder from '../../../../Common/Misc/SelectionBuilder'; import AnnotationBuilder from '../../../../Common/Misc/AnnotationBuilde...
'use strict'; var path = require('path'); var gulp = require('gulp'); var gulpif = require('gulp-if'); var sourcemaps = require('gulp-sourcemaps'); var autoprefixer = require('gulp-autoprefixer'); var imagemin = require('gulp-imagemin');<% if (jade || nunjucks) { %> var data = require('gulp-data'); var frontMatter = r...
import Table from "./table"; import Column from "./column"; export Table from "./table"; export Column from "./column"; export default {Table, Column};
'use strict' import readCache from '../lib/read-cache' import test from 'blue-tape' import Request from './helpers/req' import debug from 'debug' const log = debug('readCache') test('readCache closure', t => { const closure = readCache({}) t.equals(typeof closure, 'function', 'reading from cache should return a...
/** * The MIT License (MIT) * * Copyright (c) 2015 Sébastien CAPARROS (GlitchyVerse) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitati...
var _ = require('underscore'); var assert = require('chai').assert; var RED = require('./lib/red-stub')(); var AuthorizedBlock = require('../chatbot-authorized'); describe('Chat authorized node', function() { it('should pass to the second output for unauthorized nodes', function () { var msg = RED.createMessage...
'use strict'; //Setting up route angular.module('eventos').config(['$stateProvider', function ($stateProvider) { // Eventos state routing $stateProvider. state('listEventos', { url: '/eventos', templateUrl: 'modules/eventos/views/list-eventos.client.view1...
var BookCalendar = function(options) { this.locale = options.locale ? options.locale : 'en'; this.daysCount = options.daysCount ? options.daysCount : 7; this.el = options.el; this.data = options.data; this.dateGroup = null; this.moveOnExisting = options.moveOnExisting; this.step = options.step ? op...
var Spaceship = function (stage, assetManager) { // variable initialization var sprite = assetManager.getSprite('assets'); var maxVelocity = 1; var velocity = [0, 0]; var position = [stage.canvas.width, 0]; var accelerant = 0.1; var isDestroyed ...
/* Copyright 2014, KISSY v1.49 MIT Licensed build time: May 22 12:31 */ KISSY.add("stylesheet",["dom"],function(m,l){function h(a){a.el&&(a=a.el);a=this.el=j.get(a);this.sheet=a=a.sheet||a.styleSheet;var d={};this.cssRules=d;var b=a&&"cssRules"in a?"cssRules":"rules";this.rulesName=b;var b=a[b],e,c,f,g;for(e=b.length-1...
'use strict'; // Declare app level module which depends on filters, and services angular.module('myApp', [ 'ngRoute', 'myApp.filters', 'myApp.services', 'myApp.directives', 'myApp.controllers' ]). config(['$routeProvider', function($routeProvider) { $routeProvider.when('/view1', {templateUrl: 'partials/pa...
const path = require('path'); module.exports = relationParser; function relationParser(entries, pptx) { let relations = {}; entries.sort().filter(x => { if(x.indexOf('ppt') === 0 && x.indexOf('.rels') > -1) return true; return false; }).forEach(y => { pptx[y].$$.forEach(z => { let key = y .split(pat...
import React from 'react' import ReactTooltip from 'react-tooltip' import isString from 'lodash/isString' import autobind from 'autobind-decorator' import uniqueId from 'lodash/uniqueId' import PropTypes from 'prop-types' export default class Tooltip extends React.Component { static propTypes = { children: Prop...
TestCase("IMSetDebugTest", sinon.testCase({ setUp: function() { }, "test should return false": function() { var bResult = IM.setDebug(false); assertFalse(bResult); }, "test should return true": function() { var bResult = IM.setDebug(true); assertTrue(bResult); }, tearDown: function() { } })); T...
Meteor.publish("images", function () { return Images.find(); }); // Add access points for `GET`, `POST`, `PUT`, `DELETE` HTTP.publish({ collection: Images }, function (data) { // this.userId, this.query, this.params return Images.find({}); });
'use strict'; angular.module('sbAdminApp') .controller('BillingCtrl', function($scope,$position,$http,$stateParams,$rootScope,$httpParamSerializer,$filter,$location,$interval,NgTableParams,growl,WS) { var idSeller = $rootScope.globals.currentUser.idSeller; $scope.contract = ''; $scope.datiTabella= ''...
const tape = require('tape-catch'); tape('Verify home / route', { skip: false }, (describe) => { const hapi = require('@hapi/hapi'); const hapiReactViews = require('hapi-react-views'); const joi = require('@hapi/joi'); const inert = require('@hapi/inert'); const path = require('path'); const querystring = ...
/* This is the module that creates beings, be they alien, player, or crew. */ function Person(name, profession) { // constant variables this.MAXIMUM_WOUNDS = 4; this.MAXIMUM_SPEED = 6; this.MAXIMUM_WEIGHT = 10; this.WEIGHT_PER_STRENGTH = 1; this.MAXIMUM_XP = 20; // local va...
$(document).ready(function() { function setHeight() { windowHeight = $(window).innerHeight(); $('.first-row, .second-row, .third-row, .fourth-row, .fifth-row, .sixth-row, .mirrors-row, .onboard-row, .group-row, .first-row img').css('min-height', windowHeight); }; setHeight(); $(window).resize(...
"use strict"; var Redis = require("ioredis"); let db = 0; if (process.env.NODE_ENV === "development") db = 1; if (process.env.NODE_ENV === "test") db = 2; var client = new Redis({ path: "/tmp/redis.sock", db: db }); var Logger = require("../inc/Logger"); client.on("error", function (err) { Logger.redis...
/** * Test for form.js * @author Rafal Marguzewicz * @license MIT * @return {undefined} * * .toBe() * .toBeCloseTo(expected, precisionopt) * .toEqual() // Equal object * .toBeDefined() - "The 'toBeDefined' matcher compares against `undefined`" * .toBeUndefined() * .toBeFalsy() * .toBeGreaterThan(expected) ...
import React from 'react' import PropTypes from 'prop-types' import Link from 'gatsby-link' import styled from 'emotion/react' import cx from 'classnames' import { sansfont, childLink, breakpoint1 } from '../layouts/emotion-base' const Container = styled.section`` const Bio = styled.div` composes: ${childLink}, ${s...
/* * Module dependencies. */ var PhoneGap = require('../../lib/phonegap'), project = require('../../lib/phonegap/util/project'), cordova = require('cordova'), phonegap, options; /* * Specification: phonegap.local.plugin.list(options, [callback]) */ describe('phonegap.local.plugin.list(options, [c...
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Commandor = f(...
var q = require('q'); var getDeviceAttribute = function(device, attribute, isRegister) { var saveAttribute = function(bundle) { var defered = q.defer(); var onSucc = function(res) { bundle[attribute] = {'result': res}; defered.resolve(bundle); }; var onErr = function(err) { bundle[attribute] = {'res...
'use strict'; describe('Controller: SubformeditorCtrl', function () { // load the controller's module beforeEach(module('umm3601ursamajorApp')); var SubformeditorCtrl, scope; // Initialize the controller and a mock scope beforeEach(inject(function ($controller, $rootScope) { scope = $rootScope.$new();...
// JavaScript Document /* ---------------------------------------------------------------------- */ /* "Polyglot" Language Switcher /* ---------------------------------------------------------------------- Version: 1.4 Author: Ixtendo Author URI: http://www.ixtendo.com License: MIT License License URI: http...
;(function (root, factory, NULL) { var BEHAVIOR_GLOBAL_NAME = 'Platformer'; if (typeof define === 'function' && define.amd) { define(factory); } else if (typeof module === 'object' && module.exports) { module.exports = factory(); } else { var Phaser = root.Phaser; if (Ph...
import { createSelector } from 'reselect'; import * as commons from './commons'; /** * Select similar shows from state * * @alias module:Shows.getSimilarShows * @category selectors * * @example * const mapStateToProps = (state, props) => ({ * show: BetaSeries.getSelector('shows', 'getSimilarShows')(state, { ...
import * as React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M21.98 14H22h-.02zM5.35 13c1.19 0 1.42 1 3.33 1 1.95 0 2.09-1 3.33-1 1.19 0 1.42 1 3.33 1 1.95 0 2.09-1 3.33-1 1.19 0 1.4.98 3.31 1v-2c-1.19 0-1.42-1-3.33-1-1.95 0-2.09 1-3.33 1-1.19 0-1.42-1-3.3...
import React from 'react'; import { Card, CardText, CardBody, CardLink, CardTitle, CardSubtitle } from 'reactstrap'; const Example = (props) => { return ( <div> <Card> <CardBody> <CardTitle tag="h5">Card title</CardTitle> <CardSubtitle tag="h6" className="mb-2 text-muted">Ca...
export Elevation from './Elevation' export default from './Elevation'
/** * @file btoa polyfill * @since 0.2.9 */ /*#ifndef(UMD)*/ "use strict"; /*global _GPF_12_BITS*/ // 12 /*global _GPF_18_BITS*/ // 18 /*global _GPF_1_BYTE*/ // 1 /*global _GPF_2_BYTES*/ // 2 /*global _GPF_6_BITS*/ // 6 /*global _GPF_6_BITS_MASK*/ // 63 /*global _GPF_START*/ // 0 /*global _gpfBase64*/ // Base64 enco...
/** * Module dependencies. */ let Base = require('mocha/lib/reporters/base'); let inherits = require('mocha/lib/utils').inherits; let ms = require('ms'); let color = Base.color; /** * Expose `BaseReporter`. */ exports = module.exports = BaseReporter; /** * Expose all `Base` exports. */ Object.assign(exports, ...
import DS from 'ember-data'; export default DS.Model.extend({ name: DS.attr('string'), urls: DS.attr('string'), contacts: DS.hasMany('contact') });
"use strict"; var log_load_time = function() { var t0 = new Date().getTime(); $(document).ready(function(){ var t1 = new Date().getTime(); var td = t1 - t0; chrome.storage.local.get(null, function(value) { var current_date = (new Date()).toISOString().substr(0, 10); if (current_date in value) { ...
/*jslint browser: true, nomen: true, regexp: true, vars: true, white: true */ /*global define, window, console, describe, it, before, beforeEach, after, afterEach */ /* * Utilities */ define(['underscore'], function(_) { 'use strict'; function Callback(cb, ctx) { this.callback = cb; this.context = ctx...
'use strict'; var $ = require('jquery'); var Backbone = require('backbone'); Backbone.$ = $; var _ = require('underscore'); var FdaService = require('../../service/fdaService'); var DrugRecallInfoView = Backbone.View.extend({ initialize: function(options) { this.isRecalled = options.isRecalled; thi...
/* global process, __dirname */ const path = require('path') const PROD_EXT = '.prod' function fixImportSource ({ node: { source } }, { filename }) { if (shouldIgnoreImport(source)) return let resolvedShort = '' try { const paths = [filename && path.dirname(filename), __dirname, process.cwd()].filter((p) ...
// Inspired by and adapted from // https://github.com/angular/angular.js/blob/master/src/auto/injector.js function Injector(options) { // Class variables var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m; var FN_ARG_SPLIT = /,\s*/; var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/; var STRIP_COMMENTS = /((\/\/...
// flow-typed signature: fec0f703a9e8334c274a5a19c1c5f0a6 // flow-typed version: <<STUB>>/recursive-readdir-sync_v^1.0.6/flow_v0.54.0 /** * This is an autogenerated libdef stub for: * * 'recursive-readdir-sync' * * Fill this stub out by replacing all the `any` types. * * Once filled out, we encourage you to s...
'use strict'; const app = require('express')(); const tape = require('tape'); const PORT_RANGE_START = 9000; // ----------------------------------------------------------------------------- app.get('/alpha.html', (req, res) => { res.type('html'); res.send('<html><body><h1>alpha</h1></body></html>'); }); ap...
'use strict'; describe('Controller: HighwaysCtrl', function () { // load the controller's module beforeEach(module('intelliroadsApp')); var HighwaysCtrl, scope; // Initialize the controller and a mock scope beforeEach(inject(function ($controller, $rootScope) { scope = $rootScope.$new(); Highw...
import { expect } from "chai"; import sinon from "sinon"; import { buildSchema } from "#/helpers/schema.helper.js"; describe("Schema", () => { it("should be a valid GraphQL schema", () => { sinon.stub(console, "warn"); let schema = buildSchema(); if (console.warn.called) { throw new Error(consol...
module.exports = { presets: ['@babel/preset-env'], plugins: [ ['@babel/plugin-transform-runtime', { useESModules: true, }], '@babel/plugin-proposal-object-rest-spread', '@babel/plugin-proposal-class-properties', ], };
'use strict' const path = require('path') const pkg = require('./app/package.json') const settings = require('./config.js') const webpack = require('webpack') const ExtractTextPlugin = require('extract-text-webpack-plugin') const HtmlWebpackPlugin = require('html-webpack-plugin') const CopyWebpackPlugin = require('co...
'use strict'; var path = require('path'); var test = require('ava'); var assert = require('yeoman-assert'); var helpers = require('yeoman-test'); test.before(() => { var pkg = require('../package.json'); var deps = [ [helpers.createDummyGenerator(), 'statisk:gulp'] ]; return helpers.run(path.join(__dirna...
'use strict'; var app = angular.module('Fablab'); app.controller('UserPaymentListController', function ($scope, $filter, $location,$rootScope, ngTableParams, UserPaymentService, NotificationService) { $scope.currency = App.CONFIG.CURRENCY; $scope.showRole = $rootScope.hasAnyRole('PAYMENT_MANAGE'); $...
define(["require", "exports", "@microsoft/load-themed-styles"], function (require, exports, load_themed_styles_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); load_themed_styles_1.loadTheme({ 'themePrimary': 'red' }); }); //# sourceMappingURL=ThemeCode.Example....
const express = require('express') const router = module.exports = express.Router() router.use('/rest', require('./rest')) router.use('/graphql', require('./graphql')) router.get('*', function (req, res) { res.status(404).send({ message: 'resource not found' }) })
// Basic utility functions for srt.js // Kazutaka Kurihara @qurihara // Check for the various File API support. if (window.File && window.FileReader && window.FileList && window.Blob) { //alert('ok'); } else { alert('The File APIs are not fully supported in this browser.'); } var getUrlVars = function(){ var va...
function WidgetModel(theFreeboardModel, widgetPlugins) { function disposeWidgetInstance() { if (!_.isUndefined(self.widgetInstance)) { if (_.isFunction(self.widgetInstance.onDispose)) { self.widgetInstance.onDispose(); } self.widgetInstance = undefined; } } var self = this; this.datasourceRefres...
import Wms from 'ember-flexberry-gis/locales/ru/components/layers-dialogs/settings/wms'; export default Wms;
import React, { Component, PropTypes } from 'react'; import Helmet from 'react-helmet'; import {connect} from 'react-redux'; import { routeActions } from 'react-router-redux'; @connect( null, {pushState: routeActions.push} ) export default class Home extends Component { static propTypes = { pushState: PropT...
// ------------------------------------ // Nodeload configuration // ------------------------------------ // // The functions in this file control the behavior of the nodeload globals, like HTTP_SERVER and // REPORT_MANAGER. They should be called when the library is included: // // var nl = require('./lib/nodeloa...
/** * The UIAButton class allows access to, and control of, button elements in your app. * @constructor * @extends UIAElement */ var UIAButton = function () { }; UIAButton.prototype = UIAElement.prototype;
(function(){ var requireNode = window.require; var WINDOW_WIDTH = 290; var gui = null; var counter = 0; if(requireNode){ gui = requireNode('nw.gui'); } if(!window.LOCAL_NW){ window.LOCAL_NW = {}; } function makeNewNotifyWindow(){ var win = gui.Window.open( 'lib/nw-desktop-notifications.html', { ...
import { Hand as ComponentHand } from 'components/cards'; export const Hand = connect()
var path = require('path'); const entryPath = path.join(__dirname, 'src'), outputPath = path.join(__dirname, 'dist'); const webpack = require('webpack'); module.exports = { devtool: "source-map", entry: { main: './src/index.js' }, output: { path: path.resolve(__dirname, 'dist/js'), filename: '[na...
var colapse = 0; $(document).ready(function(){ var validation; if (typeof(reglas) != "undefined") { validation = { debug: false, errorPlacement: function(error, element) { // Append error within linked label $( element ) .closest( "div" ) .append( error ); ...
$(function() { var mainContainer = 'svg#content'; window.svgEditor = new JSYG.FullEditor(mainContainer); (function initContextMenu() { var contextMenu = svgEditor.createMenu({ items:["copy","cut","remove","duplicate","divider","editPathCtrlPoints"], ty...
module.exports = { findMergeable: function(translations, locales) { var translation, l, lenLocales, keyHash = {}, keyCollision, translationHash, translationCollision, translationSet, keys = {}, mergeable = []; if (!translations || !locales) { return { keys: {}, mergeable: [] ...
module.exports = function(grunt) { grunt.loadNpmTasks('grunt-concat'); function concatFileLists() { var args = Array.prototype.slice.call(arguments); var ret = []; while(args.length) { var list = args.shift(); if (list instanceof Array) { ret = ret.concat(list); } else { ...
define(['jquery', 'app', 'services/User'], function ($, app) { var services = [ { name: 'Facebook' }, { name: 'Github' }, { name: 'Google' } ]; return app.controller('SignInController', ['$scope', '$window', 'userService', 'historyService', 'settingsService', function (scope, win, User, historySe...
/** * @file mongo工具类 * @author r2space@gmail.com * @module light.core.mongo.helper * @version 1.0.0 */ "use strict"; var _ = require("underscore") , pluralize = require("pluralize") , constant = require("../../constant") , ObjectID = require("mongodb").ObjectID ; /** * collection名统一用小写 * 与之前使用的mongoos...
var assert = require('assert'); var EventEmitter = require('events').EventEmitter; var file = '../../lib/eventemitter2'; var EventEmitter2; if (typeof require !== 'undefined') { EventEmitter2 = require(file).EventEmitter2; } else { EventEmitter2 = window.EventEmitter2; } module.exports = { '1. should list...
'use strict'; module.exports = function ($, appConf, moduleConf, args) { return function (mod, modulePath, appPath) { return new Promise(function (resolve, reject) { var autoprefixer = require('autoprefixer'); var vfs = require('vinyl-fs'); var fs = require('fs'); var path = require('path...
var passport = require('passport'); var session = require('express-session'); var localStrategy = require('./localStrategy.js'); var jwtStrategy = require('./jwtStrategy.js') var createSendToken = require('./jwt.js'); module.exports= function(app){ //app.use(session({ secret: 'sshhh!!!', resave: false, saveUninitial...
'use strict'; var config = require('../config.js'); function handleGET (req, res) { // Do something with the GET request console.log('config variable is ->'+JSON.stringify(config)); res.status(200).send('Hello World! ..bar ran successfully - config[]' + config.consumer_key); } function handlePUT (req, res) { ...
window.bs.nc.core.ui.tables.sessions = { init: function() { var oTable = $('[nc-interface-unit="data-table-sessions"]').dataTable({ "bJQueryUI": false, "bAutoWidth": false, "sDom": '<"row" <"col-xs-12"<"tablePars" <"H"fl>>t<"F"i> <"col-xs-12"p>>>', // <'row'<'...
import { assert } from 'chai'; import { stub } from 'sinon'; import parsePullRequestReviewFactory from './parsePullRequestReview'; describe('review parsing', () => { const request = { body: { action: 'submitted', diff_hunk: 'diff hunk', // @TODO Use fixture position: 'd...