code stringlengths 2 1.05M |
|---|
// Flags: --expose-internals
'use strict';
const common = require('../common');
const fs = require('internal/fs/utils');
// Valid encodings and no args should not throw.
fs.assertEncoding();
fs.assertEncoding('utf8');
common.expectsError(
() => fs.assertEncoding('foo'),
{ code: 'ERR_INVALID_OPT_VALUE_ENCODING', ... |
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import initializer from "ilios/instance-initializers/ember-i18n";
import startMirage from '../../helpers/start-mirage';
import Ember from 'ember';
import wait from 'ember-test-helpers/wait';
const { Object } = Ember;
... |
'use strict';
import { fn as deprecateFn } from './internal/deprecation';
import globalize from './internal/globalize';
/**
* Filters a list of entries by a passed search term.
*
* Options:
* - `keywordsField` name of entry field containing keywords, default "keywords".
* - `ignoreForCamelCase` ignore search cas... |
Reselect.directive('reselectSelection', ['$templateCache', function($templateCache){
return {
restrict: 'AE',
replace: true,
transclude: true,
template: $templateCache.get('templates/reselect.selection.tpl.html'),
scope: {},
require: ['^reselect'],
link: funct... |
var Ffmpeg = require('../index'),
path = require('path'),
exec = require('child_process').exec
testhelper = require('./helpers');
describe('Debug', function() {
before(function(done) {
// check for ffmpeg installation
this.testfile = path.join(__dirname, 'assets', 'testvideo-43.avi');
this.testfile... |
const AuthPage = require( '../pages/auth.js' );
const assert = require( 'assert' );
let auth = new AuthPage();
describe( '5. Register failures', function() {
before( async () => {
await auth.load( false );
} )
it( 'it should show the register widget', async () => {
assert( await auth.$( '.register-form... |
'use strict';
var rmdir = require('rimraf'),
gulp = require('gulp-help')(require('gulp')),
rename = require('gulp-rename'),
mocha = require('gulp-mocha'),
concat = require('gulp-concat'),
bump = require('gulp-bump'),
wrap = require('gulp-wrap'),
jsdoc2md = require('gulp-jsdoc-to-markdown'),
filter = r... |
import { useEffect } from '@storybook/client-api';
import { pagination } from './pagination';
import { markdownDocumentationLinkBuilder } from '../../storybook-utilities/markdownDocumentationLinkBuilder';
export default {
title: 'Components/Pagination',
decorators: [(story) => `<div class="sprk-o-Box">${story()}</... |
/*
* grunt-assemble-handlebars-module-exporter
*
*
* Copyright (c) 2016 Wehe, Tino
* Licensed under the MIT license.
*/
'use strict';
var config = require('./grunt-tasks/config');
module.exports = function(grunt) {
require('jit-grunt')(grunt);
require('time-grunt')(grunt);
var configs = require('load-grunt... |
/**
* CloudEmotion API v1
* CrowdEmotion API
*
* OpenAPI spec version: 1.1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License... |
import { createCanvasEvent as canvasEvent } from '../../../util/MockEvents';
/* global sinon */
import {
bootstrapDiagram,
inject
} from 'test/TestHelper';
import dragModule from 'lib/features/dragging';
import scrollModule from 'lib/features/auto-scroll';
describe('features/auto-scroll - AutoScroll', function... |
var emotify = require ( process.argv[2])
console.log( emotify ('just testing') )
|
/* eslint-env jest */
/* @flow */
import { compose, callMiddleware } from '../index';
describe('compose', () => {
const defaultRequest = {};
const defaultResponse = {};
const defaultContinueFn = () => Promise.resolve(defaultResponse);
describe('empty brigade', () => {
const emptyBrigade = [];
it('sh... |
/**
* @file mip-onga 组件
* @author
*/
define(function (require) {
var ga;
var $ = require('jquery');
require('https://c.mipcdn.com/static/v1/mip-jzbga/mip-jzbga.js');
var customElement = require('customElement').create();
/**
* 构造元素,只会运行一次
*/
customElement.prototype.firstInviewCall... |
import React from "react";
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
const ParamsExample = () => (
<Router>
<div>
<h2>Accounts</h2>
<ul>
<li>
<Link to="/netflix">Netflix</Link>
</li>
<li>
<Link to="/zillow-group">Zillow Group<... |
jQuery(document).ready(function($) {
$('.box-header button').bind('click', function() {
document.location.href = $(this).attr('value');
});
}); |
describe('Main controller', function () {
var vm, repo, $rootScope, $scope;
beforeEach(module('test-app'));
beforeEach(inject(function ($injector) {
$rootScope = $injector.get('$rootScope');
$scope = $rootScope.$new();
repo = {
getCommits: sinon.promise(),
getPulls: sinon.promise()
};... |
angular.module('mapingoApp').config(['$locationProvider', '$routeProvider',
function config($locationProvider, $routeProvider) {
$locationProvider.hashPrefix('!');
$routeProvider.when('/about', {
template: '<about></about>'
}).when('/manage-store', {
template: '<mana... |
/*
* grunt-bundle-jsnext-lib
* https://github.com/caridy/grunt-bundle-jsnext-lib
*
* Copyright (c) 2014 Caridy Patino
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
... |
import { PromiseState } from 'react-refetch';
import extend from 'extend';
const prefix = 'reflorp/';
const reducer = (state = {}, action) => {
switch (action.type) {
case prefix + 'RESET':
return {};
case prefix + 'UPDATE':
if (typeof action.data !== 'undefined') {
const newState = exte... |
//set the login and pw as global variables
var login = $('.username').text;
var pw = $('.password').text;
//load the document
$(document).ready(function() {
//on click of the sign in button, load the login in modal and hide the lost and register forms
$('.sign-in').click(function() {
$('#sign-in-modal'... |
import React from 'react'
export class Conner extends React.Component {
constructor(props) {
super(props);
this.state = {
};
}
render() {
return (
<div className="mainPanel">
CKINENWOSDFN
</div>
);
}
}
|
ht.graph.GridPainter = function(graphView) {
this._gv = graphView;
};
ht.Default.def(ht.graph.GridPainter, Object, {
draw: function(g, rect) {
var self = this,
gv = self._gv,
defaultPhysicalGap = 20,
zoom = gv.getZoom(),
viewRect = !rect ? gv.getContentRec... |
import React from "react";
import { connect } from "react-redux";
import { Row, Col, Switch, Card } from "antd";
import { updateShowMissed, updateShowLang } from "../../actions";
class SFReleaseFilter extends React.Component {
constructor(props) {
super(props);
this.state = {
languages: ["en", "vi"],
... |
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var timeslotSchema = new Schema({
identifiant: {
type: String,
required: true
},
start_date: {
type: Date,
required: true,
default: Date.now
},
end_date: {
type: Date,
required: true,
... |
/*
* @Author: hilshire
* @Date: 2018-01-21 13:56:47
*/
let Tip = require("../models").Tip;
let TagArticleService = require('./TagArticle');
class TipService extends TagArticleService {
queryList(page, size) {
return this.model.findAll({
limit: size,
offset: (page - 1) * size,
... |
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');
var path = require('path');
var address = 'localhost';
var port = 8080;
var server = new WebpackDevServer(webpack(config),
{
https: false,
hot: true
});
// Important part. Sen... |
'use strict';
/**
* Route configuration for the RDash module.
*/
angular.module('Speck').config(['$stateProvider', '$urlRouterProvider', '$httpProvider', 'jwtInterceptorProvider', '$locationProvider', '$mdThemingProvider',
function($stateProvider, $urlRouterProvider, $httpProvider, jwtInterceptorProvider, $locati... |
const JSONRPC = {
Client: require("../Client")
};
/**
* Extend this class to link to extra master RPC APIs on workers.
*/
class MasterClient extends JSONRPC.Client
{
/**
* Signals to the master, that this worker's JSONRPC endpoint is ready to receive calls.
*
* @param {number} nWorkerID
*/
... |
//= link_tree ../images
//= link_directory ../javascripts .js
//= link_directory ../stylesheets .css
//= link adminka_manifest.js
|
const paths = require("../paths");
const gulp = require("gulp");
const templateCache = require("gulp-angular-templatecache");
gulp.task('buildAngularTemplateCache', function () {
return gulp.src('built/**/*.html')
.pipe(templateCache({
module: paths.angularModuleName,
root: ''
}))
... |
/**
* @scene Loading
*/
Crafty.scene('Loading', function(){
Crafty.load(['assets/sprite.png'], function(){
Crafty.sprite(32, 'assets/sprite.png', {
spr_tree: [0,0],
spr_flower: [1, 0],
spr_flowers: [2, 0],
spr_taobao: [0, 1]
});
Crafty.scene(... |
var args = process.argv.slice(2);
var decodeFlagFound = findDecodeFlag();
if (args.length < 1) {
printUsageAndExit();
}
var action = decodeFlagFound ? decode : encode;
var result = args.map(action);
console.log(result.join('\n'));
function findDecodeFlag() {
var index = args.indexOf('-d');
if (index >= 0) {
a... |
export const name = 'forecast';
export const apiConfig = {
id: 3833367,
name: 'Ushuaia',
units: 'metric',
APPID: 'b0fe630c819a6f05f7e19097e89aca5e'
};
export const forecast5Endpoint = 'http://api.openweathermap.org/data/2.5/forecast/city';
export const API_RESPONSE_TIMEOUT = 1000;
export const dateFormat = '... |
/**
* Simple re-export of frost-fixed-table in the app namespace
*/
export {default} from 'ember-frost-table/components/frost-fixed-table'
|
var _ = require('lodash');
module.exports = {
requiredHooks: [ 'generateClientToken' ]
} |
var
Node = require(process.cwd() + '/lib/Node'),
Notification = require(process.cwd() + '/lib/Notification')
;
exports['The Notification'] = {
'should create a xml node': function(test) {
var
node = new Node('root'),
notification
;
notification = new Notification('notification', null, 'some message', '... |
version https://git-lfs.github.com/spec/v1
oid sha256:88d19efb7e1f6c20b14d6ed82bc0523c7c48944494091aaac052dc81f8b6bbea
size 2358
|
version https://git-lfs.github.com/spec/v1
oid sha256:a89f4fa806ad9014f1db2a0390dc2a17851ba2b1e3fa6f4f3d37b34764ebe2a9
size 79403
|
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.process = process;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _changeCase = require('change-case');
var _changeCase2 = _interopRequireDefault(_changeCase);
var _less =... |
if (typeof print !== 'function') { print = console.log; }
function test() {
var buf = (ArrayBuffer.allocPlain || Duktape.Buffer)(31);
var i, j;
var arr;
var bufferToString = String.fromBuffer || String;
for (i = 0; i < buf.length; i++) {
buf[i] = i;
}
for (i = 0; i < 1e4; i++) {
... |
'use strict';
//Constructor function for Projects objects. Takes an object from userData array and makes it into new Project.
(function(module) {
function Project(opts) {
for (var key in opts) {
this[key] = opts[key];
}
}
//This will be out array of projects
Project.all = [];
//This function w... |
var Swarm = require('swarm');
var Message = Swarm.Model.extend('Message', {
defaults: {
text: ''
},
});
module.exports = Message;
|
import React from 'react';
import { shallow } from 'enzyme';
import { fromJS, Map } from 'immutable';
import ProductBadge, { Discount, Available } from '../../app/components/ProductBadge';
const productInfo = fromJS({
name: 'name',
code: 'code',
slug: 'slug',
productDetail: {
descriptionType: 'description... |
'use strict';
var grunt = require('grunt');
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
Test methods:
test.expect(numAssertions)
test.done()
Test assertions:
test.ok(value, [message])
test.equal(actual, expected, [message])
test.notEqual(actua... |
'use strict';
describe('Directive: amdLogin', function () {
// load the directive's module
beforeEach(module('angularMaterialDesignApp'));
var element,
scope;
beforeEach(inject(function ($rootScope) {
scope = $rootScope.$new();
}));
it('should make hidden element visible', inject(function ($com... |
'use strict';
/**
* YYYY-MM → Date
* @param {String} str Valid date string
* @return {Object} Date
*/
function convertToDate (str) {
var pieces = str.split('-');
return new Date(parseInt(pieces[0], 10), parseInt(pieces[1], 10) - 1);
}
module.exports = {
/**
* Legit dates:
* YYYY-MM
* YYYY-M
... |
module.exports = function(config, mongoose, models, modelName) {
mongoose.set('debug', true);
var CommentSchema = new mongoose.Schema({
_id: { type: Number, required: true, unique: true },
// Auxiallary ID of the document
obj_id: { type: mongoose.Schema.ObjectId, unique: true },
// ### tim... |
'use strict';
const path = require('path'),
nodemailer = require('nodemailer'),
EmailTemplate = require('email-templates').EmailTemplate,
fs = require('fs-extra'),
hbs = require('handlebars'),
{ plainText: sanitizeText, html: sanitizeHtml } = require(path.resolve('./services/text'));
con... |
/*! bigSlide - v0.5.0 - 2014-09-12
* http://ascott1.github.io/bigSlide.js/
* Copyright (c) 2014 Adam D. Scott; Licensed MIT */
/*! bigSlide - v0.4.3 - 2014-01-25
* http://ascott1.github.io/bigSlide.js/
* Copyright (c) 2014 Adam D. Scott; Licensed MIT */
(function($) {
'use strict';
$.fn.bigSlide = function(option... |
var app = angular
.module('myApp', [
'ngRoute',
'HomeController',
'DbConnect',
'DatabaseSelector',
'Breadcrumbs',
'ActionBar',
'TableActions',
'TableSelector'
]);
app.config(configFunction);
function configFunction($routeProvider){
$routeProvider
.when('/', {
templateUrl: './partials/home.htm... |
import $ from 'jquery';
import computed from 'ember-computed';
import Component from 'ember-component';
import injectService from 'ember-service/inject';
export default Component.extend({
weather: null,
locations: injectService(),
photographer: computed.readOnly('weather.photographer'),
saved: computed('loca... |
var searchData=
[
['section',['section',['../class_e_l_f_i_o_1_1section.html',1,'ELFIO']]],
['section_5fimpl',['section_impl',['../class_e_l_f_i_o_1_1section__impl.html',1,'ELFIO']]],
['sections',['Sections',['../class_e_l_f_i_o_1_1elfio_1_1_sections.html',1,'ELFIO::elfio']]],
['segment',['segment',['../class_e... |
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
res.locals.index = "index";
res.render('index');
});
module.exports = router;
|
var gulp = require('gulp');
var runSequence = require('run-sequence');
gulp.task('default', function (callback) {
return runSequence(
'lint',
'build',
'test',
callback
);
});
|
#pragma strict
private var warp: Transform;
function Start () {
warp = GameObject.FindWithTag("Warp").GetComponent(Transform) as Transform;
warp.position = transform.position;
}
function Update () {
if (Input.GetKey(KeyCode.Alpha5))
{
warp.position = transform.position;
}
if (Input.GetKey(KeyCode.Alpha7))... |
var T = require ( "Tango" ) ;
var NEvent = require ( "NEvent" ) ;
var Client = require ( "./gp/Client" ) ;
var gpclient = new Client() ;
gpclient.on ( 'error', function gpclient_on_error ( e )
{
console.log ( e ) ;
});
var text = T.getProperty ( "text", "" + new Date() ) ;
var e = new NEvent ( "notify" ) ;
e.body ... |
'use strict';
var log = require('debug')('temply:cms-data-tickets');
var config = require('../../config/config')();
// @see http://mongodb.github.io/node-mongodb-native/2.1/getting-started/quick-tour/
var MongoClient = require('mongodb').MongoClient,
assert = require('assert');
/**
* Returns ticket using MongoDb
... |
(function(){
angular.module('starter')
.controller('RoomController', ['$scope', '$state', 'localStorageService', 'SocketService', 'moment', '$ionicScrollDelegate', RoomController]);
function RoomController($scope, $state, localStorageService, SocketService, moment, $ionicScrollDelegate){
var me = this;
me.me... |
version https://git-lfs.github.com/spec/v1
oid sha256:c3cf949023e575258e19e42243c33af3b9ab940e4b28c985bf9bec73091de840
size 849
|
const Flint = require('../../../index.js')
const mongoose = require('mongoose')
describe('createAdminUserGroup', () => {
let UserGroup
let createAdminUserGroup
beforeAll(async () => {
const flintServer = new Flint({ templatePath: 'test/fixtures/templates/empty', listen: false })
await flintServer.startS... |
const test = require("tape")
const merge = require("./index")
test("SET", (t) => {
t.plan(2)
t.deepEqual(
merge({ x: 42 }),
{
UpdateExpression: "SET x = :x",
ExpressionAttributeValues: { ':x': 42 }
}
)
t.deepEqual(
merge({ x: { y: "foo", z: { w: 42 } }, q: 0 }),
{
Update... |
/*
* noVNC: HTML5 VNC client
* Copyright (C) 2018 The noVNC Authors
* Licensed under MPL 2.0 (see LICENSE.txt)
*
* See README.md for usage and integration instructions.
*/
import * as Log from './util/logging.js';
import Base64 from "./base64.js";
import { supportsImageMetadata } from './util/browser.js';
expor... |
/**
* Created by Ray on 2017/7/11.
*/
const timeThunk = require('../src/clousure/time-chunk')
const sinon = require('sinon')
const assert = require('chai').assert;
describe('timeThunk', function () {
it('should be timeThunk', function () {
const clock = sinon.useFakeTimers();
const spy = ... |
(function () {
'use strict';
describe('Drinks Route Tests', function () {
// Initialize global variables
var $scope,
DrinksService;
//We can start by loading the main application module
beforeEach(module(ApplicationConfiguration.applicationModuleName));
// The injector ignores leading a... |
declare module "immutable" {
declare class List<T> {
static <T>(array?: Array<T>): List<T>;
size: number;
set(value: T): List<T>;
get(index: number): T;
first(): T;
last(): T;
count(): number;
push(...values: T[]): List<T>;
delete(index: number): List<T>;
clear(): List<T>;
... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (tasks, concurrency, callback) {
if (typeof concurrency === 'function') {
// concurrency is optional, shift the args.
callback = concurrency;
concurrency = null;
}
callback =... |
var ca = require('../client_action').factory;
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
/**
* Perform a [bulk](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/docs-bulk.html) req... |
'use strict';
const path = require('path');
//const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const webpack = require('webpack');
module.exports = {
entry: [
'react-hot-loader/patch',
'webpack-dev-server/client?http://loca... |
// game_instance
gamePlayer = function(player_instance) {
this.player_instance = player_instance;
//Set up initial values for our state information
this.pos = { x:0, y:0 };
this.vel = { x:0, y:0 };
this.size = { x:12, y:12, hx:12, hy:12 };
this.rot = 0;
this.state = 'not-connected';
... |
import * as actionTypes from '../constants';
import * as actions from '../actions';
describe('actions', () => {
describe('MODAL_SHOW', () => {
it('should create an action to show a modal', () => {
const expectedAction = {
type: actionTypes.MODAL_SHOW,
id: 'modal',
props: { a: 1, b: ... |
/**
* Every object can be serialized to json
**/
!function (exports) {
'use strict';
var toString = Object.prototype.toString,
slice = Array.prototype.slice,
objType = function (obj) {
return toString.call(obj).match(/\[object ([a-zA-Z]+)\]/)[1];
};
function textOmit... |
//inspired from: http://www.michaelbromley.co.uk/blog/350/exploring-es6-classes-in-angularjs-1-x#_section-directives
import template from './<%= name %>.html';
class <%= name %>Directive {
/*@ngInject*/
constructor() {
this.template = template;
this.restrict = 'E';
this.controller = '<%= upCaseName ... |
var color = "red";
var speed = 10;
var drive = "go";
var car = {
color,
speed,
[drive]: function() {
console.log("vroom");
}
};
console.log(car.color);
console.log(car.speed);
car.go();
|
import * as React from 'react';
import { expect } from 'chai';
import { createClientRender } from 'test/utils';
import CssBaseline from '@material-ui/core/CssBaseline';
import { ThemeProvider, createMuiTheme } from '@material-ui/core/styles';
describe('<CssBaseline />', () => {
const render = createClientRender();
... |
// import piano from '../../src/piano';
//
// describe('piano', () => {
// describe('Greet function', () => {
// beforeEach(() => {
// spy(piano, 'greet');
// piano.greet();
// });
//
// it('should have been run once', () => {
// expect(piano.greet).to.have.been.calledOnce;
// });
//... |
import {compose} from 'compose'
import {connect} from 'store'
import {initializeRecipe} from './recipe'
import {map, of, tap} from 'rxjs'
import {selectFrom} from 'stateUtils'
import React from 'react'
import _ from 'lodash'
import actionBuilder from 'action-builder'
import api from 'api'
import guid from 'guid'
let c... |
/*!
Product Name: dhtmlxSuite
Version: 4.6
Edition: Standard
License: content of this file is covered by GPL. Usage outside GPL terms is prohibited. To obtain Commercial or Enterprise license contact sales@dhtmlx.com
Copyright UAB Dinamenta http://www.dhtmlx.com
*/ |
/*global describe, expect, fallback, it*/
describe('tests.unit.core.log', function() {
it('should be a function', function() {
expect(fallback.log).to.be.a('function');
});
it('to always return a Boolean', function() {
var test = fallback.log();
expect(typeof test).to.equal('boolean');
});
fallback.each(f... |
'use strict';
/**
* @ngdoc overview
* @name birminghamParcourApp
* @description
* # birminghamParcourApp
*
* Main module of the application.
*/
angular
.module('birminghamParcourApp', [
'ngAnimate',
'ngCookies',
'ngMessages',
'ngResource',
'ngRoute',
'ngSanitize',
'ngTouch',
'l... |
describe('Component', function() {
var Component = requireFromSrc('effervescent/component');
var component = null;
beforeEach(function() {
component = new Component();
});
it('has a name', function() {
return expect(component.name).to.be.a('string');
});
it('has an addedToState callback', funct... |
"use strict";
var keymirror = require("react/lib/keyMirror");
module.exports = keymirror({
EXISTING: null,
NEW: null,
NONE: null
}); |
/*
Learning ghost model against the AggressiveGhosts controller, using 5 iterations of learning and pretrained weights.
*/
nodeExpansionThreshold = 30;
maximumSimulationLength = 250;
simulationCount = 1000;
pacManModel = new RandomNonRevPacMan();
ghostModel = new NeuralNetworkGhostController(new RouletteMoveSelection... |
import Ember from "ember";
/**
* Entry to disable/enable column based on value of another.
*
* @class EmberForm.DisableForColumn
* @module ember-form
*/
export default Ember.Object.extend({
/**
* Unique identification of the column to enable/disable
*
* @property name
* @type String
* @required
... |
//fidel-template.test.js
suite('fidel-template', function() {
beforeEach(function() {
$('#fixture').html('<div class="widget"></div><div class="widget2"></div>');
});
test('exists', function() {
assert.equal(typeof Fidel.prototype.render, 'function');
});
test('render template with id', functio... |
var Login = require('./lib/Login')
// config
var router = require('./config/router')
var Auth = {
Login: Login,
config: {
router: router
}
}
module.exports = Auth;
|
var fs = require('fs');
var path = require('path');
var http = require('http');
var server = http.createServer();
server.listen(9200, '127.0.0.1', function () {
console.log('analyse server ready on http://localhost:9200');
});
var datamap = require('../../test/reallife/datamap.json');
function stateContext(state... |
export const CART_INQUIRY_GET_REQUEST = 'CART_INQUIRY_GET_REQUEST';
export const CART_INQUIRY_GET_SUCCESS = 'CART_INQUIRY_GET_SUCCESS';
export const CART_INQUIRY_GET_FAILURE = 'CART_INQUIRY_GET_FAILURE';
export const CART_SET_CART_REDIRECT_ID= 'CART_SET_CART_REDIRECT_ID';
export const CART_REMOVE_CART_REDIRECT_ID= 'CA... |
module.exports = {
amd: {
src: [
'tmp/<%= pkg.name %>/**/*.amd.js',
'tmp/<%= pkg.name %>.amd.js'
],
dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.amd.js',
options: {
banner: '/**\n' +
' @class RSVP\n' +
' @module RSVP\n' +
' */\n'
}
... |
define(['../class', './visualizer'], function (Class, Visualizer) {
/**
* A Rectangle visualizer.
*
* @constructor
* @class Grape.Rectangle
* @uses Grape.Visualizer
* @param {Object} [opts] Initial values of properties
*/
return Class('Rectangle', Visualizer, {
init: f... |
...
let p = new TrackablePromise((resolve, reject, notify) => {
function countdown(x) {
if (x > 0) {
notify(`${20 * x}% remaining`);
setTimeout(() => countdown(x - 1), 1000);
} else {
resolve();
}
}
countdown(5);
});
p.notify((x) => setTimeout(console.log, 0, 'progress:', x));
... |
import chai from 'chai';
import { assert } from 'chai';
import { is, Schema, Type, State } from '../src';
import { ValidationError, RequirementError } from '../src/error';
describe('Schema', () => {
describe('regular declaration', () => {
it('initialization', () => {
const schemaA = new Schema('CellSchem... |
/**
* Created by dcreey on 8/23/2016.
*/
module.exports = function (request, reply) {
var context = {
pageTitle: 'Temperature'
};
reply.view('temperature', context);
}; |
//Test for Email Validator
jest.dontMock('../EmailValidator.js');
describe('Email Validator', function () {
var emailValidator = require('../EmailValidator');
it('is not valid when it is not null', function() {
expect(emailValidator.isValid()).toEqual(false);
});
it('is not valid when it is empty', fu... |
import React from 'react';
function Card(props) {
return (
<div className="card">
<div className="image">
<img className="actual-image" src={props.image} role="presentation"/>
<span className="title">{props.title}</span>
</div>
<div className="content">
<p>{props.content... |
'use strict';
angular.module('myApp.view2', ['ngRoute'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/view2', {
templateUrl: 'view2/view2.html',
controller: 'View2Ctrl',
resolve: {
streams: function (twitchStreams) {
... |
version https://git-lfs.github.com/spec/v1
oid sha256:76bfcd0997ea2c66ab993fe1f06fa4276381d41974bd0b5a8cc312427409b71e
size 2107
|
angular.module('IMPERIUM').controller('registrarUsuarioController', ['$scope', 'crudUsuarioService', 'rolAdmin', 'rolCelador', '$timeout', function ($scope, crudUsuarioService, rolAdmin, rolCelador, $timeout) {
cargarTabla();
$scope.datosusu = {};
$scope.usuel = {};
$scope.modalact = false;
$scope.... |
angular.module("myApp")
.controller("SignInCtrl", ["$scope", "$rootScope", "$state", "$meteor", function($scope, $rootScope, $state, $meteor){
$scope.alerts = [];
$scope.closeAlert = function(index) {
$scope.alerts.splice(index, 1);
};
$scope.user={
email:"",
password:""
};
$scope.verifyPasswo... |
(function (app) {
if (typeof _ === 'undefined') {
return false;
}
app.core = (function () {
var componentCollection = {}, utils = app.utils, timeOut;
return {
component: function (componentName, callbackArr) {
var runCondition = null,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.