code stringlengths 2 1.05M |
|---|
(function($, UI) {
"use strict";
var Animations;
UI.component('switcher', {
defaults: {
connect : false,
toggle : ">*",
active : 0,
animation: false
},
init: function() {
var $this = this;
this.on("click... |
import { getCurrentEnvironment } from './getCurrentEnvironment';
export function Environment(Builder) {
return class Wrapped extends Builder {
constructor(...args) {
super(...args);
this._environments = new Set();
}
inEnvironment(environment) {
thi... |
/* */
"format global";
"use strict";
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; };
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
exports.UnaryExpression = UnaryExpression;
exports.DoExpression = DoExpressio... |
//rollup.config.ts
import alias from 'rollup-plugin-alias';
import resolve from 'rollup-plugin-node-resolve';
import typescript from 'rollup-plugin-typescript2';
import angular from 'rollup-plugin-angular-aot';
export default {
input: 'tmp/esm5/main.js',
output: {
format: 'es',
file: 'dist/esm5/angular2-t... |
/*
* CheckRegPage Messages
*
* This contains all the text for the CheckRegPage component.
*/
import { defineMessages } from 'react-intl';
export default defineMessages({
header: {
id: 'app.containers.CheckRegPage.header',
defaultMessage: 'Are you registered to vote?',
},
apiErr: 'Error connecting to ... |
/**
* Constructing and interpreting flat frames representation
* The representation is similar to
* [ANF](https://en.wikipedia.org/wiki/A-normal_form)
*/
import * as Kit from "./kit";
import { Tag, invariant } from "./kit";
import * as Block from "./block";
import * as Ctrl from "./control";
import * as Coerce from... |
// @flow strict
import { useStaticQuery, graphql } from 'gatsby';
const useSiteMetadata = () => {
const { site } = useStaticQuery(
graphql`
query SiteMetaData {
site {
siteMetadata {
author {
name
bio
photo
contacts {
... |
describe('Atm', function() {
it('should send value to server', function() {
browser.get('http://localhost:8080/withdrawal');
element(by.model('vm.withdrawalValue')).sendKeys('200');
// Find the first (and only) button on the page and click it
element(by.id("withdrawal")).click();
function eve... |
const enums =
{
PlayerBan: 'player.bans',
PlayerKick: 'player.kicks',
PlayerMute: 'player.mutes',
PlayerNote: 'player.notes',
PlayerWarning: 'player.warnings'
}
module.exports = (type) => enums[type]
|
import moment from 'moment';
export class WeekCalcer {
constructor(matches, currentWeek, includeFreeMatches = false) {
this.includeFreeMatches = includeFreeMatches;
this.matches = matches.sort((a, b) => a.date - b.date);
this.setCurrentWeeks(currentWeek);
}
getMatches() {
const week = this.getWe... |
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
(function() {
var Dom = YAHOO.util.Dom,
Event = YAHOO.util.Event,
Lang = YAHOO.lang;
/**
* @module editor
* @description <p>Creates a rich c... |
/* eslint no-unused-expressions: 0 */
describe('initializers', function() {
it('run the initilizer', async function() {
expect(global.enabledInitializerVar).to.be.true
})
it('don\'t run the initilizer', async function() {
expect(global.disabledInitializerVar).to.be.undefined
})
})
|
'use strict';
var fs = require('fs');
var http = require('http');
var https = require('https');
var express = require('express');
var bodyParser = require('body-parser');
var socketio = require('socket.io');
var inherits = require('util').inherits;
var BaseService = require('../service');
var bitcore = require('bitco... |
const serializer = require('./serializer')
module.exports = (data, model, options = {baseUrl: '/'}) => {
return serializer(options).serialize(JSON.parse(JSON.stringify(data)), model)
}
|
import React from 'react';
import Post from './Post.js';
import {Decorator as Cerebral} from 'cerebral-react';
@Cerebral({
posts: ['posts']
})
class PostsList extends React.Component {
renderPost(post_id, index) {
return <Post key={index} index={index} post={this.props.posts[post_id]}/>;
}
render() {
... |
define(function(require) {
var Loader = require('../lib/loader');
var Actors = require('../lib/actor');
var Input = require('../lib/input');
var Sheets = require('../lib/sheets');
var Paths = require('../lib/path');
var Audio = require('../lib/audio');
var Effects = r... |
import React from 'react';
import Loadable from 'react-loadable';
import LoadingComponent from '../../components/LoadingComponent/LoadingComponent';
import { RestrictedRoute } from '../../containers/RestrictedRoute';
import { Route, Switch } from 'react-router-dom';
function MyLoadable(opts, preloadComponent... |
var path = require('path');
var calypso = require('calypso');
var LevelDriver = require('calypso-level');
var levelup = require('levelup');
var medeadown = require('medeadown');
var Query = calypso.Query;
var medea = require('medea');
var async = require('async');
var Registry = module.exports = function(opts){
opts... |
/**
* Styles a row in the invoice table. Moved to a general component so it can consistently style both the header and
* body rows (which are in different files). This is a bit klutzy: better to style each individually - but it's
* simple & practical for this situation.
*/
import styled from 'styled-components';
... |
var React = require('react');
module.exports = React.createClass({displayName: "exports",
getInitialState: function() {
return {
items: this.props.items,
disabled: true
}
},
componentDidMount: function() {
this.setState({
disabled: false
})
},
handleClick: function() {
... |
function increment() {
return { type: 'INCREMENT_COUNTER' };
}
function incrementAsync() {
return dispatch => {
setTimeout(() => {
dispatch(increment());
}, 1000);
};
}
store.dispatch(incrementAsync());
|
'use strict';
const expect = require('chai').expect;
const SilentError = require('silent-error');
const TestServerTask = require('../../../lib/tasks/test-server');
const MockProject = require('../../helpers/mock-project');
const MockUI = require('console-ui/mock');
const MockWatcher = require('../../helpers/mock-watch... |
/*jshint node:true */
'use strict';
/**
* Returns the package for the given name if found or undefined otherwise
*
* @param {String} The name of the package to try to load
*
* @return {*}
*/
module.exports = function optionale(optionalDependency) {
try {
return require(optionalDependency);
} catch (igno... |
var Man = function(name){
this.name = name;
}
Man.prototype.showName = function(){
console.log('hello ' + this.name);
return 'hello ' + this.name;
}
module.exports = Man;
|
'use strict';
/*global m */
// todo modules
var app = require('./app');
var model = require('./model');
require('./header');
require('./new-task');
require('./list-of-tasks');
require('./task');
require('./footer');
module.exports = m.element('todos-demo', {
controller: function(){
// Todo collection
app... |
// AMD Wrapper Header
define(function(require, exports, module) {
// moment.js language configuration
// language : danish (da)
// author : Ulrik Nielsen : https://github.com/mrbase
require('../moment').lang('da', {
months : "Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December".spl... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... |
pc.extend(pc, function () {
'use strict';
var EVENT_RESIZE = 'resizecanvas';
// Exceptions
function UnsupportedBrowserError(message) {
this.name = "UnsupportedBrowserError";
this.message = (message || "");
}
UnsupportedBrowserError.prototype = Error.prototype;
function Con... |
(function (root, factory) {
if (typeof exports === 'object') {
var jquery = require('jquery');
module.exports = factory(jquery);
} else if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
}
}(this, function ($) {
// @include mtchart.core.js
return MT.ChartAPI;
}));
|
define([
'jquery',
'utils',
'semantic-ui'
], function(
$,
Utils
) {
var module = {};
module.container = $("#feng-theme-container");
module.init = function() {
module.container.on("click", ".feng-theme-add", function() {
$("#feng-theme-modal .header").text("Add new theme");
$("#feng-theme-modal .header... |
import React from 'react'
import PropTypes from 'prop-types'
import SVGDeviconInline from '../../_base/SVGDeviconInline'
import iconSVG from './DockerOriginal.svg'
/** DockerOriginal */
function DockerOriginal({ width, height, className }) {
return (
<SVGDeviconInline
className={'DockerOriginal' + ' ' + c... |
define([
"Praxigento_Core/js/grid/column/link"
], function (Column) {
"use strict";
return Column.extend({
defaults: {
idAttrName: "fromMlmId",
route: "/customer/downline/index/mlmId/"
}
});
});
|
/**
* Some setup to help test locally via node. See line 11 for HackerRank functionality.
*/
var bot;
var fs = require('fs'); // Node's file system lib.
(function() {
'use strict';
/**
* HackerRank bot code starts here..., remove comments on lines:
* 15, 16 & 241 - comment out line 240.
*/... |
define(['mout/function/makeIterator_'], function(makeIterator_){
describe('function/makeIterator_', function(){
it('should return source argument if it is already a function', function(){
var fn = function(){};
expect( makeIterator_(fn) ).toBe(fn);
});
it('should ... |
/**
* Parse string expressions like "L x[L y[x(y)]]" into a UserExpression.
*
* This isn't used in the app itself, but is useful for testing and development
* purposes.
*
* @flow
*/
import {
UserFuncCall,
UserLambda,
UserReference,
UserVariable,
} from './types'
import type {UserExpression} from... |
var util = require('util');
var debuglog = util.debuglog('nodemilter');
var async = require('async');
var constants = require('./constants');
var SMFIS = constants.SMFIS;
var SMFI_VERSION = constants.SMFI_VERSION;
var SMFI_VERSION_MDS = 0x01000002;
var MI_CONTINUE = 1;
var MI_SUCCESS = constants.MI_SUCCESS;
var MI_F... |
//= link_tree ../images
//= link_directory ../stylesheets .css
//= link letter_opener_web_manifest.js
|
module.exports = function(grunt) {
var path = require('path'),
connect = require('connect'),
tmp = require('tmp'),
fs = require('fs');
function linkInDir(srcpath, dirpath) {
var destpath = path.join(dirpath, path.basename(srcpath));
fs.symlinkSync(path.resolve(srcpath), destpath);
}
... |
// moment.js
// version : 2.0.0
// author : Tim Wood
// license : MIT
// momentjs.com
(function (undefined) {
/************************************
Constants
************************************/
var moment,
VERSION = "2.0.0",
round = Math.round, i,
// internal storage for language config files
language... |
/**
* @license AngularJS v1.2.14
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {'use strict';
/**
* @ngdoc module
* @name ngRoute
* @description
*
* # ngRoute
*
* The `ngRoute` module provides routing and deeplinking services and directives for ang... |
var os = require('os')
var path = require('path')
var fs = require('fs')
var builder = require('xmlbuilder')
var pathIsAbsolute = require('path-is-absolute')
// concatenate test suite(s) and test description by default
function defaultNameFormatter (browser, result) {
return result.suite.join(' ') + ' ' + result.des... |
'use strict';
/* globals require, module, console, process */
var superagent = require('superagent');
var config = require('./config');
var refreshIntervaldId;
var specifiedInterval;
var buildUpdateUrl = function(host) {
return 'https://' + host.username + ':' + host.password + '@dyndns.strato.com/nic/update?hos... |
/**
* combo loader for KISSY. using combo to load module files.
* @ignore
* @author yiminghe@gmail.com
*/
(function (S, undefined) {
// ie11 is a new one!
var oldIE = S.UA.ieMode < 10;
function loadScripts(runtime, rss, callback, charset, timeout) {
var count = rss && rss.length,
er... |
// This is the base controller. Used for base routes, such as the default index/root path, 404 error pages, and others.
module.exports = {
index: {
handler: function(request, reply){
// Render the view with the custom greeting
reply.view('index', {
title: 'Awesome Boile... |
"use strict";
var core_1 = require('@angular/core');
var CardsComponent = (function () {
function CardsComponent() {
}
CardsComponent = __decorate([
core_1.Component({
templateUrl: 'app/components/cards/cards.component.html'
}),
__metadata('design:paramtypes', [])
],... |
/*!
* Author: Abdullah A Almsaeed
* Date: 4 Jan 2014
* Description:
* This file should be included in all pages
!**/
/*
* Global variables. If you change any of these vars, don't forget
* to change the values in the less files!
*/
var left_side_width = 220; //Sidebar width in pixels
$(function() {
"... |
"use strict";
module.exports = function (grunt) {
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
// Time how long tasks take. Can help when optimizing build times
require('time-grunt')(grunt);
// Define the configuration for all the tasks
grunt.initConfig({
// Project setting... |
const request = require('supertest');
const app = require('../');
describe('dot', () => {
it('200', (done) => {
request(app.listen())
.get('/dot')
.expect(200)
.end(() => {
done();
});
});
});
|
var koa = require('koa');
var json = require('koa-json');
var app = koa();
app.use(json());
app.use(function *(next){
this.body = { randomNumber : '' + getRandomNumber(),
lowerBound : "1" ,
upperBound : "10"};
});
console.log("listen by port 3000");
app.listen(3000);
function getRandomNu... |
/**
* Created by long on 15-8-14.
*/
var flax = flax || {};
/**
* System variables
* @namespace
* @name flax.sys
*/
flax.sys = {};
var sys = flax.sys;
/**
* English language code
* @memberof flax.sys
* @name LANGUAGE_ENGLISH
* @constant
* @type {Number}
*/
sys.LANGUAGE_ENGLISH = "en";
/**
* Chinese la... |
var fieldTests = require('./commonFieldTestUtils.js');
var HtmlModelTestConfig = require('../../../modelTestConfig/HtmlModelTestConfig');
module.exports = {
before: fieldTests.before,
after: fieldTests.after,
'Html field should show correctly in the initial modal': function (browser) {
browser.adminUIApp.openFiel... |
'use strict';
const UUID = require('uuid/v4');
const Event = require('../../db/models/Event');
const formatDate = require('../utilities');
// Perform Mongoose query to find all records that are instances of the Event
// Model, sort them in reverse chronological order (i.e., newest first),
// limit the sort to the 2... |
const { src, dest, watch, series, parallel } = require('gulp');
const sass = require('gulp-sass')(require('sass'));
const autoprefixer = require('gulp-autoprefixer');
const concat = require('gulp-concat');
const uglify = require('gulp-uglify');
const rename = require('gulp-rename');
const files = {
scssPath: 'src/sas... |
var Command = require('streamhub-sdk/ui/command');
var GalleryAttachmentListView = require('streamhub-sdk/content/views/gallery-attachment-list-view');
var HubButton = require('streamhub-sdk/ui/hub-button');
var inherits = require('inherits');
var ModalView = require('streamhub-sdk/modal');
'use strict';
function Exp... |
/**
* Generic boilerplate used for building SASS and compiling sprites. Feel free to change this to suit your needs!
*
* For usage, please see README.md.
*
* @site YOUR_SITE_NAME
* @author Patrick Nelson, pat@catchyour.com
* @link https://github.com/patricknelson/sassified-sprites
* @since 2015-08-10
*/
modul... |
// Test setup
///////////////////////////////////////
var specs = require("../../SpecHelpers");
//specs.debug();
specs.ensureWindow();
// Imports
///////////////////////////////////////
specs.requireMsAjax();
specs.requireJQueryExtend();
specs.ensureNamespace("ExoWeb");
specs.require("model.PropertyChain");
specs.... |
import NavTop from './navTop';
import Container from './container'
export {NavTop, Container};
|
const monk = require('monk');
const config = require('../config.json');
const db = monk(config.mongodb);
const usersCollection = db.get('users');
const main = async () => {
const $group = { $group: { _id: '$username', dups: { $sum: 1 } } };
const $match = { $match: { dups: { $gt: 1 } } };
const pipeline = [$g... |
#!/usr/bin/env node
'use strict';
require('babel-register');
console.log('Hello Calendar');
require('./lib/cal');
|
"use strict";
// Swaggy assumes the current working directory is the project root.
// By default it will look for ./rest-api/ directory to scan .js files for endpoints.
if (process.cwd() !== __dirname) {
process.chdir(__dirname);
}
var express = require("express"),
bodyParser = require("body-parser"),
... |
version https://git-lfs.github.com/spec/v1
oid sha256:c50522d29416e3f1b343379f39c03ddf9851dc0c77305de2a93b3072db48a4c8
size 70387
|
/* eslint-env node */
"use strict";
module.exports = function (grunt) {
/*
* Initialize configurations
*/
grunt.initConfig({
requirejs: {
options: {
optimize: "uglify2",
uglify2: {
output: {
beautify: fa... |
var localStorageFeature = true;
describe('Local storage', function () {
'use strict';
beforeEach(module('ccdb.utils.localStorage.factory'));
var localStorage, nativeLocalStorage, patientRule;
beforeEach(inject(function (LocalStorage, $localStorage, PatientRule) {
localStorage = LocalStorage;
... |
/*
* Game JS
*/
Vue.component('goal-select', {
template: `
<div>
<form class="form-horizontal" v-on:submit.prevent="" v-if="seen">
<div class="form-group">
<label for="topicSearch" class="col-sm-2 control-label">Choose a g... |
var mongoose = require("mongoose"),
Schema = mongoose.Schema;
var Message = new Schema({
chat_content: {
type: Array,
default: []
}
});
//Export modules.
module.exports = mongoose.model("message", Message); |
/*
* Copyright (c) André Bargull
* Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms.
*
* <https://github.com/anba/es6draft>
*/
export default () => "standard";
export let foo = () => "standard";
|
"use strict";
// Here I can modify configuration...
const config = require("./config.js");
config.web.port = 8282;
// Or execute other custom code!
// then run real index.js
require("./index.js");
|
'use strict';
import React from 'react/addons';
import SuitCssify from '../index';
import classNames from 'classnames';
let Button = React.createClass({
mixins: [SuitCssify.mixin],
propTypes: {
children: React.PropTypes.node,
disabled: React.PropTypes.bool,
kind: React.PropTypes.oneOf(['primary', 'se... |
/*
* grunt-cache-buster
* https://github.com/jparsons/cache-buster
*
* Copyright (c) 2013 Jon Parsons
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'tasks/*.js',
... |
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import bar from 'data:application/json,{"obj": 456}';
import {foo} from 'data:text/javascript,export const fo... |
'use strict';
/* eslint-env phantomjs */
/* globals document: true */
var path = require('path'),
phridge = require('phridge'),
promise = require('bluebird'),
utility = require('./utility'),
_ = require('lodash');
var phantom;
/**
* Create the PhantomJS instances, or use the given one.
* @param ... |
import { expect } from 'chai';
import React from 'react';
import {shallow} from 'enzyme';
import PxAlertLabel from './';
describe('px-alert-label', () => {
test('should...', () =>{
const wrapper = shallow(
<PxAlertLabel/>
);
console.log(wrapper.debug());
expect(true).to.equal(true);
});
tes... |
CollectionHelpers = {};
CollectionHelpers.addCreatedValues = function (doc){
doc.createdAt = moment().utc().format();
doc.createdById = Meteor.userId();
doc.createdByUsername = Meteor.user().username;
}
CollectionHelpers.addUpdatedValues = function (doc){
doc.updatedAt = moment().ut... |
import React from 'react';
import jQuery from 'jquery';
import {getTopicDetail,updateTopic} from '../lib/client';
import {redirectUrl} from '../lib/utils';
import TopicEditor from './TopicEditor';
export default class NewTopic extends React.Component{
constructor(props){
super(props);
this.state={};
}
compon... |
(function() {
'use strict';
const Class = require('ee-class');
const type = require('ee-types');
const log = require('ee-log');
const EventEmitter = require('ee-event-emitter');
/**
* The Permissions Class exposes an interface to query the permissions for one
... |
a = 1, b = a, c = 1, d = b, e = d, longname = 2;
if (longname + 1) {
x = 3;
if (x)var z = 7
}
z = 1, y = 1, x = 1, g += 1, h = g, ++i, j = i, i++, j = i + 17 |
//= require ./model.js
(function () {
'use strict';
var node = typeof window === 'undefined';
var app = node ? {} : window.app;
var _ = node ? require('underscore') : window._;
var Model = node ? require('./model') : app.Model;
var soundManager = node ? null : window.soundManager;
var Sound = Model.ex... |
'use strict';
// Declare app level module which depends on views, and components
angular.module('NHCApp', [
'ngRoute',
'NHCApp.aboutus',
'NHCApp.home',
'NHCApp.products',
'NHCApp.contact'
])
.config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) {
$locationProvider.hash... |
var movingShapes = (function() {
"use strict";
var BROWSER_SAFE_FONTS = [
/*Serif Fonts*/
"Georgia, serif",
"\"Palatino Linotype\", \"Book Antiqua\", Palatino, serif",
"\"Times New Roman\", Times, serif",
/*Sans-Serif Fonts*/
"Arial, Helvetica, sans-serif",
"\"Arial Black\", Gadget, sans-serif",
"\"... |
var
gulp = require('gulp'),
connect = require('gulp-connect'),
less = require('gulp-less'),
uglify = require('gulp-uglify'),
clean = require('gulp-clean'),
minifyCss = require('gulp-minify-css'),
concat = require('gulp-concat'),
concatVendor = require('gulp-concat-vendor'),
htmlify = require('gulp-angula... |
import React, {PropTypes} from 'react'
import {bindActionCreators} from 'redux'
import {connect} from 'react-redux'
import Search from '../components/search'
import * as searchActions from '../actions/search-actions'
const SearchContainer = (props) => (
<div>
<Search {...props}></Search>
</div>
)
const mapSta... |
'use strict';
module.exports = function(grunt) {
// load all grunt tasks matching the `grunt-*` pattern
require('load-grunt-tasks')(grunt);
grunt.initConfig({
// watch for changes and trigger less, jshint and livereload
watch: {
recess: {
files: ['assets/less/*... |
var game = require('./sheep/game');
game.init(document.getElementById('stageContainer')); |
var sel_number = undefined;
var $collapse = $('.collapse');
var $modal_title_lib = $(".modal-title-lib");
var $loading = $(".loading-icon");
$collapse.collapse('hide');
$(document).ready(function() {
var IEVersionCheck = function() {
var word;
var version = "N/A";
var agent = navigator.userAgent.toLowerCase(... |
import contains from 'dom-helpers/query/contains';
import PropTypes from 'prop-types';
import React from 'react';
import ReactDOM from 'react-dom';
import addEventListener from './utils/addEventListener';
import ownerDocument from './utils/ownerDocument';
const escapeKeyCode = 27;
function isLeftClickEvent(event) {
... |
'use strict';
import * as config from "./config";
import Ground from "./ground";
const SCENE_RANGE = 750;
class UI {
constructor(){
}
init(renderer, scene, app){
var cfg = config,
gui = new dat.GUI(),
folder, obj;
// general
addColorCtrls(gui, cfg.background, 'background', 'background', v => ... |
import {expect} from 'src/external/chai.js';
import {testWorld, loadComponent} from './templates-fixture.js';
describe("Object Editor Component", function() {
var that;
before("load", function(done){
this.timeout(35000);
var templateName = "lively-object-editor";
loadComponent(templateName).then(c =>... |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h("path", {
d: "M20 6h-8l-1.41-1.41C10.21 4.21 9.7 4 9.17 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-5 3c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm4 8h-8v-1c0-1.33 2.67-2 4-... |
/*global expect*/
describe('Date type', function() {
it('inspects without milliseconds when the milliseconds field is zero', function() {
expect(
new Date(0),
'to inspect as',
"new Date('Thu, 01 Jan 1970 00:00:00 GMT')"
);
});
it('inspects with three milliseconds digits when the millise... |
'use strict';
/**
* Click on 'Delete' tab on delete deployment dialog
*/
exports.clickConfirm = function() {
$$('#deleteDialog .confirmationButtons button').get(1).click();
};
/**
* Click on 'Cancel' button on delete deployment dialog
*/
exports.clickCancel = function() {
$$('#deleteDialog .confirmationBu... |
var Animator = {
start: function () {
var self = this;
var animTriggers = $("[data-animate-trigger]");
$(window).scroll(function () {
animTriggers.each(function () {
if (self.isInView(this) === true) {
var $this = $(this).find("[data-animate]");
$this.addClass("animated " + $thi... |
/* @flow */
const { createAction } = require('redux-actions')
export const PATH_UPDATE = 'PATH_UPDATE'
import type { Action, Reducer } from 'redux'
const reducer : Reducer<{}, Action>
= (state = {}, { type, payload }) => {
switch (type) {
case PATH_UPDATE:
return payload
default:
return state... |
// Import Vue
import Vue from 'vue'
// Import F7
import Framework7 from 'framework7'
// Import F7 Vue Plugin
import Framework7Vue from 'framework7-vue'
// Import F7 iOS Theme Styles
import Framework7Theme from 'framework7/dist/css/framework7.ios.min.css'
import Framework7ThemeColors from 'framework7/dist/css/framewo... |
var UtmCookie;
UtmCookie = class UtmCookie {
constructor(options = {}) {
this._cookieNamePrefix = '_uc_';
this._domain = options.domain;
this._sessionLength = options.sessionLength || 1;
this._cookieExpiryDays = options.cookieExpiryDays || 365;
this._additionalParams = options.additionalParams ||... |
class UTF8Helper {
constructor() {
}
encode(s) {
return unescape( encodeURIComponent(s) );
}
decode(s) {
return decodeURIComponent( escape(s) );
}
}
export default UTF8Helper;
|
'use strict';
angular.module('events').controller('EventController', ['$scope','$http','$stateParams','$state','Authentication','Events',
function($scope,$http, $stateParams,$state,Authentication,Events){
//used to create a sponsorship called from the createsponsorship.client.view.html
$scope.createEvent ... |
"use strict";
jest.mock("@lerna/child-process");
// mocked modules
const childProcess = require("@lerna/child-process");
// file under test
const hasTags = require("../lib/has-tags");
describe("hasTags()", () => {
childProcess.execSync.mockImplementation(() => "v1.0.0\nv1.0.1");
it("calls `git tag` with option... |
// Copyright (c) 2013 David Hayes
/* global describe, it */
'use strict';
var assert = require('assert');
var loki = require('../index');
describe('loki-core', function() {
it('should expose an object', function() {
assert(typeof loki === 'object');
});
it('should expose Game ctor', function() {
asser... |
var playState = {
create: function(){
var background = game.add.sprite(0, 0, 'cidade');
background.width = 1300;
background.height = 650;
graphics = game.add.graphics(0, 0);
groupCidade = game.add.group();
groupCidade.inputEnableChildren = true;
var x = 1... |
/*
* Simple event implementation
*/
var Class = require('./class');
var Event = Class.extend({
init: function () {
this._maxListeners = this._maxListeners || -1;
}
});
Event.prototype.on = function on(arg0, arg1) {
this._listeners = this._listeners || {};
switch(typeof arg0){
case 'string':
if(Object.p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.