code
stringlengths
2
1.05M
/** * Very Important Transform */ function veryImportantTransform(foo = 'bar') { return "42"; }
import mod1999 from './mod1999'; var value=mod1999+1; export default value;
'use strict'; var _ = require('lodash'); var METHODS = require('./methods'); var Engine = (function () { var ENGINE = 'with(this) { #{BLOCK} }'; function Engine(template, data) { if (!_.isArray(data)) { duckType(data); } this.template = template; this.data = data; } function duckType(d...
'use strict'; const getResources = require('../../src/aws/triggers/s3'); describe('S3 trigger getResources', function() { const funcName = 'AppHelloIndex'; context('with a basic trigger config', function() { const trigger = { event: 's3:ObjectCreated:Put', bucket: 'image-uploads' }; it('...
var webpack = require('webpack'); var isProduction = process.env.NODE_ENV === "production"; var babelPlugins = []; var webpackPlugins = [ new webpack.optimize.OccurrenceOrderPlugin(true) ]; if (isProduction) { // Production webpack plugins webpackPlugins.push(new webpack.optimize.UglifyJsPlugin({ compress: { wa...
#!/usr/bin/env node (0, require('../lib/cli/seaworthy').run)(process.argv.slice(2));
var mongoose = require('mongoose'); var connected = false; mongoose.connect(process.env.MONGO_DB_URI || 'mongodb://localhost/mongo-constant-test'); exports.connect = function(done) { if (connected) return done(); mongoose.connection.once('open', function() { connected = true; done(); ...
'use strict'; import config from './helpers/config'; /** * Query configured leak databases * * @param {object} context the context object * @return a promise resolving to a map of new leaks for each account, if any */ export default async function checkLeaks(context) { // Get leaks from databases let dat...
"use strict"; var fs = require("fs"); var path = require("path"); var nlsvParser = new Parser("nlsv"); var htmlParser = new Parser("html"); var str1 = ' <pre class=" language-javascript"><a title="Copy to clipboard" class="_pre-clip"></a><span spellcheck="true" class="token comment">// Pull off a header delimited by...
import { struct } from 'brisky-struct' import parent from '../render/dom/parent' import delegate from './delegate' import listen from './listener' // import { property } from '../render/static' const emitterProperty = struct.props.on.struct.props.default const cache = {} const injectable = {} const isTouch = typeof w...
import template from './admin.tpl.html'; import '../header/header.tpl.html'; import adminUsers from './users/index.js'; import uiAuth from '../common/uiAuth/index.js'; angular.module('sp.editor.admin', [ 'sp.editor.admin.users', 'uiAuth' //'resources.organisations', //'resources.users' ]) .config(function($st...
'use strict'; var test = require('ava'); var omit = require('lodash/omit'); var config = require('../../src/es5'); var baseFixture = require('../fixtures/eslint-config-es5'); var warningFixture = require('../fixtures/eslint-config-es5-warning'); test('base config matches expected eslint config', function(t) { t.pl...
version https://git-lfs.github.com/spec/v1 oid sha256:17bf96e421f3fb3531c5d5c3f93ec33f5691538b10c2729f518950bb8cc1d2dd size 7840
/** * @overview ccm component for acoordion * @see https://github.com/mozilla/pdf.js/ * @author Tea Kless <tea.kless@web.de>, 2018 * @license The MIT License (MIT) */ { var component = { /** * unique component name * @type {string} */ name: 'accordion', /** * recommended used f...
define([], function() { function Stack() { var array = []; this.push = function(obj) { array.push(obj); }; this.peek = function() { if (!array.length) { return undefined; } return array[array.length - 1]; }; this.pop = function() { if (!array.lengt...
import createHistory from 'history/createBrowserHistory'; import React from 'react'; import {render} from 'react-dom'; import {createStore} from 'redux'; import {enableFocusMode} from './actions'; import {locationToReference} from './data/model'; import {updateStoreWithPassageText} from './data/fetcher'; import prefer...
import { report, ruleMessages, validateOptions } from "../../utils" export const ruleName = "comment-empty-line-before" export const messages = ruleMessages(ruleName, { expected: "Expected empty line before comment", rejected: "Unexpected empty line before comment", }) export default function (expectation)...
Template.postUpvote.helpers({ upvoted: function(){ var user = Meteor.user(); if(!user) return false; return _.include(this.upvoters, user._id); } }); Template.postUpvote.events({ 'click .upvote-link': function(e){ var post = this; e.preventDefault(); if(!Meteor.user()){ Router.go('a...
'use strict'; import visit from 'unist-util-visit'; // base unist object models const elementPre = (props, hProps) => ({ type: 'inlineCode', data: { hName: 'pre', hProperties: {...hProps} }, ...props }) const elementCode = (children, props) => ({ type: 'element', tagName: 'code', properties: {.....
/* * Author Ricardo Alcantara<richpolis@gmail.com>. * Twitter: @richpolis * * Codigos fuentes * * numberFormat: http://www.yoelprogramador.com/formatear-numeros-con-javascript/ * * Validador de numeros: http://blog.freshware.es/solo-permitir-numeros-en-input-text-html/ * * Validar email: http:/...
'use strict'; const fs = require('fs'); const Discord = require("discord.js"); const bot = new Discord.Client(); const config = require('./config.json'); // Initialize **or load** the server configurations const Enmap = require('enmap'); const Provider = require('enmap-sqlite'); // I attach settings to client to avoi...
// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details. /*global desc, task, jake, fail, complete, directory, require, console, process */ (function () { "use strict"; var lint = require("./build/util/lint_runner.js"); var karma = require("./build/util/karma_runner.js"); var vers...
//import Rx from 'rx'; import clone from 'clone'; /// concretizeConstructors transforms [Constructor] attributes on interfaces and dictionaries /// into {type: 'operation', name: 'constructor'} member nodes. export default function concretizeConstructors(astRoots: Rx.Observable): Rx.Observable { return astRoots.m...
'use strict'; /** * @ngdoc function * @name beetlApp.factory:apiHandler * @description * # apiHandler * Factory of the beetlApp */ angular.module('beetlApp').factory('apiHandler', ['$http', function($http) { // Set standard content-type for all requests $http.defaults.headers.common['Content-Type'] = '...
// Generated on 2014-12-23 using // generator-webapp 0.5.1 'use strict'; // # Globbing // for performance reasons we're only matching one level down: // 'test/spec/{,*/}*.js' // If you want to recursively match all subfolders, use: // 'test/spec/**/*.js' module.exports = function (grunt) { // Time how long tasks t...
var ctrl = new Meteoris.ThemeAdminController(); Template.meteoris_themeAdminMain.onCreated(function() { var self = this; self.autorun(function() { self.subscribe('meteoris_themeAdmin', ctrl.getId()); }); }); Template.meteoris_themeAdminMain.helpers({ model: function(){ return ctrl....
// Load modules var Bluebird = require('bluebird'); var CatboxMemory = require('catbox-memory'); var Code = require('code'); var Hapi = require('..'); var Lab = require('lab'); // Declare internals var internals = {}; // Test shortcuts var lab = exports.lab = Lab.script(); var describe = lab.describe; var it = l...
import { BasePlugin } from '../../../src/index'; import React, {Component} from 'react'; // eslint-disable-line no-unused-vars import ImageRenderer from './image-renderer'; import InsertImage from './insert-image'; import ImageSerializer from './image-serializer'; /** * This is our plugin */ class AltImagePlugin ex...
/** * Ladder library * Pokemon Showdown - http://pokemonshowdown.com/ * * This file handles ladders. * * @license MIT license */ 'use strict'; let Ladders = module.exports = getLadder; const fs = require('fs'); function getLadder(formatid) { return new Ladder(formatid); } // tells the client to ask the ser...
import * as workITypes from 'src/workI/store/mutation-types' import * as dashTypes from 'src/dash/store/mutation-types' import workI from 'src/workI/api' import swal from 'sweetalert' import store from 'src/store' export default { state: { indexDisp: true, detailDisp: false, workI: [{}], workIDetail:...
const path = require('path'); const webpack = require('webpack'); const ExtractTextPlugin=require('extract-text-webpack-plugin'); module.exports = { devtool:'source-map', context: path.resolve(__dirname,'..'), entry: { app: ['./src/index.js'], }, output: { path: path.join(__dirname,'..','dist'), ...
(function ($, window, document, undefined) { 'use strict'; $(function () { var obj = $('html'); $('.js .menu-open').on('click', function(){ if (obj.hasClass('js-menu-open')) { obj.removeClass('js-menu-open'); } else { obj.addClass('js-menu-open'); } ...
var Worker = require("workerjs"); var path = require("path"); exports.test = function(notUsed, assert, done) { var target = process.argv[2]; var file = target ? "sql-"+target : "sql"; var worker = new Worker(path.join(__dirname, "../js/worker."+file+".js")); worker.onmessage = function(event) { var data = ...
define("ui", [], function() { var views = {}; var overlays = {}; var ready = false; var ready_callbacks = []; function renderTemplate(id, data) { data = data || {}; var text = $('script[type="text/template"]#' + id).text(); return text.replace(/{{(.+?)}}/g, function(_, name...
const bmoor = require('bmoor'); function makeSwitchableUrl(){ const ctx = {}; const keys = []; const fn = function(args){ let dex = null; for( let i = 0, c = keys.length; i < c && !dex; i++ ){ if (keys[i] in args){ dex = keys[i]; } } let rtn = ctx[dex]; if (bmoor.isFunctio...
/* The MIT License Copyright (c) 2015 Juan Cruz Viotti. https://jviotti.github.io. 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'; // Project details var name = 'richrdkng-support', description = 'GitHub Support Page', version = '1.0.0', homepage = 'http://richrdkng.github.io/support/', repository = { credentials: null, git: 'https://github.com/richrdkng/support.git' }, issue...
function swapDisplay(a, b) { var tmp = document.getElementById(a).style.display; document.getElementById(a).style.display = document.getElementById(b).style.display; document.getElementById(b).style.display = tmp; } function submitFormTriggeringCallback(formName, callbackKey, value) { if (value) { v...
module.exports = Polygon; var util = require('util'); var Geometry = require('./geometry'); var Types = require('./types'); var Point = require('./point'); var BinaryWriter = require('./binarywriter'); function Polygon(exteriorRing, interiorRings, srid) { Geometry.call(this); this.exteriorRing = exteriorRin...
var isStream = false ; function __log(e, data) { console.log(e); } var audio_context; var recorder; function startUserMedia(stream) { var input = audio_context.createMediaStreamSource(stream); __log('Media stream created.'); // Uncomment if you want the audio to feedback directly //input.c...
var util = require('util'), Lock = require('../base'), _ = require('lodash'), mongo = Lock.use('mongodb'), mongoVersion = Lock.use('mongodb/package.json').version, isNew = mongoVersion.indexOf('1.') !== 0, ObjectID = isNew ? mongo.ObjectID : mongo.BSONPure.ObjectID; function Mongo(options) { Lock.call(th...
var Tree = (function(Tree) { $.fn.extend({ treed: function() { return this.each(function() { //initialize each of the top levels var tree = $(this); tree.addClass("tree"); tree.find('li').has("ul").each(function () { var branch = $(this); //li with children ul ...
var React = require('react'); var ReactDOM = require('react-dom'); var listOfItems = <ul className="list-of-items"> <li className="item-1">Item 1</li> <li className="item-2">Item 2</li> <li className="item-3">Item 3</li> </ul>; ReactDOM.ren...
(function (views) { views.PaginationView = Backbone.View.extend({ events: { 'click a.filter': 'search', 'click a.first': 'gotoFirst', 'click a.prev': 'gotoPrev', 'click a.next': 'gotoNext', 'click a.last': 'gotoLast', 'click a.page': 'gotoPage', 'click .howmany a': 'changeCount', 'click ...
var gulp = require('gulp'); var shell = require('gulp-shell'); var clean = require('gulp-clean'); var htmlreplace = require('gulp-html-replace'); var runSequence = require('run-sequence'); var Builder = require('systemjs-builder'); var builder = new Builder('', 'systemjs.config.js'); var browserSync = require('browser-...
const DEFAULT_TIME_ZONE = { label: '(GMT+00:00) London', value: 'Europe/London' } const TIME_ZONES = [ { label: '(GMT-11:00) Niue', value: 'Pacific/Niue' }, { label: '(GMT-11:00) Pago Pago', value: 'Pacific/Pago_Pago' }, { label: '(GMT-10:00) Hawaii Time', value: 'Pacific/Honolulu'...
/** * * App.react.js * * This component is the skeleton around the actual pages, and should only * contain code that should be seen on all pages. (e.g. navigation bar) * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If...
// ------------------------------------------- // Pipe resources to/from another source // ------------------------------------------- export default function db(ripple, { db = {} } = {}){ log('creating') ripple.on('change.db', crud(ripple)) ripple.adaptors = ripple.adaptors || {} ripple.connections = ke...
var twgl = window.twgl; var mat4 = require('gl-matrix').mat4; var vec3 = require('gl-matrix').vec3; function Entity(gl) { this.gl = gl; this.model = mat4.create(); this.inc = 0; this.program = null; this.programwrap = null; this.uniforms = { model: this.model }; }; Entity.prototype.bindMesh = fu...
/** * Templates */ Template.messages.helpers({ messages: function() { return Messages.find({}, { sort: { time: -1}}); } }) Template.input.events = { 'keydown input#message' : function (event) { if (event.which == 13) { // 13 is the enter key event if (Meteor.user()) var name = Meteo...
/** * Token Scheduler * @namespace Services */ (() => { 'use strict'; angular .module('admin') .service('TokenScheduler', TokenScheduler); function TokenScheduler($interval, $http, TokenService) { this.refresh = refresh; //// function refresh(interval) { ...
/** * INSPINIA - Responsive Admin Theme * * Inspinia theme use AngularUI Router to manage routing and views * Each view are defined as state. * Initial there are written stat for all view in theme. * */ function config($stateProvider, $urlRouterProvider) { $urlRouterProvider.otherwise("/index/main"); $s...
// Generated by CoffeeScript 1.12.4 var actions, continueIterator, debug, debugAction, debugging, evaluateDebugStatus, flagPause, iterator, memory, onmessage, output, representation, resume, sendPaused, vm; importScripts('/lib/cmm/index.min.js'); memory = new cmm.Memory; debug = new cmm.Debugger; vm = null; iterat...
var SwaggerTools = require('swagger-tools'); function validateOutputSwagger(swagger2Document) { var spec = require('swagger-tools').specs.v2; spec.validate(swagger2Document, function(err, result) { if (err) { throw err; } if (typeof result !== 'undefined') { if (result.errors.length > 0) {...
import React, { Component, PropTypes } from 'react'; import { target } from 'react-aim'; const styles = { container: { position: 'absolute', width: '122px', height: '142px' }, progress: { backgroundColor: 'rgba(0, 0, 0, .1)', border: '1px solid rgba(0, 0, 0, .2)', height: '8px', width...
(function() { "use strict"; var CommentModel = Backbone.Model.extend({ validate: function(attr) { if( !attr.email ) { alert('Email Required!'); return; } if ( !attr.content ) { alert('Comment field cannot be blank!'); return; } }, initialize: f...
version https://git-lfs.github.com/spec/v1 oid sha256:053a29e73c6de07154e69778eecfa87c5ba269386cbe5eb221b90c522d1f6c5a size 798
(function( jQuery, undefined ){ jQuery.fn.extend( { treeControl : function( x ) { var e; try{ $.map( this, function( el, idx ){ var rand = function(){ var dt = new Date(); return Math.floor( Math.random()*dt.getTime() ); } var treeRoot = function( className ){ var nm = '' + x.theme + '-tree-root'; ...
var dgram = require('dgram'); function searchModulesNet() { var message = Buffer.from('vasily-rpi'); var client = dgram.createSocket('udp4'); //client.setBroadcast(true); //client.setMulticastLoopback(true); var client2 = dgram.createSocket('udp4'); //client2.setBroadcast(true); ...
if (typeof require !== 'undefined') var TilePosition = require('./tilePosition.js'); function GameState(tileBag = {}) { this.flowState = GameState.FlowStateEnum.NOTFLOWING; this.tilePositions = []; this.nextTile = undefined; this.tileBag = tileBag; this.timer = 0; this.entryTile = undefined; } ...
{ babelHelpers.classCallCheck(this, RandomComponent); return babelHelpers.possibleConstructorReturn( this, (RandomComponent.__proto__ || Object.getPrototypeOf(RandomComponent)).call( this ) ); }
/// <reference path="_references.js" /> var previousCard = null; var phone = navigator.userAgent.match(/Windows Phone/i); $(function () { // Notify the app host that we are running the onload operation. // This will ensure text resources are loaded. if (phone != null) { window.external.notify("onload"); } ...
var $mod$380 = core.VW.Ecma2015.Utils.module(require('../moment')); var symbolMap = { '1': '۱', '2': '۲', '3': '۳', '4': '۴', '5': '۵', '6': '۶', '7': '۷', '8': '۸', '9': '۹', '0': '۰' }, numberMap = { '۱': '1', '۲': '2'...
/* * Formula.js - Rich form development * * Copyright (c) 2011 Stephen Roth (designbystephen-at-gmail-dot-com) * * For details, see the Formula web site: http://www.formulajs.com/ * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documenta...
var a00353 = [ [ "HID_DEVICES_MAX", "a00843.html#ga49053c3cd6d48fe5f468ce010ac0a9ef", null ], [ "HID_PACKET_MAX", "a00843.html#ga6cdff3589b286ebcdd7771bb425fbf73", null ], [ "atcahid_t", "a00843.html#ga2416cca7ee952e679d466e3349d65035", null ], [ "hid_device_t", "a00843.html#ga5f2f61628e945fd6538155628f...
/** * @author weism * copyright 2015 Qcplay All Rights Reserved. */ var InputTest = qc.defineBehaviour('qc.demo.InputTest', qc.Behaviour, function() { this.image = null; this.label = null; }, { image: qc.Serializer.NODE, label: qc.Serializer.NODE }); InputTest.prototype.awake = function() { var...
var Stream = require('stream'); var tap = require('tap'); var MS = require('../mute.js'); // some marker objects var END = {}; var PAUSE = {}; var RESUME = {}; function PassThrough () { Stream.call(this); this.readable = this.writable = true } PassThrough.prototype = Object.create(Stream.prototype, { constructor...
define([ 'lib/test', 'models/form', 'views/admin/form_item' ], function(test, FormModel, AdminFormItemView) { return new test.Suite('AdminFormItemView', { setUp: function() { this.form = new FormModel(); this.form.setId(1); this.form.setName("foo"); this.form.setProjectId(1); t...
import Layer from "./Layer"; export default class TileLayer extends Layer { metadata = { properties: { url: { type: "string" }, opacity: { type: "float" } } }; init() { this.container = L.tileLayer(); } setUrl(url) { this.setProperty...
// Handle input parameters var Logger = require('./eventlog'), optimist = require('optimist'), max = 60, p = require('path'), argv = optimist .demand('file') .alias('f','file') .describe('file','The absolute path of the script to be run as a process.') .check(function(argv){ ...
/** * [format description] * @param {[type]} time [new Date] * Thu May 18 2017 16:25:35 GMT+0800 (CST) * 16:25:35 * @return {[type]} [description] */ function format(time) { return time.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, '$1'); } function run(fn, options) { console.log('......run.......
var files = { "webgl": [ "webgl_animation_cloth", "webgl_animation_keyframes_json", "webgl_animation_scene", "webgl_animation_skinning_blending", "webgl_animation_skinning_morph", "webgl_camera", "webgl_camera_array", "webgl_camera_cinematic", "webgl_camera_logarithmicdepthbuffer", "webgl_clipping"...
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||...
import ApiClient from './ApiClient' import { SOURCE_Add_API, SOURCE_EDIT_API, SOURCE_INFO_API, SOURCE_GET_API, SOURCE_DELETE_API, SOURCE_LIST_API } from '../constants/api' export function get(params) { const uid = JSON.parse(localStorage.getItem('uid')) return ApiClient.get(SOURCE_GET_API, { ...params, acc...
'use strict'; //filter feature module angular.module('myApp.filter', ['ngRoute', 'exactFilter']) .config(['$routeProvider', function($routeProvider) { $routeProvider.when('/filter', { templateUrl: 'filter/filter.html', controller: 'FilterCtrl' }); }]) .controller('FilterCtrl', ['$http', '$scope', funct...
/** * @author Toru Nagashima * @copyright 2017 Toru Nagashima. All rights reserved. * See LICENSE file in root directory for full license. */ "use strict" //------------------------------------------------------------------------------ // Requirements //-------------------------------------------------------------...
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---------------------------------------------------------------...
var async = require('async'), crypto = require('crypto'), request = require('request'), RateLimiter = require('limiter').RateLimiter; util = require('util'); var logger = require('../logger.js'), order = require('../order.js'), transaction = require('../transaction.js'), counter = require('...
// // PageScore.js import React, { Component } from 'react'; import Title from './Title' import MatchTabs from './MatchTabs' import ScoreSummaryContainer from '../containers/ScoreSummaryContainer' import RaisedButton from 'material-ui/RaisedButton'; import DeleteIcon from 'material-ui/svg-icons/action/delete-forever'...
import { registerEnumeration } from "lib/misc/factories"; // OPCUA Spec 1.02 Part 4 page 5.12.1.3 Monitoring Mode: // The monitoring mode parameter is used to enable and disable the sampling of a MonitoredItem, and also to provide // for independently enabling and disabling the reporting of Notifications. This capabil...
/*jshint esversion: 6 */ import { Template } from 'meteor/templating'; import './week.html'; import { attsToggleInvalidClass } from '../../utilities/attsToggleInvalidClass'; Template.afInputWeek_materialize.helpers({ atts: attsToggleInvalidClass });
angular .module("recordmate") .controller("collectionController", ['$scope', '$location', 'userAuth', 'Search', 'collection', function($scope, $location,userAuth, Search, collection){ //get username $scope.user = userAuth.getUser().name; //create variable to hold wishlist items $scope.items //...
import React from 'react'; import classnames from 'classnames'; import style from './style'; const NavDrawer = (props) => { const rootClasses = classnames([style.navDrawer], { [style['permanent-' + props.permanentAt]]: props.permanentAt, [style.wide]: (props.width === 'wide'), [style.active]: props.activ...
import React, { Component } from 'react'; import { StyleSheet, Text, View, Navigator, ScrollView, ListView, Alert, } from 'react-native'; import { AsyncStorage, Platform, TouchableHighlight, TouchableNativeFeedback, } from "react-native"; import NavigationBar from 'react-native-navbar'; import {Go...
/** * Copyright (c) 2014, Facebook, Inc. All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * */ 'use strict'; ...
// npm packages import request from 'supertest'; // our packages import app from '../src/app'; export default (test) => { test('GET /', (t) => { request(app) .get('/') .expect(200) .expect('Content-Type', /text\/html/) .end((err, res) => { const expectedBody = 'Hello world!'; ...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = toutSuite; var _synchronousPromise = require('synchronous-promise'); function isObject(obj) { return obj === Object(obj); } function fakeSetTimeout(f, d) { for (var _len = arguments.length, args = Array(_len > 2 ? _...
'use strict'; import React, { Component } from 'react'; import Project from './project'; import { projects } from '../../data'; import Modal from '../modal'; export default class Portfolio extends Component { constructor(props) { super(props); } render() { return ( <div> <section id='portfo...
module.exports = require('./dist/iso3166-1')
/*global QUnit:false, module:false, test:false, asyncTest:false, expect:false*/ /*global start:false, stop:false ok:false, equal:false, notEqual:false, deepEqual:false*/ /*global notDeepEqual:false, strictEqual:false, notStrictEqual:false, raises:false*/ /*global $:true, console:true*/ (function($) { /* ========...
'use strict' // region randomInclusive32 function randomInclusive32() { return Math.floor(Math.random() * 0x100000000) / 0xffffffff } // endregion // region randomInclusive function randomInclusive() { return Math.floor(Math.random() * 0x20000000000000) / 0x1fffffffffffff } // endregion export { randomInclus...
import Ember from 'ember'; import jQuery from 'jquery'; export default Ember.Component.extend({ focusOnKeyDown: function() { var newactiveIndex = this.get('activeIndex'); if (newactiveIndex >= 0) { this.toggleActiveClass(newactiveIndex); }else{ jQuery('li').removeClass(); } }.observes('...
var ObjectId = require("mongodb").ObjectId; var Hashids = require("hashids"); var moment = require("moment"); module.exports = function() { var salt = new ObjectId().toString(); var hashids = new Hashids(salt, 8, "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"); var now = moment(); var begin = now.clone().s...
'use strict'; var fs = require('fs'); var assert = require('assert'); var getRepo = require('get-repo'); var lex = require('pug-lexer'); var load = require('pug-load'); var parse = require('pug-parser'); var handleFilters = require('../').handleFilters; var customFilters = require('./custom-filters.js'); v...
// The MIT License (MIT) // // Copyright (c) 2017-2021 Camptocamp SA // // 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 // u...
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { dndStyles as defaultDndStyles, SortableGrid } from 'wix-style-react'; import { classes } from './SingleAreaGrid.st.css'; const generateId = () => Math.floor(Math.random() * 100000); export default class Sing...
export default function docTraverser(node) { switch(node.tagName) { case 'h2': case 'h3': node.children.unshift(makeHeadingAnchor(node.properties.id)) break case 'pre': if(node.children.length === 1 && node.children[0].tagName === 'code') { var textNodes = node.children[0].child...
import Reflux from 'reflux'; var name = "chat"; var actions = Reflux.createActions([ "connect", "add" ]); var store = Reflux.createStore({ init() { this.chatCollection = [ {name: "Super Hooligan", text: "Yeah go manchester!!!"}, {name: "ChelseaDagger", text: "Go Chelsea. M...
// You can also run hapi servers with a module named *rejoice* and compose // the server and its plugins in a configuration file // For this step run `rejoice -c manifest.json`
'use strict'; var d = require('d') , memoize = require('memoizee/weak-plain') , htmlDocument = require('dom-ext/html-document/valid-html-document'); module.exports = memoize(function (document) { var timeout, meta = {}; var reset = function () { timeout = null; Object.defineProperties(meta,...