code stringlengths 2 1.05M |
|---|
/*! simpler-sidebar v1.4.9 (https://github.com/dcdeiv/simpler-sidebar)
** Copyright (c) 2015 - 2016 Davide Di Criscito
** Dual licensed under MIT and GPL-2.0
*/
( function( $ ) {
$.fn.simplerSidebar = function( options ) {
var cfg = $.extend( true, $.fn.simplerSidebar.settings, options );
return this.each( function... |
// Fill in topbar details.
$('header .right').append(Handlebars.templates.userTopbar(user));
// Fill in sidebar details.
user.created_at = moment(user.created_at).format('MMM DD, YYYY');
var userStars = {user: user, stars: stars};
$('aside').prepend(Handlebars.templates.userSidebar(userStars));
// Populate the organ... |
import { faker } from 'ember-cli-mirage';
import lodash from 'npm:lodash';
export const CONTAINER_MEMORY = 8023089152;
export function getPorts(isContainer=false) {
let ports = [];
for (let j = 1; j <= faker.random.number({ max: 3 }); j++) {
let obj = {
name: faker.hacker.noun(),
protocol: 'TCP',
... |
module.exports = function () {
return {
templateUrl : './shared/partials/footer/directives/footer.html',
controller: require('./footerCtrl'),
restrict: 'E',
scope: {}
};
};
|
import React from 'react';
import PropTypes from 'prop-types';
import ColumnChart from './columnChart';
import Tooltip from './../tooltip/tooltip';
import {dateFormats} from './../../utils/displayFormats';
import './columnWidget.css';
const ColumnWidget = ({
chartTitle,
chartDescription,
chartUpdatedDate,
... |
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import App from './containers/App';
import configureStore from './store/configureStore';
import 'todomvc-app-css/index.css';
const store = configureStore();
render(
<Provider store={store}>
<App />
</Provide... |
//
// window.onload = function() {
// var data = {username:'52200', password:'123', remember:52200};
// fetch('/api/users/getUser?id=1').then(function(res) {
// console.log("请求的数据是", res);
// if (res.ok) {
// alert('Submitted!');
// } else {
// alert('Error!');
//... |
Meteor.methods({
addAllUserToRoom(rid, activeUsersOnly = false) {
check (rid, String);
check (activeUsersOnly, Boolean);
if (RocketChat.authz.hasRole(this.userId, 'admin') === true) {
const userCount = RocketChat.models.Users.find().count();
if (userCount > RocketChat.settings.get('API_User_Limit')) {
... |
const HttpStatus = require('http-status-codes');
const build = status => {
return (ctx, message) => {
ctx.status = status
ctx.body = message || {message: HttpStatus.getStatusText(status)}
return ctx
}
}
module.exports = {
accepted: build(HttpStatus.ACCEPTED), // 202
badGateway... |
module.exports = function verify(check) {
if (typeof check !== 'object') {
throw new Error('check is not an object');
}
var errors = [];
Object.keys(check).forEach(_verify, check);
if (errors.length > 0) {
throw new Error('Health checks failed: '+ errors.join(', '));
}
re... |
/* globals describe, beforeEach, it, expect, inject, vehicles, VehicleMock */
describe("Vehicles Factory:", function() {
'use strict';
var $httpBackend,
vehicles,
request,
Showcase;
// Load the main module
beforeEach(module('sc'));
beforeEach(inject(function($injector, _vehicles_, _Showcase_) {
$httpBack... |
import { createGlobalStyle } from 'styled-components';
export const GlobalStyle = createGlobalStyle`
body {
margin: 0;
font-family: 'Montserrat', sans-serif;
}
* {
box-sizing: border-box;
}
`;
|
import React, { Component, PropTypes } from 'react'
import cx from 'classnames'
import { Icon } from '../icon'
import { capitalize } from 'utils/string'
import './button.view.styl'
export class Button extends Component {
static propTypes = {
className: PropTypes.string,
children: PropTypes.oneOfType([
... |
'use strict';
var os = require('os');
// expose our config directly to our application using module.exports
module.exports = {
'twitterAuth' : {
'consumerKey' : process.env.TWITTER_CONSUMER_KEY || 'unknown',
'consumerSecret' : process.env.TWITTER_CONSUMER_SECRET || 'unknown' ,
'callbackURL' : '... |
var mySteal = require('@steal');
if (typeof window !== "undefined" && window.assert) {
assert.ok(mySteal.loader == steal.loader, "The steal's loader is the loader");
done();
} else {
console.log("Systems", mySteal.loader == steal.loader);
}
|
define(function(require, exports, module) {
require('jquery.cycle2');
exports.run = function() {
$('.homepage-feature').cycle({
fx:"scrollHorz",
slides: "> a, > img",
log: "false",
pauseOnHover: "true"
});
$('.live-rating-course').find('.media-body').hover(f... |
import React from 'react';
import Slider from 'material-ui/Slider';
/**
* The `defaultValue` property sets the initial position of the slider.
* The slider appearance changes when not at the starting position.
*/
const SliderTransparency = (props) => (
<Slider defaultValue={props.transparency} onChange={props.up... |
import { Transform } from './transform.js';
/**
* Calculate the transform for a Cornerstone enabled element
*
* @param {EnabledElement} enabledElement The Cornerstone Enabled Element
* @param {Number} [scale] The viewport scale
* @return {Transform} The current transform
*/
export default function (enabledElemen... |
import Express from 'express';
import compression from 'compression';
import mongoose from 'mongoose';
import bodyParser from 'body-parser';
import path from 'path';
import IntlWrapper from '../client/modules/Intl/IntlWrapper';
// Webpack Requirements
import webpack from 'webpack';
import config from '../webpack.confi... |
'use strict';
const AWS = require('aws-sdk');
let x = "/delegationset/NHKXBB6SHGKLN";
console.log(x.replace('/delegationset/', ''));
return;
const route53 = new AWS.Route53();
route53.listHostedZones({}).promise()
.then(response => {
console.log(response);
return response.HostedZones.find(hostedZone => {
... |
const defaultEnv = process.env.NODE_ENV || 'development';
function getEnv(name = defaultEnv) {
const isProduction = name === 'production' || name === 'prod';
const isDev = !isProduction;
return { name, isProduction, isDev, getEnv };
}
const env = getEnv();
module.exports = env;
|
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
requir... |
var React = require('react-native');
var {
StyleSheet,
View,
Animated,
} = React;
var Dot = React.createClass({
propTypes: {
isPlacedCorrectly: React.PropTypes.bool.isRequired,
},
getInitialState: function() {
return {
scale: new Animated.Value(this.props.isPlacedCorrectly ? 1 : 0.1),
... |
var namespacehryky_1_1log =
[
[ "AutoElapsed", "structhryky_1_1log_1_1_auto_elapsed.html", null ],
[ "level_type", "namespacehryky_1_1log.html#a6005efaf1fc45416ed6aa211f939993f", null ],
[ "writer_type", "namespacehryky_1_1log.html#a855ba68dea65f57a39b7a1cb03aee800", null ],
[ "write", "namespacehryky_1... |
/****************************************************************************
Copyright (c) 2011-2012 cocos2d-x.org
Copyright (c) 2013-2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation... |
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
... |
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under the MIT license
*/
if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap\'s JavaScript requires jQuery')
}
+
function($) {
'use strict';
var version = $.fn.jquery.split(' ')[0].split('.')
... |
var assert = require('assert');
describe('src/components/model/classes/Collection', function () {
var Collection = require('../../../../src/components/model/classes/Collection');
var collection;
var handler = function (event, changes) {
callbacks[event]++;
};
var callbacks = {
add:... |
/**
* boot/middleware.js
* Express middleware
*/
|
import React from 'react';
import Status from 'components/Status';
import renderer from 'react-test-renderer';
describe('Status component', () => {
function getComponent(piecesLeftCount) {
return renderer.create(
<Status piecesLeftCount={piecesLeftCount} />
);
}
it('should show pieces left', () =>... |
var struct_l_p_c___r_t_c___type_def =
[
[ "ALDOM", "struct_l_p_c___r_t_c___type_def.html#aae1199a3f1f40f90aba18aee4d6325fd", null ],
[ "ALDOW", "struct_l_p_c___r_t_c___type_def.html#a5f56710f005f96878defbdb8ef1333c2", null ],
[ "ALDOY", "struct_l_p_c___r_t_c___type_def.html#a4c7ceb477c4a865ae51f5052dd558667... |
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var RemoveTileAt = require('./RemoveTileAt');
var WorldToTileX = require('./WorldToTileX');
var WorldToTileY = require... |
/**
* Created by JiaHao on 27/10/15.
*/
var fs = require('fs');
var path = require('path');
var normalizeNewline = require('normalize-newline');
function occurenceIndexes(inp, toFind) {
var indices = [];
var element = toFind;
var idx = inp.indexOf(element);
while (idx != -1) {
indices.push(i... |
module.exports.sum = function (arr, prop, exp) {
var total = 0
for (var i = 0, _len = arr.length; i < _len; i++) {
var value = arr[i][prop];
if (exp) {
if (arr[i][exp.field] == exp.value) {
total += value * 1;
}
} else {
total ... |
describe('Modules.Ellipsis.js', function() {
it('should exist with expected constructures', function() {
expect(moj.Modules.CaseCreation.init).toBeDefined();
});
});
|
import React, { Component } from 'react'
import {
Circle,
FeatureGroup,
LayerGroup,
Map,
Popup,
Rectangle,
TileLayer,
} from '../../src'
export default class OtherLayersExample extends Component {
render () {
const center = [51.505, -0.09]
const rectangle = [
[51.49, -0.08],
[51.5,... |
/**
* @author shirishgoyal
* created on 16.12.2015
*/
(function () {
'use strict';
angular.module('BlurAdmin.pages.auth', [
'BlurAdmin.services'
])
.config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
.state('auth', {
... |
/**
* Base js functions
*/
$(document).ready(function(){
//Init jQuery Masonry layout
init_masonry();
//Select menu onchange
$("#collapsed-navbar").change(function () {
window.location = $(this).val();
});
});
function init_masonry(){
var $container = $('#content');
$container... |
var React = require('react');
var RulePicker = require('./RulePicker.js');
var TimePicker = require('react-time-picker');
var DatePicker = require('react-date-picker');
var RuleSummary = require("./RuleSummary.js");
var moment = require('moment');
var Tabs = require('react-simpletabs');
var RecurringSelect = React.cre... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = eachLimit;
var _eachOfLimit = require('./internal/eachOfLimit');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _withoutIndex = require('./internal/withoutIndex');
var _withoutIndex2 = _interopRequireDef... |
angular.module('green-streak.controllers', ['LocalStorageModule'])
.controller('MenuController', function ($scope, $location, MenuService) {
// "MenuService" is a service returning mock data (services.js)
$scope.list = MenuService.all();
$scope.goTo = function (page) {
console.... |
import templateUrl from './image.html';
import controller from './image-controller';
export default {
name: 'image',
url: '/:image',
templateUrl,
controller,
controllerAs: 'image',
resolve: {
image: ['$http', '$stateParams', function($http, $stateParams){
const config = {
method: 'GET',
... |
const mongoose = require('mongoose')
let literatureSchema = mongoose.Schema({
category: { type: String, required: true},
name: { type: String, required: true },
description: { type: String },
content: { type: String, required: true },
author: { type: mongoose.Schema.Types.ObjectId, required: true, ... |
// Saves options to chrome.storage
function save_options () {
var saveDict = []
var i = 1
$('input').map(function () {
var dict = {
id: 'scbcc' + i,
value: this.value
}
i++
console.log('save: ', dict)
ga('send', 'event', 'setting', 'save', this.value)
saveDict.push(dict)
}).... |
'use strict';
module.exports = {
colors: {
black: '#000000',
red: '#D54E53',
green: '#B9CA4A',
yellow: '#E7C547',
blue: '#7AA6DA',
magenta: '#C397D8',
cyan: '#70C0B1',
white: '#EAEAEA',
lightBlack: '#969896',
lightRed: '#D54E53',
lightGreen: '#B9CA4A',
lightYellow: '#E... |
/**
* @Author: Yingya Zhang <zyy>
* @Date: 2016-07-08 11:29:00
* @Email: zyy7259@gmail.com
* @Last modified by: zyy
* @Last modified time: 2016-07-10 22:18:85
*/
import {
notexist,
isEmpty
} from 'type'
import {
calcHeight,
remove,
dataset
} from 'dom'
describe('dom', () => {
it('calcHeight', () => ... |
/* http://fiidmi.fi/documentation/customer_order_history */
module.exports = {
"bonus": {
"type": "object",
"properties": {
"session_id": { "type": "string", "minLength": 2, "maxLength": 50 },
"restaurant_id": { "type": "string", "minLength": 1, "maxLength": 50 }
},
"required": ["session_id", ... |
export function Fragment(props, ...children) {
return collect(children);
}
const ATTR_PROPS = '_props';
function collect(children) {
const ch = [];
const push = (c) => {
if (c !== null && c !== undefined && c !== '' && c !== false) {
ch.push((typeof c === 'function' || typeof c === 'obje... |
var ItineraryWalkStep = require('./itinerary-walk-step')
var Backbone = window.Backbone
var ItineraryWalkSteps = Backbone.Collection.extend({
model: ItineraryWalkStep
})
module.exports = ItineraryWalkSteps
|
/*
* Copyright (c) 2015 by Greg Reimer <gregreimer@gmail.com>
* MIT License. See license.txt for more info.
*/
var stream = require('stream')
, util = require('util')
, co = require('co')
, unresolved = require('./unresolved')
// -----------------------------------------------------
function Readable(opts, ... |
// flow-typed signature: 382f7ff956662b19ae5c130ba0ebece6
// flow-typed version: <<STUB>>/deepclone_v1.0.2/flow_v0.56.0
/**
* This is an autogenerated libdef stub for:
*
* 'deepclone'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* ... |
'use strict';
describe('E2E testing: Change password', function () {
var constants = require('../../../testConstants');
var loginPage = require('../../pages/loginPage');
var header = require('../../pages/pageHeader');
var changePasswordPage = require('../../pages/changePasswordPage');
va... |
/**
* The MIT License (MIT)
*
* Copyright (c) 2014-2022 Mickael Jeanroy
*
* 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
... |
/**
* Created by TC on 2016/10/10.
*/
import React, {
Component,
} from 'react'
import {
Image,
View,
ToastAndroid,
ActivityIndicator,
}
from 'react-native'
import PixelRatio from "react-native/Libraries/Utilities/PixelRatio";
class GirlComponent extends Component {
constructor(props)... |
export * from '../common';
export NodeBundle from './NodeBundle';
export CommonJsResolver from './CommonJsResolver';
|
/*!
* maptalks.snapto v0.1.11
* LICENSE : MIT
* (c) 2016-2018 maptalks.org
*/
/*!
* requires maptalks@^0.33.1
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('maptalks')) :
typeof define === 'function' && define.amd ? define(['exports', '... |
const webpack = require("webpack");
const path = require("path");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const AssetsPlugin = require("assets-webpack-plugin");
module.exports = {
entry: {
main: path.join(__dirname, "src", "index.... |
window.onload=function() {
var start = document.getElementById('start');
start.onclick = function () {
var name = document.getElementById('Name').value;
var id = document.getElementById('Id').value;
var tel = document.getElementById("Tel").value;
if (name == "") {
... |
(function (){
"use strict";
(function() {
var $bordered = $('.bordered');
window.setInterval(function() {
var top = window.pageYOffset || document.documentElement.scrollTop;
if(top > 0) {
$bordered.fadeOut('fast');
} else if(top == 0 && !$bor... |
describe('$materialPopup service', function() {
beforeEach(module('material.services.popup', 'ngAnimateMock'));
function setup(options) {
var popup;
inject(function($materialPopup, $rootScope) {
$materialPopup(options).then(function(p) {
popup = p;
});
$rootScope.$apply();
});... |
/**
* Created by Samuel Schmid on 23.03.14.
*
* Class for Database Handling
*
* Containing
* - App Config
* - Database Information
*
* @type {Database}
*/
module.exports = Database;
Array.prototype.contains = function(obj) {
var i = this.length;
while (i--) {
if (this[i] === obj) {
... |
Test.expect(reverseWords('The quick brown fox jumps over the lazy dog.') === 'ehT kciuq nworb xof spmuj revo eht yzal .god');
Test.expect(reverseWords('apple') === 'elppa');
Test.expect(reverseWords('a b c d') === 'a b c d');
Test.expect(reverseWords('double spaced words') === 'elbuod decaps sdrow'); |
'use strict';
import { gl } from './Context';
import { mat4 } from 'gl-matrix';
import Camera from './Camera';
class OrthographicCamera extends Camera
{
constructor(
{
path,
uniforms,
background,
translucence,
right,
top,
name = 'orthographic.camera',
... |
// Karma configuration
// Generated on Wed Feb 17 2016 10:45:47 GMT+0100 (CET)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: './',
// frameworks to use
// available frameworks: https://npmjs.o... |
'use strict'
// create a net-peer compatible object based on a UDP datagram socket
module.exports = function udpAdapter(udpSocket, udpDestinationHost, udpDestinationPort) {
const _listeners = []
udpSocket.on('message', (msg, rinfo) => {
//console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`)
... |
var Filter = require('broccoli-filter')
module.exports = WrapFilter;
WrapFilter.prototype = Object.create(Filter.prototype);
WrapFilter.prototype.constructor = WrapFilter;
function WrapFilter (inputTree, options) {
if (!(this instanceof WrapFilter)) return new WrapFilter(inputTree, options)
Filter.call(this, input... |
Template.formeditprofile.events({
'submit #editform': function(event){
event.preventDefault();
var firstNameVar = event.target.firstname.value;
var lastNameVar = event.target.lastname.value;
var classVar = event.target.classvar.value;
Profiles.insert({
uid:Meteor.userId(),
firstname: firstNameVar,
l... |
var expect = require('expect.js');
var EventEmitter = require('events').EventEmitter;
var fixtures = require('../fixtures');
var Detector = require('../../lib/detector.js');
describe('Detector', function() {
// Used to test emitted events
var found;
var listener = function(magicNumber) {
found.... |
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import './PostListView.scss';
import { toastr } from 'react-redux-toastr';
import { bindActionCreators } from 'redux';
import {
fetchPostsFromApi,
selectPostCategory,
clearPostsErrors,
clearPostsMessages
} from '../../../actions/ac... |
version https://git-lfs.github.com/spec/v1
oid sha256:4a4e80129485fe848fa53149568184f09fa2da8648b6476b750ef97344bd4c5b
size 10959
|
/**
* Module dependencies.
*/
var util = require('sails-util'),
uuid = require('node-uuid'),
path = require('path'),
generateSecret = require('./generateSecret'),
cookie = require('express/node_modules/cookie'),
parseSignedCookie = require('cookie-parser').signedCookie,
ConnectSession = require('express/... |
function showErrorMessage(errorMessage) {
$("#authorize-prompt")
.addClass("error-prompt")
.removeClass("success-prompt")
.html(errorMessage);
}
function showSuccessMessage(message) {
$("#authorize-prompt")
.removeClass("error-prompt")
.addClass("success-prompt")
... |
module.exports = [
'M6 2 L26 2 L26 30',
'L16 24 L6 30 Z'
].join(' ');
|
// DATA_TEMPLATE: empty_table
oTest.fnStart("5396 - fnUpdate with 2D arrays for a single row");
$(document).ready(function () {
$('#example thead tr').append('<th>6</th>');
$('#example thead tr').append('<th>7</th>');
$('#example thead tr').append('<th>8</th>');
$('#example thead tr').append('<th>9</th... |
/*
* jQuery Touch Optimized Sliders "R"Us
* HTML media
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
*/
!function(i){var n="tosrus",e="html";i[n].media[e]={filterAnchors:function(n){return"#"==n.slice(0,1)&&i(n).is("div")},initAnchors:function(e,t){i('<div class="'+i[n]._c("html")+'" />').append(i(t)).appen... |
/**
* Knook-mailer
* https://github.com/knook/knook.git
* Auhtors: Alexandre Lagrange-Cetto, Olivier Graziano, Olivier Marin
* Created on 15/04/2016.
* version 0.1.0
*/
'use strict';
module.exports = {
Accounts: require('./src/Accounts'),
Email: require('./src/Email'),
Init: require('./src/Init'),
... |
module.exports = {
KeyQ: {
printable: true,
keyCode: 81,
Default: 'ქ',
Shift: '',
CapsLock: 'Ⴕ',
Shift_CapsLock: '',
Alt: '',
Alt_Shift: ''
},
KeyW: {
printable: true,
keyCode: 87,
Default: 'წ',
Shift: 'ჭ',
CapsLock: 'Ⴜ',
Shift_CapsLock: 'Ⴝ',
Alt: '∑',
... |
window.Boid = (function(){
function Boid(x, y, settings){
this.location = new Vector(x, y);
this.acceleration = new Vector(0, 0);
this.velocity = new Vector(Helper.getRandomInt(-1,1), Helper.getRandomInt(-1,1));
this.settings = settings || {};
this.show_connections = settings.show_connections || true;... |
/*global window*/
(function($){
'use strict';
var Observable = function(){
this.observers = {};
};
Observable.prototype.on = function(event, observer){
(this.observers[event] = this.observers[event] || []).push(observer);
};
Observable.prototype.emit = function(event){
v... |
import root from './_root.js';
import toString from './toString.js';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeParseInt = root.parseInt;
/**
* Converts `string` to an integer of the specified radix. If `radix` is
* `undefined` or `0`, a `radix` of `10` is use... |
import $ from 'jquery';
module.exports = function(root) {
root = root ? root : global;
root.expect = root.chai.expect;
root.$ = $;
beforeEach(() => {
// Using these globally-available Sinon features is preferrable, as they're
// automatically restored for you in the subsequent `afterEach`
root.san... |
const mongoose = require('mongoose');
const UserModel = mongoose.model('User');
module.exports = {
login: (email, password) => {
return UserModel.findOne({email, password});
}
}; |
module.exports = {
login: function(user, req)
{
// Parse detailed information from user-agent string
var r = require('ua-parser').parse(req.headers['user-agent']);
// Create new UserLogin row to database
sails.models.loglogin.create({
ip: req.ip,
host: req.host,
agent: req.headers... |
const isObjectId = objectId => objectId && /^[0-9a-fA-F]{24}$/.test(objectId)
const isEmail = email => email && /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(email.trim())
const isNick = nick => nick && /^[\u4E00-\u9FA5\uF900-\uFA2DA-Za-z0-9\-\_]{2,40}$/.test(nick.trim())
const isUrl = url => url && /^(http(?:|s)\:)*... |
var Command = require("../Command");
var RealDirection = require("../../RealDirection");
var MessageCategory = require("../../MessageCategory");
var _dir = RealDirection.NORTHEAST;
class Northeast extends Command{
constructor(){
super();
this.rule = /^n(?:orth)?e(?:ast)?$/g;
}
exec(){
if(this.step(_dir)){
... |
import VueRouter from 'vue-router'
import { mount } from '@vue/test-utils'
import { waitNT, waitRAF } from '../../../tests/utils'
import { Vue } from '../../vue'
import { BPaginationNav } from './pagination-nav'
Vue.use(VueRouter)
// The majority of tests for the core of pagination mixin are performed
// in paginatio... |
module.exports = (name, node) => (
name === "apply" &&
node.type === "CallExpression" &&
node.callee.type === "Identifier");
|
/*
* The MIT License (MIT)
*
* Copyright (c) 2016-2017 The Regents of the University of California
* Author: Jim Robinson
*
* 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 res... |
var should = require("should");
var Mat3x3 = require("./Mat3x3");
var Barycentric3 = require("./Barycentric3");
var Logger = require("./Logger");
(function(exports) {
var verboseLogger = new Logger({
logLevel: "debug"
});
////////////////// constructor
function XYZ(x, y, z, options) {
... |
/**
* This file is part of the Unit.js testing framework.
*
* (c) Nicolas Tallefourtane <dev@nicolab.net>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code
* or visit {@link http://unitjs.com|Unit.js}.
*
* @author Nicolas Tallefourt... |
var mongoose = require('mongoose');
var Shape = require('./Shape');
var User = require('./User');
// Create a session model, _id will be assigned by Mongoose
var CanvasSessionSchema = new mongoose.Schema(
{
_id: String,
users: [User],
dateCreated: Date,
dateUpdated: Date,
// canDraw: Boolean,
... |
import config from '../components/configLoader';
import { addToDefaultPluginDOM } from '../components/helpers';
const pluginConfig = config.plugins.find(obj => obj.name === 'age');
// DOM setup
const pluginId = 'js-plugin-age';
addToDefaultPluginDOM(pluginId);
const ageDOM = document.getElementById(pluginId);
con... |
Meteor.startup(function () {
});
Deps.autorun(function(){
Meteor.subscribe('userData');
}); |
// will this be needed?
var getMotionEventName = function(type) {
var t;
var el = document.createElement('fakeelement');
var map = {};
if (type == 'transition') {
map = {
'transition': 'transitionend',
'OTransition': 'oTransitionEnd',
'MozTransition': 'transitionend',
... |
// Include gulp
import gulp from 'gulp';
import fs from 'fs';
// Include Our Plugins
import eslint from 'gulp-eslint';
import mocha from 'gulp-mocha';
import browserSyncJs from 'browser-sync';
import sassJs from 'gulp-sass';
import sassCompiler from 'sass';
import rename from "gulp-rena... |
//
// Jala Project [http://opensvn.csie.org/traccgi/jala]
//
// Copyright 2004 ORF Online und Teletext GmbH
//
// Licensed under the Apache License, Version 2.0 (the ``License'');
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.or... |
const OFF = 0;
const WARN = 1;
const ERROR = 2;
module.exports = {
extends: "../.eslintrc.js",
rules: {
"max-len": [ ERROR, 100 ],
},
env: {
"es6": true,
"node": true,
"mocha": true,
},
};
|
const webdriver = require('selenium-webdriver');
const setupDriver = (browser) => {
const driver = new webdriver
.Builder()
.usingServer('http://localhost:9515/')
.withCapabilities({
browserName: browser,
})
.build();
return driver;
};
module.exports = { se... |
'use strict';
module.exports = function(grunt) {
// Please see the Grunt documentation for more information regarding task
// creation: http://gruntjs.com/creating-tasks
function random(min, max) {
min = min || 0;
max = max || 1;
var result;
if(min === 0 && max === 1) {
re... |
'use strict';
angular
.module('facebookMe', [
])
;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.