code stringlengths 2 1.05M |
|---|
/* @flow */
import { types as tt } from "../tokenizer/types";
import Parser from "./index";
import { reservedWords } from "../util/identifier";
const pp = Parser.prototype;
// Convert existing expression atom to assignable pattern
// if possible.
pp.toAssignable = function (node, isBinding) {
if (node) {
swit... |
/**
* Module dependencies.
*/
var request = require('superagent');
var Collection = require('collection');
var noop = function(){};
/**
* Construct a url to the given `path`.
*
* Example:
*
* User.url('add')
* // => "/users/add"
*
* @param {String} path
* @return {String}
* @api public
*/
exports.... |
'use strict';
angular.module('mean.vmiorders').config(['$stateProvider',
function($stateProvider) {
$stateProvider.state('vmiorders example page', {
url: '/vmiorders/example',
templateUrl: 'vmiorders/views/index.html'
})
.state('vmi build order page', {
url: '/vmiorders/build-order',
... |
const path = require('path');
module.exports = (adapters = new Map()) => filePath => {
let adapter;
const extension = path.extname(filePath).replace(/^\./, '');
// Find the right adapter to use
for (const a of adapters.values()) {
if (a.extensions.includes(extension)) {
adapter = a;
break;
... |
require([
'app', //main app
'module/router', //main router
'module/config', //config
'module/models' //models
],
function(app, Router, Config, Models) {
/*
|--------------------------------------------------------------------------
| get some data first to play with;
*/
'use strict';
app.new... |
(function (angular) {
"use strict";
/**
* @ngdoc directive
* @name multiStepForm:formStepValidity
*
* @restrict A
* @description Notify the multi step form instance of a change of validity of a step.
* This directive can be used on a form element or within a form.
*
* @ngInject
*/
functio... |
import request from 'supertest';
import jwt from 'jsonwebtoken';
import httpStatus from 'http-status';
import chai, { expect } from 'chai';
import app from '../../../index';
import config from '../../../config/config';
describe('## Misc', () => {
describe('# GET /', () => {
it('should return OK', (done) => {
... |
import { factory } from '../../../utils/factory'
import { DimensionError } from '../../../error/DimensionError'
const name = 'algorithm07'
const dependencies = ['typed', 'DenseMatrix']
export const createAlgorithm07 = /* #__PURE__ */ factory(name, dependencies, ({ typed, DenseMatrix }) => {
/**
* Iterates over S... |
'use strict';
// Production specific configuration
// =================================
module.exports = {
// Server IP
ip: process.env.OPENSHIFT_NODEJS_IP ||
process.env.IP ||
undefined,
// Server port
port: process.env.OPENSHIFT_NODEJS_PORT ||
process.env.PORT |... |
import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdBlurCircular(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M20 18c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6-7c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45... |
window.pdfMake = window.pdfMake || {}; window.pdfMake.fonts = {"Rye":{"normal":"Rye-Regular.ttf","bold":"Rye-Regular.ttf","italics":"Rye-Regular.ttf","bolditalics":"Rye-Regular.ttf"}}; |
// ac.js --- Auto-complete candidate generator for Node.js
// Copyright (C) 2013 Maokai Lin
// Version: 0.1
// Keywords: Node.js Auto-complete Emacs
// Author: Maokai Lin <Maokai.Lin@gmail.com>
// URL: https://github.com/MaokaiLin/node-ac
// This file is NOT part of GNU Emacs.
// This program is free software; you ... |
$(function () {
$("tr").each(function (index, val) {
var $val = $(val);
var $td = $val.find("td:eq(6)")
var $origA = $td.find("a:eq(1)");
if ($origA.length <= 0) {
return;
}
var $a = $origA.clone();
var idArray = $a.attr("href").match(/id=(\d+)/);
... |
'use strict';
const validate = require('./validate'),
_ = require('lodash'),
assert = require('assert'),
schema = {
properties: {
event: {
type: 'string',
required: true,
allowEmpty: false
},
onEvent: {
... |
var mongodb = require('./db');
function User(user) {
this.name = user.name;
this.password = user.password;
this.nickname = user.nickname;
this.email = user.email;
this.record = 0;
};
module.exports = User;
//存储用户信息
User.prototype.save = function (callback) {
//要存入数据库的用户文档
var user = {
... |
// Creates a mock backend with 3 todos
import { todoFixture } from "//unpkg.com/can-demo-models@5/index.mjs";
todoFixture(3);
import { Component, realtimeRestModel } from "//unpkg.com/can@5/core.mjs";
const Todo = realtimeRestModel("/api/todos/{id}").Map;
Component.extend({
tag: "todos-app",
view: `
<h1>Today’s ... |
import { fromJS } from 'immutable';
import { randomId } from './utils';
import {
addNode,
moveNode,
deleteNode,
setNodeInletsPositions,
updateNodeMetadata
} from './nodes';
import {
dragEdge,
dragEdgeDone,
deleteEdge
} from './edges';
import {
updateWindowSize
} from './window-size';
import {
se... |
const { expect } = require('chai');
const sinon = require('sinon');
require('sinon-mongoose');
const Story = require('../../app/models/Story');
describe('Story Model', () => {
it('should create a new story', (done) => {
const StoryMock = sinon.mock(new Story({ title: 'Story test'}));
const story = St... |
var _ = require('underscore');
var sourcemap = require('source-map');
var buildmessage = require('../utils/buildmessage.js');
var watch = require('../fs/watch.js');
var Profile = require('../tool-env/profile.js').Profile;
import assert from 'assert';
import LRU from 'lru-cache';
import {sourceMapLength} from '../utils/... |
import Reflux from 'reflux';
export default {
PeopleActions: Reflux.createActions([
'addPerson',
'addRandomPerson',
'removePerson']),
PersonActions: Reflux.createActions([
'setProps',
'savePerson',
'loadPersonWithId',
'deletePerson'])
}
|
/**
* Implement Gatsby's Node APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/node-apis/
*/
// You can delete this file if you're not using it
/**
* Implement Gatsby's Node APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/node-apis/
*/
// You can delete this file if you're not using it
co... |
var should = require('chai').should(),
mtdb = require('../index');
describe('Individual Card Functions', function() {
it ('Gets a single card by ID, and its associated image', function(done) {
mtdb.getSingleCard(380449, function(cardObject) {
cardObject.cardImage.should.have.string(cardObject.cardData.id);
c... |
import flatten from './flattenArray';
describe('flattenArray', function () {
it(`should be defined`, function () {
expect(typeof flatten).toBe('function');
});
it(`should throw an error if anything but an array is passed`, function () {
expect(function () {
flatten()
}).toThrow('Only an array ... |
module.exports = function (grunt) {
grunt.registerTask('test', [
'jshint:test',
'karma:test'
]);
grunt.registerTask('test:travis', [
'jshint:test',
'karma:travis'
]);
};
|
import {
bootstrapDiagram,
getDiagramJS,
inject
} from 'test/TestHelper';
import TestContainer from 'mocha-test-container-support';
import { merge } from 'min-dash';
import {
queryAll as domQueryAll
} from 'min-dom';
import {
attr as svgAttr,
classes as svgClasses
} from 'tiny-svg';
import { getChildre... |
'use strict'
/* global ss, Davis, JT, $, $CONTAINER, apprise */
// PRIVATE GAME VARS
var _stepNumber = 0
var _stats = null
var _displayTimeout = null
// PUBLIC EXPORTS
var $game = module.exports = {
// GLOBAL GAME CONSTANTS
VIEWPORT_WIDTH: 30,
VIEWPORT_HEIGHT: 15,
TOTAL_WIDTH: 142,
TOTAL_HEIGHT: 132,
TIL... |
import React, { Component, PropTypes } from 'react';
import styles from '../../../build/styles';
import { getCallbacks } from './../../helper/helper';
export default class MediaLeft extends Component {
static propTypes = {
style: PropTypes.object,
children: PropTypes.any,
className: PropTypes.string,
}... |
'use strict';
app.controller('ManageLoginsCtrl', ['$scope', 'authorize', 'auth', 'profile', 'redirect', 'notifier', function ($scope, authorize, auth, profile, redirect, notifier) {
$scope.isLocalUser = authorize.getUser().isLocalUser;
$scope.setPassword = function setPassword(credentials) {
if (!chec... |
var addField = function( field_type )
{
var parameters = field_type.split( '_' );
var field = ( field_type.match( /file/i ) ) ? document.createElement( "input" ) : document.createElement( "textarea" );
var fieldset = document.getElementById( parameters[ 0 ] + "s" );
var label = document.createElement( "label" );
... |
var run = require('./run');
var test = require('tape');
test('division', function(t) {
var r = run(t, function() {
"use rat"
var a = b/c;
}, function() {
var rat_div = require('rat-vec/div');
var a = rat_div(b, c);
});
t.end();
});
test('division rat vs constant (denominator)', function(t) {
... |
"use strict";
var Wink = require("../lib");
var apiCredentials = require("./credentials");
var wink = new Wink(apiCredentials);
wink.on("ready", function() {
var light1 = wink.getDeviceByName("WinkPresentationLight1");
var light2 = wink.getDeviceByName("WinkPresentationLight2");
var lightOn = function(l... |
/**
* Created by JamesZhang on 2017/6/17.
*/
import React from 'react'
import ReactDOM from 'react-dom'
import {HashRouter as Router} from 'react-router-dom'
import Hello from './components/hello'
import './assets/styles/hello.less'
ReactDOM.render(
<Router>
<Hello/>
</Router>,
document.getElementById('a... |
(function () {
'use strict';
var async = require('async');
var request = require('request');
var fs = require('fs');
var fsExtra = require('fs-extra');
var exec = require('child_process').exec;
var path = require('path');
var archiver = require('archiver');
var _ = require('undersco... |
'use strict';
import http from 'http';
import crypto from 'crypto';
export default class Api {
constructor() {
this.init();
}
init (boards = {}, rulesets = {}) {
this.boards = boards;
this.rulesets = rulesets;
}
isEmail (str) {
return str.match(/^(?:[\w\!\#\$\%\&\... |
export const getGraphQL = (payload, variables, onSuccess, onError) => {
onSuccess = onSuccess || ((a) => a)
return (dispatch) => {
onError = onError || ((a) => dispatch(apologize(a)))
return new Promise((resolve) => {
let request = new XMLHttpRequest()
request.open('POST'... |
var Actions = {
SET_THEME: 'SET_THEME',
DAY: 'DAY',
NIGHT: 'NIGHT',
setTheme: (theme) => {
return {
type: Actions.SET_THEME,
theme
}
}
}
module.exports = Actions |
import * as Types from 'store/mutation-types';
import { getLanguage } from 'api';
import { getTrending } from 'api';
export const setShowNav = function ({ commit }, { isShow }) {
commit(Types['SET_SHOW_NAV'], {
isShow
});
};
export const setCurrentLan = function ({ commit }, { currentLan }) {
comm... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
const async = require('async');
const bCrypt = require('bcrypt-nodejs');
const user_data = require('./user_data');
let normalUsers = Object.keys(user_data).map((key) => {
user_data[key].userInfo.password = bCrypt.hashSync('12345' , null , null);
return user_data[key];
});
// 5k, 10k, 20k, 50k, 100k, 150k, 200... |
angular.module('starter.controllers', [])
.controller('DashCtrl', function($scope) {})
.controller('ChatsCtrl', function($scope, Chats) {
// With the new view caching in Ionic, Controllers are only called
// when they are recreated or on app start, instead of every page change.
// To listen for when this page i... |
(function() {
var Client, Game, MoveParser, http, max_value, square, square_sides, util;
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
Game = require('game');
MoveParser = require('move_parser');
square = require('square').square;
square_sides = require('square').sq... |
$('#shorten').click(function() {
var raw_url = $('#url').val();
if (validator.isURL(raw_url, {require_protocol: true})) {
var url = encodeURIComponent(raw_url);
$.getJSON(
'shorten?url=' + url,
function (data) {
if (data.status == 1) {
... |
ActLike={CONST:"actlike",ATTR:"iam",go:function(){var e,f;e="function"===typeof document.querySelectorAll?document.querySelectorAll("*["+ActLike.CONST+"]"):document.getElementsByTagName("*");f=[];for(var a,g=0;null!=(a=e[g]);g++){var b=a.getAttribute(ActLike.CONST);if(b){for(var d=b.split("."),c=window;0<d.length;)c=c[... |
import VFormComponent from 'ember-v-form/components/v-form';
export default VFormComponent;
|
import { module } from 'substance-test'
import documentHelpers from '../../model/documentHelpers'
import fixture from '../fixtures/createTestArticle'
import simple from '../fixtures/simple'
import containerAnnoSample from '../fixtures/containerAnnoSample'
const test = module('model/documentHelpers')
test("Get text f... |
'use strict';
var config = require('./config');
var $ = require('gulp-load-plugins')();
var gulp = require('gulp');
var path = require('path');
gulp.task('other', function() {
var fileFilter = $.filter(function(file) {
return file.stat.isFile();
});
return gulp.src([
path.join(config.paths.src, '/**/*... |
/* global describe, it, beforeEach, afterEach, before, after */
// The Unit
const iter = require('./iter');
const db = require('georap-db');
const config = require('georap-config');
const dropCollections = require('./dropCollections');
// Enable should api
// eslint-disable-next-line no-unused-vars
const should = req... |
#!/usr/bin/env node
'use strict'
const fs = require('fs')
const shelljs = require('shelljs')
const browserify = require('browserify')
const catSourceMap = require('cat-source-map')
const yieldCallback = require('yield-callback')
const utils = require('../lib/utils')
const logger = require('../lib/logger').getLogge... |
/**
* ExtJS/Touch plugin used to register component with LocaleManager.
*/
Ext.define('nineam.localization.LocalePlugin', {
/**
* Extend configuration object for managing differences between ExtJS and ST2.
*
* This object is handled by the extendConfig preprocessor.
*
* @private
*/
... |
/**
* Wheel, copyright (c) 2019 - present by Arno van der Vegt
* Distributed under an MIT license: https://arnovandervegt.github.io/wheel/license.txt
**/
const dispatcher = require('../../../../lib/dispatcher').dispatcher;
const Editor = require('../Editor').Editor;
exports.TextEditor = class extends Editor {
... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm-2-9c-4.97 0-9 4.03-9 9H0l4 4 4-4H5c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.51 0-2.91-.49-4.06-1.3l-1.42 1.44C8.04 20.3 9.94 21 12 21c4.97 0 9-4.0... |
/**
* Pipedrive API v1
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* ... |
import cx from 'clsx';
import React from 'react';
import PropTypes from 'prop-types';
const GroupMention = ({ className, group }) => (
<span className={cx('ChatMention', `ChatMention--${group}`, className)}>
@{group}
</span>
);
GroupMention.propTypes = {
className: PropTypes.string,
group: PropTypes.strin... |
/*global define*/
define([
'jquery',
'underscore',
'backbone',
'facebook',
'markercluster',
'text!../templates/map/google_map.html',
'text!../templates/facebook/facebook_item.html',
'text!../api/db.json'
], function ($, _, Backbone, FB, Markercluster, MapTemplate, FacebookItemTemplate, ... |
var jsdom = require('jsdom');
var Path = require('path');
var URL = require('url');
var EventEmitter = require('events').EventEmitter;
var fs = require('fs');
var Step = require('step');
var format = require('util').format;
var fexists = fs.exists || Path.exists;
var Parser;
try {
Parser = require('html5');
} catch (... |
import { combineReducers } from 'redux';
import demo from './demo-reducer';
const rootReducer = combineReducers({
demo
});
export default rootReducer;
|
$(document).ready(function () {
$("#submit_btn").click(function () {
var old = $("#old").val();
var newp = $("#new").val();
var confirm = $("#confirm").val();
if (newp != confirm) {
$('#errorMessage').html('Пароли не совпадают');
$('#errorMessage').removeCl... |
// All code points in the `Pf` category as per Unicode v5.2.0:
[
0xBB,
0x2019,
0x201D,
0x203A,
0x2E03,
0x2E05,
0x2E0A,
0x2E0D,
0x2E1D,
0x2E21
]; |
// presenter js
var w = null;
$(function(){
w = window.open('/');
// side menu accordian crap
$("#preso").bind("showoff:loaded", function (event) {
$(".menu > ul ul").hide()
$(".menu > ul a").click(function() {
if ($(this).next().is('ul')) {
$(this).next().toggle()
} else {
gotoSlide($(this).attr... |
angular.module('KanboardCtrl')
.controller('ShowActivityController', function ($routeParams, $scope, navigation, dataFactory, $sce) {
$scope.$navigation = navigation;
$scope.project_id = $routeParams.projectId;
var api_id = parseInt($routeParams.api_id) + 1;
$sco... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
var _c... |
import Flux from '../flux';
import API from '../utils/API'
var LoginActions = Flux.createActions({
tokenAction: function(ak) {
API.callToken(ak, function (res, response) {
var token = response.body.Payload.Token;
console.log('response', token);
LoginActions.hasToken(to... |
app.directive('bubbleChart', ['$window', '$timeout', function ($window, $timeout) {
return {
restrict: 'E',
templateUrl: 'app/graphics/bubble-chart-view.html',
scope: {
containerName: '@',
bubbleChartData: '=',
onBubbleClick: '&'
},
link: functio... |
var Adapter = require("../lib/adapter");
describe("Adapter", function() {
it("should be a class", function() {
Adapter.should.be.a("function");
Adapter.prototype.constructor.should.equal(Adapter);
});
it("new operator should throw error", function() {
Adapter.should.throw(Error);
... |
(function() {
var extend = function(out) {
out = out || {};
for (var i = 1; i < arguments.length; i++) {
if (!arguments[i])
continue;
for (var key in arguments[i]) {
if (arguments[i].hasOwnProperty(key))
out[key] = argume... |
import ActionDispatcher from '../dispatcher/action-dispatcher';
import ViewDispatcher from '../dispatcher/view-dispatcher';
import TweetImageConstants from '../constants/tweet-image-constants';
export default class TweetImageAction {
constructor() {
ViewDispatcher.register((action) => {
switch(... |
/* */
"format cjs";
/*!
* AngularJS Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.4-master-75237c6
*/
(function( window, angular, undefined ){
"use strict";
/**
* @ngdoc module
* @name material.components.switch
*/
MdSwitch['$inject'] = ["mdCheckboxDirective", "$mdUtil", "$mdCon... |
b: while (1) { continue
a; } |
/**
* @fileoverview Prevent missing props validation in a React component definition
* @author Yannick Croissant
*/
'use strict';
// ------------------------------------------------------------------------------
// Requirements
// ------------------------------------------------------------------------------
var r... |
/**
* ProdEstr.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs :: http://sailsjs.org/#!documentation/models
*/
module.exports = {
attributes: {
units : {
model: 'unit'
},
programs: {
model: 'program'
},
... |
"use strict";
const ESLint = require( `eslint` ).CLIEngine;
const linter = new ESLint();
const report = linter.executeOnFiles( [ `${ __dirname }/../../` ] );
if ( report.errorCount || report.warningCount ) {
console.log( linter.getFormatter( `codeframe` )( report.results ) );
if ( report.errorCount ) {
... |
var ko = require('knockout');
var expect = require('chai').expect;
var Kavie = require('../src/kavie.js')
Kavie.validatorFunctions.asyncBool = {
async: true,
validator: function (propVal, eleVal, callback) {
setTimeout(function () {
callback(eleVal == "true");
}, propVal);
}
}
... |
'use strict';
var rules = {};
/**
* RULE: array-bracket-spacing
* Specifies the use of spacing within `[]`. See [array-bracket-spacing]{@link http://eslint.org/docs/rules/array-bracket-spacing}.
*/
rules[ 'array-bracket-spacing' ] = [ 2, 'always', {
'singleValue': true,
'objectsInArrays': false,
'arraysInArrays': ... |
jui.define("util.scale", [ "util.math", "util.time" ], function(math, _time) {
/**
* scale utility
* @class util.scale
* @singleton
*/
var self = {
/**
* 원형 좌표에 대한 scale
*
*/
circle : function() {// 원형 radar
var that = this;
var _domain = [];
var _range = [];
va... |
'use strict';
var should = require('should'),
request = require('supertest'),
app = require('../../server'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
Stoppage = mongoose.model('Stoppage'),
agent = request.agent(app);
/**
* Globals
*/
var credentials, user, stoppage;
/**
* Stoppage rout... |
var Constants = require('../Constants');
function MsgServerModeRequest(){
this.ownAddress = undefined;
this.reconnectionLogin = undefined;
};
MsgServerModeRequest.prototype.setOwnAddress = function setOwnAddress(value){
this.ownAddress = value;
};
MsgServerModeRequest.prototype.getOwnAddress = function getOwnAdd... |
import test from 'tape-catch';
import {deepEqual} from '@deck.gl/core/utils/deep-equal';
const TEST_CASES = [
{
a: {longitude: -70, latitude: 40.7, zoom: 12},
b: {longitude: -70, latitude: 40.7, zoom: 12},
output: true
},
{
a: {longitude: -70, latitude: 40.7, zoom: 12, position: [0, 0, 0]},
b... |
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import { uniqueId } from 'lodash';
import produce from 'immer';
import { defaultDataIdFromObject } from 'apollo-cache-inmemory';
import createDefaultClient from '~/lib/graphql';
import activeDiscussionQuery from './graphql/queries/active_discussion.query.graphq... |
/**
* Model spec for mvc
* @author yiminghe@gmail.com
*/
KISSY.add(function (S, MVC) {
var Model = MVC.Model,
View = MVC.View,
Router = MVC.Router;
describe("model", function () {
it("load works", function () {
var model = new Model({
urlRoot:"../data/m... |
(function() {
'use strict';
var DEBUG_MODE, QUIET_MODE, TaskRunner, argv, messageQueue, util;
TaskRunner = require('./taskRunner2');
util = require('util');
argv = require('yargs').usage('Usage: $0 [[-d] [-q]]').describe('d', 'Debug mode').describe('q', 'Quiet mode').alias('d', 'debug').alias('q', 'quiet')... |
const WorkerPlugin = require('worker-plugin')
module.exports = {
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
if (!isServer) {
config.plugins.push(
new WorkerPlugin({
// use "self" as the global object when receiving hot updates.
globalObject: 'sel... |
//var LindaCrowdsale = artifacts.require("./LindaCrowdsale.sol")
var LindaCrowdsale = artifacts.require('../contracts/LindaCrowdsale.sol')
var LindaPresale = artifacts.require('../contracts/LindaPresale.sol')
const duration = {
seconds: function (val) { return val},
minutes: function (val) { return val * this.sec... |
describe("Game", function() {
var game;
beforeEach(function() {
game = new Game();
});
it("should be able to recognise a number not divisible by 3", function() {
expect(game.isDivisibleByThree(1)).toEqual(false);
});
it("should be able to recognise a number which is divisible by 3", function() {
... |
function User(id) {
var id = id;
this.handle = "";
this.firstname = "";
this.lastname = "";
this.email = "";
this.getId = function()
{
return id;
}
};
describe("The test case", function () {
it("should work", function (done) {
var usr = new User(15);
expect... |
export {
default,
initialize,
} from 'ember-cli-addon-docs/initializers/route-anchor-jump';
|
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { List, ListItem } from 'material-ui/List';
import ToggleStar from 'material-ui/svg-icons/toggle/star';
import ToggleStarBorder from 'material-ui/svg-icons/toggle/star-border';
import Checkbox from 'material-ui/Checkbox';
// import ... |
import TestUtils from 'react-addons-test-utils'
import { bindActionCreators } from 'redux'
import { PostsView } from 'views/PostsView/index'
function shallowRender (component) {
const renderer = TestUtils.createRenderer()
renderer.render(component)
return renderer.getRenderOutput()
}
function renderWithProps (... |
var assert = require('assert');
var path = require('path');
var moduleName = path.basename(__filename).split('.')[0];
var csvWriter = require('../src/csv-writer');
var shouldReturn = 'should return: ';
describe(moduleName, function() {
describe('writeLine', function() {
describe('writes line of csv correc... |
const path = require('path');
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
},
module: {
rules: [
{
test: /\.css$/,
use: [
'style-loader',
'css-loader',
... |
version https://git-lfs.github.com/spec/v1
oid sha256:8116d13ffaa555b0f9c77d100bdda584ecb0e8e8c600ac5921fb252749e70cbf
size 48891
|
const webpack = require('webpack');
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const VENDOR_LIBS = [
'lodash', 'react', 'react-dom', 'react-redux', 'react-router', 'redux'
];
module.exports = {
entry: {
ap... |
var vava = (typeof hobbes !== 'undefined' && hobbes.vava) || require('../../vava');
exports.System = typeof require === 'function' ? require('./lang/system-node').System : require('./lang/system-web').System;
exports.Byte = new vava.env.VavaClass(
'Byte',
{
methods : [
new vava.env.VavaMethod(
'... |
/**
* Module dependencies.
*/
var env = process.env.NODE_ENV || 'development',
config = require('../../config/config')[env];
//DB
var Schema = require('jugglingdb').Schema;
schema = new Schema('<%= dbAdapter %>', {url: config.db});
var User = require('./user');
/**
* Article Schema
*/
var Article =... |
/*
* Copyright (c) André Bargull
* Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms.
*
* <https://github.com/anba/es6draft>
*/
const {
assertSame
} = Assert;
// 13.6.4.12 ForIn/OfExpressionEvaluation: Remove ToObject in step 8b
// https://bugs.ecmascript.org/show_bug.cgi?id=3625
... |
import Svgo from 'svgo';
import cheerio from 'cheerio';
import { format } from 'prettier';
import DEFAULT_ATTRS from '../src/default-attrs.json';
/**
* Process SVG string.
* @param {string} svg - An SVG string.
* @param {Promise<string>}
*/
function processSvg(svg) {
return (
optimize(svg)
.then(setAt... |
/*
* Copyright (c) 2014, Dr Daniel Naylor. Licenced under the MIT Licence.
*/
(function(){
"use strict";
var isNumber = function(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
};
var helpers = Chart.helpers;
Chart.types.Bar.extend({
name: "BarColoured",
initialize: functi... |
/**
* @fileoverview Rule to flag declared but unused variables
* @author Ilya Volodin
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils... |
window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments))}};
/*!
* jQuery plug-in to turn bootstrap tabbed navigation into responsive tabbed navigation
* Original author: @stephen_thomas
* Plugin Boilerplate: http://coding... |
/* jshint strict: true, undef: true, unused: true */
/* global define, window */
define([
], function(
) {
'use strict';
/*
* @author : 绝云(wensen.lws)
* @description : description
*/
return window.GLOBAL_VARIABLES.ipc;
});
|
/**
* Created by Paytham<caiyuhao2015@gmail.com> 2017/08/10 16:59
* 班级
*/
import { ApiUrl, fetch } from '../config/fetch'
/**
* 分页获取某机构的全部班级
* @param orgId
* @param queryString
* @param pageIndex
* @param pageSize
* @returns {*}
*/
export const getClassList = ({ orgId, queryString, pageIndex, pageSize }) => ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.