code stringlengths 2 1.05M |
|---|
'use strict';
/**
* Tests expecting promises to reject
*/
var cheerio = require('cheerio');
var meta = require('../index');
var preq = require('preq'); // Promisified Request library
var assert = require('./utils/assert.js');
// mocha defines to avoid JSHint breakage
/* global describe, it, before, beforeEach, af... |
/////////////////////////////////////////////////
// Error function to out json error to browser //
/////////////////////////////////////////////////
'use strict';
var path = require('path');
module.exports = function (config, log) {
/**
* Emit an error to the browser
* @param {object} The express re... |
function sortArray(arr, orderType) {
if(orderType === 'asc'){
return (arr.sort((a,b) => {
return a - b;
}));
}else {
return (arr.sort((a,b) => {
return b - a;
}));
}
}
console.log(sortArray([14, 7, 17, 6, 8], 'asc')); |
require('dotenv').config()
var express = require('express');
var router = express.Router();
const itemController = require('../controller/item.controller');
var jwt = require('express-jwt');
router.get('/', jwt({secret: process.env.JWT_SECRET}), itemController.getAllItem)
router.get('/search/:name', jwt({secret: pro... |
import { Box, Margins, Divider, Option } from '@rocket.chat/fuselage';
import { useMutableCallback } from '@rocket.chat/fuselage-hooks';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { Meteor } from 'meteor/meteor';
import React from 'react';
import { callbacks } from '../../../app/callbacks/client';
... |
jQuery(document).ready(function(){
if (/1\.(0|1|2|3)\.(0|1|2)/.test(jQuery.fn.jquery)
|| /^1.1/.test(jQuery.fn.jquery)
|| /^1.2/.test(jQuery.fn.jquery)
)
{
alert('jQuery upgrade needed for NB_Store. Required version: 1.4.2 Current version: '+ jQuery.fn.jque... |
// setting the initial map coordinates - Lat, Lng, zoom
var mymap = L.map('mapid', {
center: [48.3794, 31.1656],
zoom: 6,
minZoom: 3,
maxZoom: 20
});
// OpenStreetMap tile layer url goes here
//var mapStyle = L.tileLayer('http://tile.stamen.com/watercolor/{z}/{x}/{y}.jpg', {
var mapStyle = L.tileLayer(... |
var mainApp = angular.module("mainApp", []);
mainApp.controller('scheduleController', function($scope, $http) {
$http.get('http://rawgit.com/mshoote/BTJSC/master/Markup/Json_data/100Items.json').then(function(res){
$scope.items = res.data;
});
});
|
// Putting start-up related one offs here that are too small for their own module and
// aren't appropriate to be in any existing module
import { screen, shell } from 'electron';
import $ from 'jquery';
import Backbone from 'backbone';
import { getBody } from '../utils/selectors';
export function fixLinuxZoomIssue() ... |
#!/usr/bin/env node
var fs = require('fs');
var leftpad = require('left-pad'); // here to ensure node_modules isn't messed up
console.log(fs.readFileSync(process.argv[2]).toString())
|
export default d => d
|
// programmeerproject
// Marije Dekker, 10785949
// global variables
var chosenCountry;
var drugCountry;
var json = "json/drug/amfetamineuse.json"
// initiate choroplethmap
var map = new Datamap({
element: document.getElementById('map'),
// europe
setProjection: function(element) {
var projection = d3.geo.eq... |
$traceurRuntime.ModuleStore.getAnonymousModule(function() {
"use strict";
angular.module("kao.crud.buttons", ["kao.crud.api", "kao.loading"]).directive("deleteButton", function() {
return {
restrict: "E",
replace: true,
scope: {
dataType: "@type",
action: "&"
},
lin... |
import Notification from './Notification';
import Registry from '@ui-autotools/registry';
const metadata = Registry.getComponentMetadata(Notification);
metadata.exportInfo = {
path: 'src/Notification/Notification.js',
};
|
/*
@licstart The following is the entire license notice for the
JavaScript code in this file.
Copyright (C) 1997-2019 by Dimitri van Heesch
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License as published by
the Free Software Foundati... |
/*Rласс описывает 3D меню.
*В нем будет находиться текущий корабль игрока и бэкграунд.
*/
var _Menu = function (json_params)
{
/* START OF FUNCTIONS BINDS
* */
this.updateBF = this.update.bind(this);
this.onNicknameEnteringBF = this.onNicknameEntering.bind(this);
this.createSelectOptionsByRoomsListBF = this... |
var _ = require('underscore');
var context = window.AudioContext || window.webkitAudioContext || null;
var muter = require('./muter');
var SoundGenerator = function() {
this.enabled = context !== undefined;
if(!this.enabled) return;
this.lastGainValue = null;
this.totalCreated++;
this.totalCreatedSq = thi... |
import React from 'react';
import { storiesOf } from '@kadira/storybook';
import Container from './';
storiesOf('Container', module).add('default', () =>
<Container>Hello World</Container>,
);
|
var Listener = require('./listener');
function StartGame (canvas) {
this.listener = new Listener(canvas);
this.listener.startGame();
}
module.exports = StartGame;
|
app.service("UserService", function($http){
this.register = function(params){
return $http.post("http://localhost:3000/users/register", params);
}
this.login = function(params){
return $http.post("http://localhost:3000/users/login", params);
}
}); |
import React from 'react';
import {Helmet} from 'react-helmet';
import {node} from 'prop-types';
import {Layout} from '@travi/travi.org-theme-components';
import {graphql, StaticQuery} from 'gatsby';
export default function SiteLayout({children}) {
return (
<StaticQuery
query={
graphql`
q... |
"use strict";
(function () {
var oldEnsureElement = Backbone.View.prototype._ensureElement;
Backbone.View.prototype._ensureElement = function () {
if (this.$template) {
this.setElement(this.$template.clone());
} else {
oldEnsureElement.apply(this, arguments);
}
};
})();
|
describe("uiMask", function () {
"use strict";
var formHtml = "<form name='test'><input name='input' ng-model='x' ui-mask='{{mask}}'></form>";
var inputHtml = "<input name='input' ng-model='x' ui-mask='{{mask}}' ui-options='options'>";
var compileElement, scope, config, timeout, uiMaskConfigProvider;
... |
var hostURL = "http://lunarpulse.herokuapp.com";
var startDate = "1976-01-01";
var endDate = "1976-02-02";
$(function(){
// var seisId = $(this).attr('id');
var seisId = "1";
var URL = "/moon_quake_api/duration/" + startDate + "/" + endDate + "/site/"+ seisId;
console.log(URL);
var Data = $.get(URL,... |
// @flow
import moment from 'moment'
export type Map<T> = {
[id: string]: T,
}
type Asset = {
url: string,
title: string,
description: string,
}
export type HomePage = {
tagline: string,
}
export type AboutPage = {
content: string,
}
export type Work = {
title: string,
slug: string,
date: moment,
header... |
//
// Created by davimacedo on 30/09/15.
//
'use strict';
var chai = require('chai');
var expect = chai.expect;
var AssertionError = chai.AssertionError;
var errors = require('../../../../').models.errors;
require('../../settings');
describe('errors', function () {
it(
'expect to export EntityNotFoundError in... |
module.exports = function ruleSet() {
var rules;
rules = [];
rules = [
'color',
'font-size',
'border-width'
]
return rules;
}
|
function Shader (_vertexShader, _fragmentShader, _name, _material) {
var _this = this;
if (_material) {
_this.uniforms = _material.uniforms;
_this.attributes = _material.attributes;
}
} |
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const messageSchema = new Schema({
content: String
});
const model = mongoose.model('message', messageSchema);
module.exports = model;
|
import R from 'ramda';
import { ORIGIN, FOI_REQUESTS_PAGE_SIZE, FOI_REQUESTS_PATH } from '../globals';
import { fetchAndDispatch } from '../utils/networking';
import { getCurrentAccessTokenOrRefresh } from '../utils/oauth';
import { mapToFakeStatus } from '../utils';
function foiRequestsErrorAction(error) {
return ... |
// Compiled by ClojureScript 0.0-2311
goog.provide('reagent.impl.util');
goog.require('cljs.core');
goog.require('clojure.string');
goog.require('clojure.string');
goog.require('reagent.impl.reactimport');
goog.require('reagent.impl.reactimport');
goog.require('reagent.debug');
reagent.impl.util.is_client = !(((functio... |
const { execSync } = require('child_process');
const { readFileSync } = require('fs');
const { join } = require('path');
const allPackages = JSON.parse(execSync(
'npx lerna ls --all --json',
{cwd: join(__dirname, '..'), stdio: ['pipe', 'pipe', 'ignore']}
).toString().trim());
const allPackagesNames = new Set(allP... |
'use strict';
angular.module('ITS.user.issueService', ['ngRoute'])
.factory('issueService', [
'$http',
'BASE_URL',
'authentication',
function ($http, BASE_URL, authentication) {
return {
getUsersIssues: function (params,success, error) {
... |
'use strict';
require('mocha');
const assert = require('assert');
const Composer = require('../');
let composer;
describe('series', function() {
beforeEach(function() {
composer = new Composer();
});
it('should compose tasks into a function that runs in series', function(done) {
const expected = [];
... |
function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var sOut = '<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;">';
sOut += '<tr><td>Rendering engine:</td><td>'+aData[1]+' '+aData[4]+'</td></tr>';
sOut += '<tr><td>Link to source:</td><td>Could prov... |
define(["module-a"], function(moduleA) {
return {
"name":"main",
"submodule":moduleA,
"project":"foo-injected"
};
}) |
angular.module('proximate', ['ionic',
'proximate.controllers',
'proximate.services'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if (window.cordova && window.cord... |
'use strict';
module.exports = Tool;
const debug = require('debug')('tasty:tool'),
thing = require('./thing').thing,
util = require('./util'),
inspect = require('util').inspect,
instance = util.instance;
function Tool(id, server, config) {
const box = function tool() {
return box.add.apply(null, a... |
// Avoid `console` errors in browsers that lack a console.
(function() {
var method;
var noop = function () {};
var methods = [
"assert", "clear", "count", "debug", "dir", "dirxml", "error",
"exception", "group", "groupCollapsed", "groupEnd", "info", "log",
"markTimeline", "profile",... |
'use strict';
const WebGLDebugUtils = require('./webgl-debug');
function getExtensions(gl, extensions) {
let result = {};
if (extensions) {
for (let i = 0; i < extensions.length; ++i) {
let extDesc = extensions[i];
let extension;
for (let extNameIdx = 0; extNameIdx < extDesc.names.length; ++j) {
let... |
/**
* 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
... |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopExportWildcard(obj, defaults) { var newObj = defaults({}, obj); delete newObj['default']; return newObj; }
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.leng... |
const webpack = require('webpack');
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
template: __dirname + '/client/index.html',
filename: 'index.html',
inject: 'body'
});
module.exports = {
// debug: true,
// dev... |
var gulp = require('gulp')
, rename = require('gulp-rename')
, replace = require('gulp-replace')
, fs = require('fs-extra')
, chalk = require('chalk')
, path = require('path')
, fancy = require('fancy-log')
;
var main = function(func) {
//crea... |
exports.DOWNLOAD_IMAGE_OFFLINE = 'DOWNLOAD_IMAGE_OFFLINE';
exports.DOWNLOAD_IMAGE_OFFLINE_SUCCESS = 'DOWNLOAD_IMAGE_OFFLINE_SUCCESS';
exports.DOWNLOAD_IMAGE_OFFLINE_FAILED = 'DOWNLOAD_IMAGE_OFFLINE_FAILED';
exports.DOWNLOAD_IMAGE_OFFLINE_NETWORK_ERROR = 'DOWNLOAD_IMAGE_OFFLINE_NETWORK_ERROR';
exports.DOWNLOAD_IMAGE_OFF... |
app.directive('addView', function () {
return{
restrict: 'E',
templateUrl: 'app/components/add/addView.html'
}
});
|
describe('Tests for user landing', function() {
var url = 'https://healthapp-cen3031-7b.herokuapp.com/';
// Functionalities are tested separately
beforeEach(function() {
browser.get(url+'patients');
});
// Testing the routes and redirection
it('should redirect to patient portal', function() {
expect... |
$(document).ready(function() {
startAnimations();
setInterval(updateTime, 1000);
requestAnimationFrame(updateEpoch);
registerKeyEvents();
});
function startAnimations() {
window.scroll(0, 0);
$(".main-content").hide();
$(".slide-up").css({height: $(window).height() - $(".header-box").height()});
$("#hexInput")... |
"use strict";
// deps
var HandlerDetails = require("./handler-details.js");
var helpers = require("./helpers.js");
var assert = require("assert");
var util = require("util");
var charge = require("ch-arge");
// NOTE @index.js adds the '_onUpdate' property
module.exports = EventDetails;
function EventDetails() {
this... |
/*
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'indent', 'gu', {
indent: 'ઇન્ડેન્ટ, લીટીના આરંભમાં જગ્યા વધારવી',
outdent: 'ઇન્ડેન્ટ લીટીના આરંભમાં જગ્યા ઘટાડવી'
} );
|
'use strict';
// packages
const moment = require('moment');
// ours
const db = require('./db.js');
const helpers = require('./utils/helpers.js');
const spinner = require('./utils/spinner.js').mainSpinner;
const spinnerSucceed = require('./utils/spinner.js').spinnerSucceed;
const spinnerInfo = require('./utils/spinner... |
'use strict';
/* Filters */
angular.module('cicekSepetiweatherSimulationApp.filters', [])
.filter('placeholder', [function() {
return function (input,phvalue) {
return (angular.isUndefined(input) || input == '') ? phvalue : input;
};
}])
|
import Ember from 'ember';
var f7 = new Framework7({
init: false
});
f7.f7Init = f7.init;
f7.init = function() {
return this._super();
};
var preloaderTimeout = null;
export default Ember.Object.extend(f7, {
showPreloader: function(options) {
if (options == null) {
options = {};
}
if (option... |
var express = require('express');
var path = require('path');
var favicon = require('static-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var http = require('http');
var routes = require('./routes/index');
var users = require('./routes/... |
var Sequelize = require('sequelize');
var SchemaTable = require('./').SchemaTable;
var streamify = require('stream-array'); // only needed to turn array -> stream
// your rows of data - maybe you loaded these from a CSV :-)
var data = [
{'foo': 3, 'bar': 'YES'},
{'foo': 5, 'bar': 'NO'}
];
// this is your JSON Tab... |
var user = require('../controllers/user.server.controller');
var passport = require('passport');
module.exports = function(app) {
app.route('/users')
.get(user.list)
.post(user.create);
app.route('users/:userId')
.get(user.read)
.put(user.update)
.delete(user.delete);
app.post('/signin', pa... |
define([
'../index.js',
'./demo-ctrl',
'./demo-state'
], function (rbHeader, demoCtrl, demoState) {
var demo = angular
.module('rb-header-demo', [rbHeader.name])
.config(demoState)
.controller('header-demo-ctrl', demoCtrl);
return demo;
});
|
// Include any necessary libraries
var moment = require('moment')
var exports = module.exports = {};
// Other sources should follow the same style
// Given a switch name and a Port Name
// Return an object that can be used to get new information about the port
exports.newSource = function (switchName, portName) {
v... |
'use strict';
angular.module('myApp.CalculatorModule', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/calculator', {
templateUrl: 'calculator/calculator.html',
controller: 'CalculatorController'
});
}])
.factory('CalculatorService', function () {
class Calculat... |
var config = require('../../config')
, Q = require('q')
, co = require('co')
, AggrIndex = require('../../lib/aggr_index');
function AggrIndexJob(region_idx){
var me = this;
this.getName = function (){
return region_idx.toString();
}
this.doWork = function (){
return Q.Promise((resolve, reject) => {
co... |
import Icon from '../components/Icon.vue'
Icon.register({"file-word-o":{"width":1536,"height":1792,"paths":[{"d":"M1468 380q28 28 48 76t20 88v1152q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h896q40 0 88 20t76 48zM1024 136v376h376q-10-29-22-41l-313-313q-12-12-41-22zM1408 1664v-1024h-416q-40 0-68-2... |
import { expect } from 'chai';
import { Map } from 'immutable';
import { action as createAction } from '../../actions/utils';
import { TYPES } from '../../actions/date';
import { date } from '../date';
describe('date reducer', () => {
it('should contain the date', () => {
// Arrange
const data = n... |
"use strict";
exports.apiUrl = "http://54.255.198.85/api/v1/";
module.exports = {
apiUrl: exports.apiUrl,
};
|
/* eslint new-cap: [0] */
/* eslint no-console: [0] */
'use strict'
const Model = require('trails/model')
// const helpers = require('proxy-engine-helpers')
/**
* @module CustomerAccount
* @description Customer Account
*/
module.exports = class DiscountEvent extends Model {
static config (app, Sequelize) {
... |
var webpack = require('webpack');
var path = require('path');
module.exports = {
context: path.resolve(__dirname + '/client'),
entry: {
app: [
'webpack-dev-server/client?http://localhost:8081/',
'webpack/hot/dev-server',
'./src/index.jsx',
],
},
output: {
path: './public/build',
... |
// Inspiration => https://github.com/HackedByChinese/ng-idle
//
// Rules:
//
// * ping after 3 minutes from last human activity
// * reset session after api success except 401
// * idle show after 25 of inactivity
//
(function(root) {
'use strict';
var availity = root.availity;
availity.core.constant('AV_ID... |
define([
"dijit/layout/TabContainer",
"./TabController"
], function(TabContainer, TabController) {
// summary:
// Base TabContainer with options
// suitable for backend module
return require('dojo/_base/declare')([ TabContainer ], {
doLayout: false,
controllerW... |
/* Author:
Patrick Marich
pmarich@realnetworks.com
*/
/* // Header Stuff // */
$(document).ready(function() {
var useVid = window.matchMedia("(min-width: 720px)");
if (useVid.matches) {
$("#feat-img").html(
'<video id="feat-vid" poster="img/spacer.gif" autoplay loop>' +
... |
// Compiled by ClojureScript 0.0-2322
goog.provide('dommy.utils');
goog.require('cljs.core');
/**
* Dissociate this keyseq from m, removing any empty maps created as a result
* (including at the top-level).
*/
dommy.utils.dissoc_in = (function dissoc_in(m,p__11792){var vec__11794 = p__11792;var k = cljs.core.nth.call(n... |
/*
* Footer Messages
*
* This contains all the text for the Footer component.
*/
import { defineMessages } from 'react-intl';
export default defineMessages({
authorMessage: {
id: 'ninjaref.components.Footer.author.message',
defaultMessage: '© 2017 ninjaref, unless otherwise noted.',
},
});
|
window.onload =
function solve() {
return function task1() {
var data = {
headers: ['Vendor', 'Model', 'OS'],
items: [{
col1: 'Nokia',
col2: 'Lumia 920',
col3: 'Windows Phone'
}, {
... |
import { ie, ios } from "./browser"
export function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") }
export let rmClass = function(node, cls) {
let current = node.className
let match = classTest(cls).exec(current)
if (match) {
let after = current.slice(match.index + match[0].length)
... |
/**
* A quick shortcut for `dispatchEvent` v4.
* @param {CustomEvent} customEvent the event object
*/
export default function dispatchCustomEvent(customEvent) {
if (this) this.dispatchEvent(customEvent);
}
|
import Vue from 'vue'
import Router from 'vue-router'
import App from 'App'
import Example from 'Example'
import Test from 'Test'
import Test2 from 'Test2'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'App',
component: App
},
{
path: '/example',
... |
/**
* Created by fengyuanzemin on 2017/3/28.
*/
export const PAGE_OPTION = {
// 一页多少条数据
size: 10,
// 第几页
page: 0
};
|
var webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
var packageJSON = require('../package.json');
var name = packageJSON["name"];
const AUTOPREFIXER_BROWSERS = [
'Android 2.3',
'Android >= 4',
'Chrome >= 32',
'Firefox >= 28',
'Explorer >= 9',
'iOS >= 7',
'Op... |
//https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API
function toggleFullScreen() {
if (!document.fullscreenElement && // alternative standard method
!document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement ) { // current working methods
if (docume... |
/**
* System Routes
*/
(function () {
"use strict";
var controller = {
system : require('../controller/system.js')
};
module.exports = {
/**
* Init routes
*
* @param server
*
*/
init : function(server) {
/**
* @api {get} /:versionNumber/system Service Health
* @apiVersion 1.0... |
var should = require('should');
var jayson = require(__dirname + '/../');
var support = require(__dirname + '/support');
describe('Jayson.Method', function() {
var Method = jayson.Method;
it('should return an instance when called as a function', function() {
Method(function() {}).should.be.instanceof(Method)... |
'use strict';
angular.module('pollioApp')
.factory('pollRecipient', function(uniqueid) {
function PollRecipient() {
this._id = this._id || uniqueid.create();
this.type = this.type || 'email';
this.value = this.value || '';
}
return {
create:... |
/*@cc_on
@if (@_jscript_version >= 5)
@else
@end
@*/
//@cc_on
// @cc_on
// :::::𐇑 |
/*!
* Start Bootstrap - New Age v3.3.7 (http://startbootstrap.com/template-overviews/new-age)
* Copyright 2013-2019 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE)
*/
!function(t){"use strict";t("a.page-scroll").bind("click",function(a){var o=t(this);t... |
datab = [{},{"CDA Business Name":{"colspan":"1","rowspan":"1","text":"ClinicalInformation: ProcedureIndications: Text"},"DICOM SR":{"colspan":"1","rowspan":"1","text":"Referenced Request Sequence (0040,A370) > Reason for the Requested Procedure (0040,1002)"}},{"CDA Business Name":{"colspan":"1","rowspan":"1","text":"Cl... |
var rsr = new Raphael('rsr', '745', '550');
var layer1 = rsr.set();
rsr.setStart();
var text15650 = rsr.text(520, 290, 'FACHADA LATERAL DIREITA').attr({"font-size": '14px',"text-anchor":"start","font-weight": 'normal',"line-height": '125%',"letter-spacing": '0px',"word-spacing": '0px',fill: '#000000',"fill-opacity": ... |
version https://git-lfs.github.com/spec/v1
oid sha256:a8c150ad525c220f790d0916a8293f241ccd2b9a17cf50eebce37a0861f07bce
size 1721
|
const createParser = require('./index.js')
const math = require('markdown-it-math')
const markdown = `
*[HTML]: Hyper Text Markup Language
*[W3C]: World Wide Web Consortium
# Heading 1
Lorem **ipsum** dolor _sit_ ++amet++ :D.
The HTML ==spe... |
'use strict';
module.exports = {
write: true,
prefix: '^',
devprefix: '^',
devdep: [
'autod',
'egg-bin',
'contributors',
'eslint',
'eslint-config-egg'
],
exclude: [
'coverage',
],
test: [
'test'
],
};
|
'use strict';
const gulp = require('gulp');
const babel = require('gulp-babel');
const uglify = require('gulp-uglifyjs');
const rename = require('gulp-rename');
const sourceFiles = [ 'src/safeobject.js' ];
const moduleTypes = [ 'amd', 'systemjs', 'commonjs' ];
const fileName = 'SafeObject';
gulp.task('build:js', fun... |
const express = require('express');
const app = express();
const port = process.env.PORT || 8080;
const fs = require('fs');
const path = require('path');
let timezonedbtoken;
let githubtoken;
let oAuthJSON = {};
let usingENV;
app.enable('trust proxy');
app.listen(port, () => {
console.log(`Server is listening on po... |
(function(factory) {
if (typeof define === "function" && define.amd) {
define([ "jquery", "moment" ], factory);
}
else if (typeof exports === "object") {
module.exports = factory(require("jquery"), require("moment"));
}
else {
factory(jQuery, moment);
}
})(function($, mom... |
define([
'backbone',
'backboneLocalstorage',
'messages/message.model'
], function (Backbone, Store, MessageModel) {
var MessageCollection = Backbone.Collection.extend({
model: MessageModel,
initialize: function (messages, opts) {
this.localStorage = new Store('Mailbox.Messages'+opts.box.get('name'));... |
controllers.controller('footerController', ['$scope', '$http', '$location', 'mainService',
function($scope, $http, $location, $mainService, $eventService) {
}]); |
import * as TYPES from '../actions/types';
const initialState = {
selectedTabIndex: 0,
};
export default function homePage(state=initialState, action) {
switch (action.type) {
case TYPES.SWITCH_TITLE_BAR_TAB:
return {
...state,
selectedTabIndex: action.selTabIndex,
};
default:... |
console.log("toto");
|
import filter from 'lodash/filter'
import sortBy from 'lodash/sortBy'
import last from 'lodash/last'
import includes from 'underscore.string/include'
import { link } from './gatsby-helpers'
module.exports = (files, pagesReq) => {
// Remove files that start with an underscore as this indicates
// the file shouldn't... |
"use strict";
/*jshint esversion: 6 */
/*jslint node: true */
var fs = require('fs'),
util = require('util'),
em = require('events').EventEmitter,
CryptoJS = require('crypto-js'),
rimraf = require('rimraf');
var qf = require('../questions/_question_factory');
/**
* Usermanag... |
import Ember from 'ember';
export default Ember.Route.extend({
renderTemplate: function() {
this.render('ingredients.show');
}
});
|
// Formats a GraphQL error to display to the user
export const formatError = errorMessage => {
const colonIndex = errorMessage.lastIndexOf(':')
const cleanedMessage = errorMessage.substring(
colonIndex + 2,
errorMessage.length
)
return cleanedMessage
}
const alertError = errorMessage => {
const clea... |
'use strict';
// @todo: probably would be easy to get away with this?
// Kalabox modules
var util = require('../util.js');
var shell = util.shell;
exports.runCmdsAsync = function(cmds, options) {
// @todo: this is jank and not sure if works on windows?
var cmd = cmds.join(' && ');
return shell.execAdminAsync(c... |
/**
* Copyright 2012 Akseli Palén.
* Created 2012-07-15.
* Licensed under the MIT license.
*
* <license>
* 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,
* inclu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.