code
stringlengths
2
1.05M
describe('index', function() { var noSupError = new Error('Method not supported on this element') it('should throw an error if applied on html element', function() { var func = function() { return $_(document.documentElement).index() } expect(func).toThrow(noSupError) }) it('should throw an error if ...
exports.render = function(req, res){ if (req.session.lastVisit) { console.log(req.session.lastVisit); } req.session.lastVisit = new Date(); res.render('index', { title: 'Hello World' }); };
import { compile } from '../../../packages/weex-template-compiler' describe('compile class', () => { it('should be compiled', () => { const { render, staticRenderFns, errors } = compile(`<div class="a b c"></div>`) expect(render).not.toBeUndefined() expect(staticRenderFns).not.toBeUndefined() expect(...
/* ---------------------------------------------------- +/ ## Item ## Code related to the item template /+ ---------------------------------------------------- */ Template.item.created = function () { // }; Template.item.helpers({ myHelper: function () { // } }); Template.item.rendered = function ()...
'use strict'; var URL = 'https://raw.githubusercontent.com/minimaxir/big-list-of-naughty-strings/master/blns.json' var got = require('got'); module.exports = function (cb) { if (typeof cb !== 'function') throw new Error("Missing callback"); got(URL,cb) };
import $$observable from 'symbol-observable' import {createRule} from 'jss' const isObservable = (value) => value && value[$$observable] && value === value[$$observable]() const observablePlugin = (updateOptions) => ({ onCreateRule(name, decl, options) { if (!isObservable(decl)) return null const style$ = ...
function circleArea([radius]) { radius = Number(radius); let area = Math.PI * Math.pow(radius, 2); console.log(area); console.log(area.toFixed(2)); }
$( document ).ready(function() { $('[data-type="multipleselect"]').multipleselect( { app:"field", template:"/multipleselect.available" }); });
/*! * Bootstrap-select v1.13.12 (https://developer.snapappointments.com/bootstrap-select) * * Copyright 2012-2019 SnapAppointments, LLC * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) */ (function (root, factory) { if (root === undefined && window !== unde...
export class UrlUtils { static _reduceParamsToObject(accumulator, currVal) { const [key, value] = currVal.split('='); accumulator[key] = decodeURI(value); return accumulator; } /** * Parse a Query string into an object * * @param {String} query The query to parse * @return {Object} ...
/* global hexo */ 'use strict'; hexo.config.tag_generator = Object.assign({ per_page: hexo.config.per_page == null ? 10 : hexo.config.per_page }, hexo.config.tag_generator); hexo.extend.generator.register('tag', require('./lib/generator'));
// Promise based graceful fs const fs = require('fs') const path = require('path') const defaultOptions = { encoding: 'utf8' } const mkdirRecursively = require('mkdirp') const mkdirp = (path) => { return new Promise((resolve, reject) => { mkdirRecursively(path, (err) => { if (err) return reject(err) ...
/** * Copyright (c) 2013 Petka Antonov * * 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, merg...
/*eslint-disable no-console */ // This file hooks up on require calls to transpile TypeScript. const cli = require('../../ember-cli/lib/cli'); const UI = require('../../ember-cli/lib/ui'); const Watcher = require('../../ember-cli/lib/models/watcher'); const path = require('path'); Error.stackTraceLimit = Infinity; m...
'use strict'; describe('Navigation', function() { var Navigation; beforeEach(module('musicPlayer:navigation')); beforeEach(inject(function(_Navigation_) { Navigation = _Navigation_; })); describe('#setView(), #getView()', function() { it('Should work as expected', function() { Navigation.set...
import React from 'react' import FilterLink from '../containers/FilterLink' const Footer = () => ( <p> Show: {' '} <FilterLink filter="SHOW_ALL"> All </FilterLink> {', '} <FilterLink filter="SHOW_ACTIVE"> Active </FilterLink> {', '} <FilterLink filter="SHOW_COMPLETED">...
import { createTest } from 'tests/test-utils' import { zeroPad } from '../formatting' const test = createTest('Utils: Formatting ') test('zeroPad when (1, 2) is passed', t => { const result = zeroPad(1, 2) t.equal(result, '01', 'should output "01"') t.end() }) test('zeroPad when (22, 2) is passed', t => { c...
/** * The listener module is responsible for mapping event handlers to a set of criteria (filters). When the named * event is emitted we then look and see if there are filters that are listening for the event. If there are * then we call the event handler. */ module.exports = (function() { 'use strict'; va...
import React from 'react'; import { storiesOf } from '@storybook/react'; import VideoWithRichPoster from './VideoWithRichPoster'; storiesOf('VideoWithRichPoster', module) .add('Default', () => ( <VideoWithRichPoster posterSrc={ [ <source src="https://s3-eu-west-1.amazonaws.com/appearhere/...
var struct_pub = [ [ "kvec_t", "struct_pub.html#aad5db36807a2c6224bb883b28027e430", null ], [ "name", "struct_pub.html#aa876c521637ea138b7c1e20eabe571cd", null ] ];
import React, { Component } from 'react'; import { render } from 'react-dom'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { getScatterPlot } from '../actions/ScatterPlotActions'; import { getD3ParserObj } from '../actions/D3ParserActions'; import { toTemplate, toUserCode } ...
define([ "../core", "../event" ], function (jQuery) { jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup error contextmenu").split(" "),...
var SauceService = require('./build/sauce-service') module.exports = new SauceService()
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See http://js.arcgis.com/3.17/esri/copyright.txt for details. //>>built require({cache:{"url:esri/dijit/metadata/types/iso/gmd/distribution/templates/Distribution.html":'\x3cdiv data-dojo-attach-point\x3d"containerNode"\x3e\r\n\r\n \x3...
/** * @author Swagatam Mitra */ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ /*global define, document, console, brackets, $, Mustache */ define(function (require, exports, module) { "use strict"; var AppInit = brackets.getModule("utils/AppInit"); ...
"use strict"; var index_1 = require('./index'); exports.DashboardRoutes = [ { path: '', pathMatch: 'full', redirectTo: 'dashboard' }, { path: 'dashboard', component: index_1.DashboardComponent } ]; //# sourceMappingURL=dashboard.routes.js.map
angular .module("DevTodoApp", ["LocalStorageModule"]) .service("DevTodoService", function(localStorageService) { this.key = "DevConTodo-service"; this.list =[]; if (localStorageService.get(this.key)) { this.list = localStorageService.get(this.key); } else{ this.list = []; }; this.add = function (...
import Gamepads from './lib/gamepads.js'; export default Gamepads;
import React, {createContext} from 'react'; import { createScrollPositionLifecycleProvider, createScrollPositionLifecycleHook, } from './useScrollPositionLifecycle'; import {api} from './api'; const ContentElementLifecycleContext = createContext(); const LifecycleProvider = createScrollPositionLifecycleProvider...
lychee.define('studio.ui.entity.input.Font').includes([ 'lychee.ui.entity.Input' ]).exports((lychee, global, attachments) => { const _Input = lychee.import('lychee.ui.entity.Input'); /* * IMPLEMENTATION */ const Composite = function(data) { let states = Object.assign({}, data); _Input.call(this, st...
export default /* glsl */` #ifdef USE_UV varying vec2 vUv; #endif `;
import React, { PropTypes } from 'react'; import { FormattedMessage } from 'react-intl'; // Import Style import styles from './TodoListItem.css'; function TodoListItem(props) { return ( <li className={styles.li_style}> <div className={props.todo.completed ? styles.done_true : ''}> <button classNam...
// grid operations module = module.exports = (function () { var _ = {}; _.from_string = function (s) { var list = s.split('\n'); var lines = []; for (var i=0;i< list.length;i++) { lines[i] = list[i].split(''); } return lines; }; _.to_string = function (g) { var list = []; for (var i=0;i<g.leng...
/* Input Mask plugin extensions http://github.com/RobinHerbots/jquery.inputmask Copyright (c) 2010 - 2014 Robin Herbots Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) Version: 0.0.0 Regex extensions on the jquery.inputmask base Allows for using regular expressions as a mask */ (fun...
module.exports={"title":"CakePHP","hex":"D33C43","source":"https://cakephp.org/logos","svg":"<svg role=\"img\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><title>CakePHP icon</title><path d=\"M0 13.875v3.745c0 2.067 5.37 3.743 12 3.743V17.62c-6.63 0-12-1.68-12-3.743v-.002zm21.384 2.333L12 13.875v3.745l9....
var DiscordBot = require("./lib/discord-bot"); var logger = require("winston"); var fs = require("fs"); var now = new Date(); var t = now.toISOString().replace(/[:.]/gi, '-'); var fname = './log/' + t + '.log'; try { fs.mkdirSync('./log'); } catch(e) { } logger.remove(logger.transports.Console); logger.add(logg...
UrlHashHandler = function() { this.observers = new Hash(); this.normalize = function(h) { } this.denormalize = function(h) { } this.deferred_sets = []; this.deferred_replace = false; this.current_hash = this.parse(this.get_raw_hash()); this.normalize(this.current_hash); /* The last value received by t...
(function() { 'use strict'; angular .module('<%= scriptAppName %>') .controller('<%= classedName %>Ctrl', <%= classedName %>Ctrl); function <%= classedName %>Ctrl($scope, $log) { } })();
(function(dust) { dust.compile = function(source, name) { try { var ast = filterAST(dust.parse(source)); return compile(ast, name); } catch(err) { if(!err.line || !err.column) throw err; throw new SyntaxError(err.message + " At line : " + err.line + ", column : " + err.column); } }; func...
'use strict'; /* jshint -W030 */ /* jshint -W110 */ var chai = require('chai') , Sequelize = require('../../../../index') , expect = chai.expect , Promise = require(__dirname + '/../../../../lib/promise') , Support = require(__dirname + '/../../support'); describe(Support.getTestDialectTeaser('Model'), functi...
//////////////////// //Social Stream Presence: Parser module //////////////////// PRESENCE.PARSER = (function(P,$,undefined){ //////////////////// //Hash table //////////////////// var chatIcons = new Array(); chatIcons[':)'] = "face-smile.png"; chatIcons[':('] = "face-sad.png"; chatIcons['(B)'] = "beer.png"; ...
import { Resource } from 'kolibri.lib.apiResource'; /** * @example Delete a channel * ChannelResource.deleteModel({ id: channel_id }) * * @example Only get the channels that are "available" (i.e. with resources on device) * ChannelResource.fetchCollection({ getParams: { available: true } }) */ export default new...
/* $Id: calendar-date-core.js 6805 2007-03-30 12:36:39Z slip $ */ /** * * Copyright (c) 2004-2006 by Zapatec, Inc. * http://www.zapatec.com * 1700 MLK Way, Berkeley, California, * 94709, U.S.A. * All rights reserved. */ // BEGIN: DATE OBJECT PATCHES /** \defgroup DateExtras Augmenting the Date object with some...
/** * @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 JobsList = React.createClass({displayName: "JobsList", render: function() { return ( React.createElement(JobItem, {title: "Trabalho Python", desc: "Descricao aqui"}) ); } }); var JobItem = React.createClass({displayName: "JobItem", render: function() { React.createEl...
run_spec(__dirname, ["typescript"], { printWidth: 120 });
var version = '1.1.2', licenses = 'MIT Licenses', rDefine = /define\(.+\r\n/, date = new Date(), timeStamp = date.getFullYear() + '-' + ( date.getMonth() + 1 ) + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinut...
'use strict'; var MenuItemContentDirective = function (eehNavigation) { return { restrict: 'A', scope: { menuItem: '=eehNavigationMenuItemContent' }, templateUrl: 'template/eeh-navigation/menu-item-content/eeh-navigation-menu-item-content.html', link: function (s...
import sortPseudoClasses from '../../modules/utils/sortPseudoClasses' describe('Sorting pseudo classes according LVHA', () => { it('should return -1', () => { expect(sortPseudoClasses(':link', ':active')).to.eql(-1) }) it('should return 1', () => { expect(sortPseudoClasses(':active', ':link')).to.eql(1)...
angular.module('merchello').controller('Merchello.Backoffice.TaxationProvidersController', ['$scope', '$timeout', 'settingsResource', 'notificationsService', 'dialogService', 'taxationGatewayProviderResource', 'dialogDataFactory', 'merchelloTabsFactory', 'settingDisplayBuilder', 'countryDisplayBuilder', 'ta...
function QUIC_UNCOMPRESS_RGBA(encoder, channels, bpc, type) { quic_uncompress_row0(encoder, channels, bpc, type); quic_four_uncompress_row0(encoder, encoder.channels[3], bpc, type); encoder.row_completed(); var height = encoder.height; var rgb_state = encoder.rgb_state; for (var row = 1; row < height; row++) { ...
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////// SIGNUP FORM VALIDATION ////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// function signupF...
var path = require('path'); // A grunt task that strips multiline comments module.exports = function (grunt) { grunt.registerMultiTask('strip', 'Remove multiline comments from files', function () { var _ = grunt.utils._; var options = grunt.config.process(['strip', this.target]); var defaults = _.extend({ ex...
/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ '...
'use strict'; describe('scenarioEditor.version module', function() { beforeEach(module('scenarioEditor.version')); describe('version service', function() { it('should return current version', inject(function(version) { expect(version).toEqual('0.1'); })); }); });
define(['annotate', 'is-js', './randint'], function(annotate, is, randint) { function choose(m) { return m[randint(0, m.length - 1)]; } return annotate('choose', 'Chooses an item randomly.') .on(is.array, choose); });
var levelup = require('levelup'); var path = require('path'); function LevelDBClient(options, logger) { if (!options) { options = {}; } var dbPath = options.path || DEFAULT_LV_DB_PATH; var self = this; self.db = levelup(dbPath); self.logger = logger; self.errFunc = function onError ...
var searchData= [ ['sct_5fsegmentation_5fpropagation',['sct_segmentation_propagation',['../index.html',1,'']]], ['scregion',['SCRegion',['../class_s_c_region.html',1,'']]], ['sctemplate',['SCTemplate',['../class_s_c_template.html',1,'']]], ['self',['Self',['../classitk_1_1_hough_transform2_d_circles_image_filte...
define(function(require, exports, module) { 'use strict'; var flight = require('flight'); var $ = require('jquery'); var _ = require('lodash'); var timedWithObject = require('timed_with_object'); var L = require('leaflet'); module.exports = flight.component(function facet() { this.configure = functio...
var _ = require('../util') var Directive = require('../directive') var compile = require('../compiler/compile') var transclude = require('../compiler/transclude') /** * Transclude, compile and link element. * * If a pre-compiled linker is available, that means the * passed in element will be pre-transcluded and co...
'use strict'; const co = require('co'); const expect = require('chai').expect; const DefaultPackager = require('../../../../lib/broccoli/default-packager'); const broccoliTestHelper = require('broccoli-test-helper'); const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTe...
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ import type {Fiber} from './ReactFiber'; import type {SuspenseInstance} from './ReactFiberHostConfig'; import type {Ex...
describeAscoltatore("MQTT", function() { afterEach(function(done) { this.instance.close(function() { done(); }); delete this.instance; }); it("should sync two instances", function(done) { var other = new ascoltatori.MQTTAscoltatore(MQTTSettings()); var that = this; async.series([ ...
var convert = require('./convert'); module.exports = convert('forEach', require('../forEach'));
import React from 'react'; const component = ({Table, Pagination, Filter, SettingsWrapper, Style, className, style}) => ( <div className={className} style={style}> {Style && <Style />} <Filter /> <SettingsWrapper /> <Table /> <Pagination /> </div> ) export default component;
(function(factory){ if(typeof define != "undefined"){ define([], factory); }else if(typeof module != "undefined"){ module.exports = factory(); }else{ dclAdvicesTime = factory(); } })(function(){ "use strict"; var uniq = 0; return function(name){ var inCall = 0, label = name || ("Timer #" + uniq++); ret...
var isJSON = require('koa-is-json'); var Stringify = require('streaming-json-stringify'); var hasOwnProperty = Object.hasOwnProperty /** * Pretty JSON response middleware. * * - `pretty` default to pretty response [true] * - `param` optional query-string param for pretty responses [none] * * @param {Object} ...
/*! * Bootstrap-select v1.7.2 (http://silviomoreto.github.io/bootstrap-select) * * Copyright 2013-2015 bootstrap-select * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE) */ (function (root, factory) { if (typeof define === 'function' && define.amd) { // AMD...
/* Get Programming with JavaScript * Listing 9.12 * A Player constructor function */ // The spacer namespace var spacer = { blank: function () { return ""; }, newLine: function () { return "\n"; }, line: function (length, character) { var longString = "****************...
// Load .env for development environments require('dotenv').load(); // Initialise New Relic if an app name and license key exists if (process.env.NEW_RELIC_APP_NAME && process.env.NEW_RELIC_LICENSE_KEY) { require('newrelic'); } /** * Application Initialisation */ var keystone = require('keystone'), pkg = require...
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 Lint = require("../../../node_modules/tslint/lib/lint"); v...
const should = require('should'); const sinon = require('sinon'); const models = require('../../../core/server/models'); describe('Unit: models/session', function () { before(function () { models.init(); }); afterEach(function () { sinon.restore(); }); describe('parse', function (...
function makeCard(id) { // If id is invalid (out of range, etc) if (!makeCard.isValidID(id)) // abort if id is invalid return null; // Otherwise build an instance object with an id property, // representing one card, and attach to it four methods: // rank() // suit() // color()...
var margin = {top: 30, right: 50, bottom: 30, left: 50}, width = screen.width/2- margin.left - margin.right, height = screen.height/2 - margin.top - margin.bottom; // Parse the date / time var parseDate = d3.time.format("%d-%b-%y").parse; // Set the ranges var x = d3.time.scale().range([0, width]); var y = d3...
//the bar chart normal // set the dimensions function barChart() { var margin = {top: 20, right: 20, bottom: 90, left: 40}, width = 600 - margin.left - margin.right, height = 400 - margin.top - margin.bottom; // set the ranges var x = d3.scale.ordinal().rangeRoundBands([0, width], .05); ...
/** * Widget Directive */ angular .module('RDash') .directive('rdWidget', rdWidget); function rdWidget() { var directive = { transclude: true, template: '<div class="widget" ng-transclude></div>', restrict: 'EA' }; return directive; function link(scope, element, attr...
var gulp = require('gulp'), browsersync = require('browser-sync'), imagemin = require('gulp-imagemin'), pngquant = require('imagemin-pngquant'), config = require('../config'); config.imagemin.use = [pngquant()]; /* * Сжатие картинок */ gulp.task('images', config.wrapPipe(function(...
'use strict'; /* App Module */ angular.module('fotoramaApp', ['ngResource', 'oi.list', 'oi.file', 'ap.fotorama', 'ui.sortable', 'ui.filters']) .factory('Files', function ($resource) { return $resource('action.php/files/:fileId', {fileId:'@id'}, { add: {method: 'PUT'} }) }) .c...
import { RemoteChannelResource, TaskResource } from 'kolibri.resources'; import coreStore from 'kolibri.coreVue.vuex.store'; import { ErrorTypes } from '../../constants'; import { waitForTaskToComplete } from '../manageContent/utils'; import { getChannelWithContentSizes } from './apiChannelMetadata'; /** * Makes requ...
var EventEmitter = require('events').EventEmitter; var util = require('util'); function Doc(connection, handle) { this.connection = connection; this.handle = handle; EventEmitter.call(this); }; util.inherits(Doc, EventEmitter); Doc.prototype.commitDraft = function(Id) { return this.connection.ask(this...
StandaloneDashboard(function (db) { db.setDashboardTitle('Chart Types Supported in Razorflow'); var c1 = new ChartComponent(); c1.setDimensions(6,4); c1.setCaption('Top 10 Genres by sales'); c1.setLabels(['Rock', 'Latin', 'Metal', 'Alternative & Punk', 'TV Shows', 'Jazz', 'Blues', 'Drama', 'R&B/Sou...
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @generated SignedSource<<9f2fcea7be14b0466eb7e1574f509d30>> * @flow * @lightSyntaxTransform * @nogrep */ /* eslint-disabl...
/** * @author mrdoob / http://mrdoob.com/ */ import * as THREE from '../../build/three.module.js'; import { UIPanel, UIRow, UIInput, UICheckbox, UIText, UIListbox, UISpan, UIButton, UISelect, UINumber } from './libs/ui.js'; import { UIBoolean } from './libs/ui.three.js'; import { SetMaterialCommand } from './comma...
#!/usr/bin/env node /* jshint node: true */ 'use strict'; var io = require('node-avro-io'), avsc = require('../../../../lib'); var loops = 2; var records = []; var writer; avsc.createFileDecoder(process.argv[2]) .on('metadata', function (type) { var schema = new io.Schema.Schema(JSON.parse(type.toString...
var wpv_open_shortcode_dialog = jQuery( '.js-wpv-fields-and-views-in-adminbar' ), wpv_add_shortcode_to, wpv_add_shortcode_to_parent; (function( $ ) { $( 'document' ).ready( function() { $.each( toolset_for_any_input, function( key, input ) { $( 'body' ).on( 'focus', input.stringSelector...
import './b';
import fc from 'd3fc'; export default function(discontinuityProvider, viewDomainDateExtent, dataDateExtent, ratio) { if (arguments.length < 4) { ratio = 1; } // Ensure the earlier data is first in the array var sortedViewDomainExtent = fc.util.extent().fields([fc.util.fn.identity])(viewDomainD...
'use strict'; var NG_ANIMATE_ATTR_NAME = 'data-ng-animate'; var NG_ANIMATE_PIN_DATA = '$ngAnimatePin'; var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) { var PRE_DIGEST_STATE = 1; var RUNNING_STATE = 2; var ONE_SPACE = ' '; var rules = this.rules = { skip: [], cancel: [], ...
'use strict'; var React = require('react'); var PureRenderMixin = require('react-addons-pure-render-mixin'); var SvgIcon = require('../../svg-icon'); var EditorFormatTextdirectionRToL = React.createClass({ displayName: 'EditorFormatTextdirectionRToL', mixins: [PureRenderMixin], render: function render() { ...
(function () { "use strict"; var arraySlice = Array.prototype.slice; function argsToArray(args, slice) { slice = slice || 0; return arraySlice.call(args, slice); } function defineArray(extended, is) { var isString = is.isString, isArray = Array.isArray || is.i...
/** * @fileoverview Tests for no-unused-vars rule. * @author Ilya Volodin */ "use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ var rule = require("../../../lib/rules/no-unu...
// Copyright 2013 Web Notes Technologies Pvt Ltd // License: MIT. See license.txt wn.provide("wn.report_dump"); $.extend(wn.report_dump, { data: {}, last_modified: {}, with_data: function(doctypes, callback, progress_bar) { var pre_loaded = keys(wn.report_dump.last_modified); wn.call({ method: "webnotes.wid...
// this is just a harness that pipes to stdout. // It's the default one. module.exports = BrowserHarness var BrowserHarness = global.TAP_Browser_Harness , inherits = require("inherits") , Results = require("./tap-results") , Harness = require("./tap-harness") , Test = require("./tap-test") inherits(BrowserHar...
export default function getBaseUrl() { return getQueryStringParameterByName('useMockApi') ? 'http://localhost:3001/' : 'https://mysterious-dawn-16770.herokuapp.com/'; } function getQueryStringParameterByName(name, url) { if (!url) url = window.location.href; name = name.replace(/[\[\]]/g, "\\$&"); var regex = ...
// // How to parse parameters from URL string // Reference: http://stackoverflow.com/questions/11582512/how-to-get-url-parameters-with-javascript/11582513#11582513 // Usage: // var myvar = getURLParameter('myvar'); // // function getURLParameter(name) { // return decodeURIComponent((new RegExp('[?|&]' + name + '=...
var define, requireModule, require, requirejs; (function() { var registry = {}, seen = {}; define = function(name, deps, callback) { registry[name] = { deps: deps, callback: callback }; }; requirejs = require = requireModule = function(name) { if (seen.hasOwnProperty(name)) { return seen[name]; } ...
'use strict'; module.exports = require('./lib/hashsalt.js');
Modernizr.load({ test: Modernizr.input.placeholder, nope: [ OC.filePath('contacts', 'css', 'placeholder_polyfill.min.css'), OC.filePath('contacts', 'js', 'placeholder_polyfill.jquery.min.combo.js') ] }); (function($) { $.QueryString = (function(a) { if (a === '') {return {};} var b = {}; for (var i = ...
describe('lib/rules/validate-jsdoc/require-description-complete-sentence', function () { var checker = global.checker({ additionalRules: ['lib/rules/validate-jsdoc.js'] }); describe('not configured', function() { it('should report with undefined', function() { global.expect(fun...
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------...