code
stringlengths
2
1.05M
// import Rule from 'rule.js'; import React from 'react'; // import {Operator} from 'stores/RuleEngine/RuleStore.js'; // import style from '../scss/components/ruleeditor.scss'; import ExpressionComponent from './expression.react.js'; import OperatorComponent from './operator.react.js'; import Operatorslist from '../red...
'use strict'; /** * Module dependencies. */ var acl = require('acl'); // Using the memory backend acl = new acl(new acl.memoryBackend()); /** * Invoke Queues Permissions */ exports.invokeRolesPolicies = function () { acl.allow([{ roles: ['admin'], allows: [{ resources: '/api/queues', permis...
var chaosBuild = require('..');
const Discord = require('discord.js') const conf = require('./conf/conf.json') const debug = require('debug')('aymiebot:bot') const messageHandler = require('./handlers/messageHandler').handleMessage const guildHandler = require('./handlers/guildHandler').guildHandler const client = new Discord.Client({autoReconnect: ...
"use strict"; const gulp = require("gulp"); const runSequence = require("run-sequence"); const config = require("../config"); gulp.task("default", (cb) => { if (config.prod) { runSequence("build", cb); } else { runSequence("build", "server", "watch", cb); } });
/* 提供 express 客製化操作服務 */ class Express { constructor () { const express = require(`express`) this.port = null this.express = express this.app = express() this._hookMap = {} this._befRoutes = [] this._onRoutes = [] this._aftRoutes = [] } _getHook (fnName) { const hookMap = this...
const router = require('koa-router')() const controller = require('./facebook.controller') router.post('facebookLogin', '/facebook/login', controller.login) router.post('facebookSignup', '/facebook/signup', controller.signup) module.exports = router
describe("Ajax", function(){ var User; var jqXHR; beforeEach(function(){ Spine.Ajax.clearQueue(); User = Spine.Model.setup("User", ["first", "last"]); User.extend(Spine.Model.Ajax); jqXHR = $.Deferred(); $.extend(jqXHR, { readyState: 0, setRequestHeader: function() { return thi...
export const SIGNIN = 'signin'; export const LAYOUT = 'layout'; export const HELP = 'help'; export const ACCOUNT = 'account'; export const NOT_FOUND = 'notfound';
import Ember from 'ember'; import layout from '../templates/components/flix-slider'; const { Component } = Ember; export default Component.extend({ layout, page: 0, leftHandle: '❮', rightHandle: '❯', leftLabel: 'Previous', rightLabel: 'Next', actions: { showDetail(item) { this.set('detailI...
/* global d3, afterEach, beforeEach, describe, expect, it */ import Config from '../../src/guide-picker/config' import { axes, layout, makeMockData, mockDots, mockInner, mockSvg } from './mocks' describe('Config class', function () { var N = 10 var mockData = makeMockData(N) mockData.forEach(d => { ...
/* * GET users listing. */ var User = require('../models/user') , Project = require('../models/project'); /* * Making some code a module means export those parts * of its functionality */ // Request is specified in app.js // So, we don't use the req object here // Anywhere a callback is passed to a functi...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require("@angular/core"); var statIconMap_1 = require("./statIconMap"); var icon_table_pug_1 = require("./templates/icon-table.pug"); var IconTable = (function () { function IconTable() { this.statIconMap = statIconMap...
var fs = require('fs'), path = require('path'), _ = require('lodash'), moment = require('moment'), Record = require('./record'); var DATA_PATH = path.join(__dirname, '..', 'data'); var DAILY_PATH = path.join(DATA_PATH, 'daily'); function TimeTrack(exporter) { var date = getDate(); var fil...
/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // THIS CODE IS GENERATED - DO NOT MODIFY // See angular/tools/gulp-tasks/cldr/extract.js (function(global) { glo...
/* eslint-disable redux-saga/yield-effects */ import { fromJS } from 'immutable'; import { VARIABLES } from '../../constants'; import helpers from '../analyseConfig'; import selectConfigValue from '../selectConfigValue'; const initState = fromJS({ TemplateStore: { [VARIABLES]: { templates: {}, id: 1 } } }); const se...
/** * Kebab Application Bootstrap Class * * @category Kebab * @package Applications * @namespace KebabOS.applications.aboutMe.application.layouts * @author Tayfun Öziş ERİKAN <tayfun.ozis.erikan@lab2023.com> * @copyright Copyright (c) 2010-2011 lab2023 - internet technologies TURKEY Inc. (http:/...
"use strict"; (function( $ ) { function scroll_to_class(element_class, removed_height) { var scroll_to = $(element_class).offset().top - removed_height; if($(window).scrollTop() != scroll_to) { $('.form-wizard').stop().animate({scrollTop: scroll_to}, 0); } } function bar_progress(progress_line_object, di...
steal("can/util/can.js", "can/list", function (can) { var oldReplace = can.List.prototype.replace; can.List.prototype.replace = function (data) { // First call the old replace so its // deferred callbacks will be called first var result = oldReplace.apply(this, arguments); // If there is a deferred: if (...
module.exports = { findBundle: function (i, options) { return ["runtime~vendor.js", "vendor.js"]; } };
Package.describe({ name: '255kb:md-snackbars', version: '1.3.1', summary: 'Snackbars and Toasts based on Google\'s Material Design', git: 'https://github.com/255kb/md-snackbars', documentation: 'README.md' }); Package.onUse(function(api) { api.versionsFrom('1.0'); api.use(['jquery'], 'clien...
;(function(){ // popup与background域通信的方法, 可以通过这个对象直接调用其中的方法与变量 var bgField = chrome.extension.getBackgroundPage(); // 获取当前标签页对象 chrome.tabs.query({active: true, currentWindow: true}, function(tabs){ tab = tabs[0]; var opts = { tabId: tab.id, type: 'getBlocked' ...
'use strict'; require('../css/app.css'); // Bootstrap wants jQuery global let $ = require('jquery'); window.jQuery = $; let bootstrap = require('bootstrap'); let classNames = require('classnames'); let m = require("mithril"); let Controller = require('./readFileController.js'); let dndViewFromModule = re...
"use strict"; angular.module('app.graphs').directive('morrisTimeGraph', function(){ return { restrict: 'E', replace: true, template: '<div class="chart no-padding"></div>', link: function(scope, element){ var week_data = [{ "period" : "2011 W27", ...
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), clean: { lib: "lib/", dist: "dist/" }, babel: { dist: { files: [{ expand: true, cwd: "src/", src: [ "*.js" ], dest: "lib/", isFile: true }] } }, browserify: { dis...
db.user.drop(); users = [{password: '30274c47903bd1bac7633bbf09743149ebab805f', is_active: false, email: 'mary@demo.org', role:1}, {password: '8843d7f92416211de9ebb963ff4ce28125932878', is_active: true, email: 'wendy@abc.com', role:2}, {password: '30274c47903bd1bac7633bbf09743149ebab805f', is_active...
var fs = require('fs') module.exports = function (filepath) { return fs.readFileSync(filepath, 'utf8') .replace(/&#39;/g, "'") .replace(/&quot;/g, '"') .replace(/&lt;/g, '<') .replace(/&gt;/g, '>') }
'use strict'; import pathToRegex from './pathToRegex'; let id = 0; /** Класс представляет собой Путь в вашем приложении */ export default class Route { /** * Создаёт новый Route - ассоциирует некоторую view с шаблоном пути * @param {string} pathname - Шаблон пути * @param {View} view - Класс конкретной View ...
var keyboard = require('../'); keyboard.mode('breathe', { left: {color: 'red', intensity: 'med'}, middle :{color:'green', intensity:'med'}, right: {color:'green', intensity:'med'} }); keyboard.blink(['left'], 750); setTimeout(keyboard.stopBlink, 5000);
import axios from 'axios'; import { SubmissionError } from 'redux-form' //Get current user(me) from token in localStorage export const ME_FROM_TOKEN = 'ME_FROM_TOKEN'; export const ME_FROM_TOKEN_SUCCESS = 'ME_FROM_TOKEN_SUCCESS'; export const ME_FROM_TOKEN_FAILURE = 'ME_FROM_TOKEN_FAILURE'; export const RESET_TOKEN = ...
const fs = require('fs') const debug = require('debug') const logger = debug('serialport/bindings/unixRead') const { promisify } = require('util') const readAsync = promisify(fs.read) const readable = binding => { return new Promise((resolve, reject) => { binding.poller.once('readable', err => (err ? reject(err...
// Copyright (c) 2012 Ecma International. All rights reserved. // Ecma International makes this code available under the terms and conditions set // forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the // "Use Terms"). Any redistribution of this code must retain the above // copyright and this n...
// var villian = function(attack, hp, defense, opp){ // this.attack = 6; // this.hp = 10; // this.defense = 1; // }; // var enemy = new villian() // // console.log(enemy.constructor === villian) // console.log(enemy.attack + " " + enemy.hp + " " + enemy.defense) // Mission Description: // Overall mission: defe...
const BaseService=require('../core/BaseService'); const Unsubscribe=require('../../models/member/Unsubscribe'); const memberSV=require('../../services/member/WechatMemberService'); const tools=require('../../lib/tools'); class UnsubscribeService extends BaseService{ constructor(){ super(Unsubscribe,'member...
PYTUNE.Models.StarredFeed = Backbone.Model.extend({ initialize: function() { this.set('feed_title', this.get('tag')); this.views = []; }, is_social: function() { return false; }, is_feed: function() { return false; }, is_starred: function()...
/*global module:false*/ module.exports = function (grunt) { 'use strict'; grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %>\n' + '<%= pkg.homepage ...
$(document).ready(function() { init_element_lookup('friend'); })
/* Copyright (c) Royal Holloway, University of London | Contact Blake Loring (blake@parsed.uk), Duncan Mitchell (Duncan.Mitchell.2015@rhul.ac.uk), or Johannes Kinder (johannes.kinder@rhul.ac.uk) for details or support | LICENSE.md for license details */ var S$ = require('S$'); var x = S$.symbol("X", ''); var re = /^(...
/** * 專門處理表單類元件互動效果函式 */ jQuery.extend(jQuery.validator.messages, { required: "此欄位必須填寫.", remote: "輸入值檢查錯誤,請重新輸入.", email: "請輸入正確電子郵件.", url: "請輸入網址", date: "請輸入日期格式", dateISO: "請輸入有效的日期 (YYYY-MM-DD)", number: " 此欄位只能填寫數字/小數點與負號.", digits: "此欄位只能填寫數字", creditcard: "請輸入有效的信用卡號碼", ...
import {Minutes} from '../../../../imports/minutes'; import $ from 'jquery'; export const configureSelect2Labels = (minutesId, elementSelector, editItem) => { const aMin = new Minutes(minutesId); const aSeries = aMin.parentMeetingSeries(); const selectLabels = $(elementSelector); selectLabels.find('op...
import React, {Component} from "react"; import {Badge, Row, Col, TabContent, TabPane, Nav, NavItem, NavLink} from "reactstrap"; import classnames from "classnames"; class Tabs extends Component { constructor(props) { super(props); this.toggle = this.toggle.bind(this); this.state = { activeTab: '1...
// Broadcast: check control message function parse_cc_message(data) { data.command = 'bro'; data.value = 'TODO: check control message ' + hex.h2a(data.msg); return data; } // Broadcast: check control sensors function parse_cc_sensors(data) { data.command = 'bro'; data.value = 'check control sensors - '; //...
export { default } from './collection.js'; import './views.js';
import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('sub', 'helper:sub', { integration: true }); test('It subtracts values', function(assert) { assert.expect(2); this.set('input', 10); this.render(hbs`{{sub 10 5 5 input}}`); assert.equal(this.$...
var fs = require('fs'); var path = require('path'); var root = path.resolve(process.argv[2] || '.'); var pathString = path.join(root,'/views/index.html'); function index(req, res){ res.setHeader('Content-Type','text/html'); fs.readFile(pathString, function(err, file){ if(err){ console.log(err); re...
/* jshint maxlen: 200 */ var merge = require('merge-stream'); var path = require('path'); module.exports = function(gulp, plugins, options, logAndNotify, pkg) { var paths = options.paths; var commonScripts = [ paths.common.src && paths.common.src.browser, paths.common.src && paths.common.src.c...
/* Estados del reducer */ export const VER_MENU_USUARIO = 'VER_MENU_USUARIO'; export const INSERTAR_MENU_USUARIO = 'INSERTAR_MENU_USUARIO'; export const ELIMINAR_MENU_USUARIO = 'ELIMINAR_MENU_USUARIO'; export const LISTAR_MENUS_USUARIOS = 'LISTAR_MENUS_USUARIOS'; /* Estados de API */ export const ERROR_INSERTAR_M...
(function($){ rocket.pageview.sayhello = rocket.pageview.extend({ el: '#sayhello_page' ,init: function(options){ var me = this; me.setup(new rocket.subview.sayhello_header( $.extend({}, options) ,me )); me.setup(new rocket.subview.sayhel...
// ============== // Document.Ready // ============== $(document).ready(function() { common.getTournamentKey(false, true) if (common.tournamentKey) { $( '#outstream' ).html( 'Loaded tournament' );// + common.tournamentKey ); $.get( './display', {key:common.tournamentKey}, function(data) { if (data.co...
'use strict'; var assert = require('assert'); var request = require('../'); var http = require('http'); var rimraf = require('rimraf'); var path = require('path'); var InvalidationFailureCache = require('../test-fixture/invalidation-failure-cache'); rimraf.sync(path.resolve(__dirname, '..', 'cache')); var PORT = 329...
import React, { useState, useEffect } from 'react'; import classnames from 'classnames'; import Button from '../../components/Button/Button'; import SweetInput from '../../components/SweetInput/SweetInput'; import FormGroup from '../../components/Form/FormGroup'; import SearchError from './SearchError'; import { search...
'use strict'; angular.module('app') .config(['$routeProvider', function($routeProvider) { $routeProvider.when('/home', { templateUrl: 'partials/home/home.html', controller: 'HomeCtrl' }); }]) .factory('HttpHome', ['$http', function($http) { return { all : function() { return $http.get('partia...
'use strict'; const mqtt = require('mqtt'); function Client(cbConnected, cbChanged, config) { if (typeof config === 'string') config = {name: config}; config = config || {}; config.url = config.url || 'localhost'; this.client = mqtt.connect('mqtt://' + (config.user ? (config.user + ':' + config.pass...
/** * vkThread - javascript plugin to execute javascript function(s) in a thread. * https://github.com/vkiryukhin/vkthread * http://www.eslinstructor.net/vkthread/ * * @version: 0.57.00 ( February 2014 ) * * @author: Vadim Kiryukhin ( vkiryukhin @ gmail.com ) * Copyright (c) 2013 Vadim Kiryukhin * * Licens...
var gulp = require('gulp'),
 sass = require('gulp-ruby-sass')
, notify = require("gulp-notify")
, minify = require('gulp-minify-css'); uglify = require('gulp-uglify'), concat = require('gulp-concat'), rename = require('gulp-rename'), convert = require('gulp-sass'), bower = require('gulp-bower'); var config =...
var shapeMedia = function (options) { this.id = options.id; this.content = $(options.content); this.container = $(options.container); this.sdk = options.sdk; this.tab = options.tab; this.layer = options.layer; this.controller = options.controller; this.data = options.data /* set jso...
/* @flow */ import uuid from 'uuid'; import hpp from 'hpp'; import helmet from 'helmet'; import type { Middleware, $Request, $Response, NextFunction } from 'express'; import config from '../../../config'; const cspConfig = { directives: { defaultSrc: ["'self'"], scriptSrc: [ // Allow scripts hosted fr...
/** * @fileoverview Tests for jsx-handler-names * @author Jake Marsh */ 'use strict'; // ------------------------------------------------------------------------------ // Requirements // ------------------------------------------------------------------------------ const RuleTester = require('eslint').RuleTester;...
const express = require('express') const router = express.Router() const request = require('request') const client_id = process.env.CLIENTID const client_secret = process.env.CLIENTSECRET const redirect_uri = process.env.REDIRECTURI let code = null; let access_token = null; let clients = [] router.get('/', (req, re...
import { mutationTypes } from '../mutation_types'; const types = ['RESET', 'SET_ERROR', 'SET_DELETED', 'TOGGLE_LOADING']; export default m => mutationTypes(m, 'DELETE', types);
/* Author: Amachree Tamunoemi T. E-mail: emiglobetrotting@yahoo.co.uk */ define(['jquery','strippx','split_into_2d','find_row_max_h'],function($,strippx,split_into_2d,find_row_max_h){ var masonry = function($mainlist,$top_in_px){ $list = $mainlist; $lis = []; $li_list = $list.children(); $li_list.e...
function myFunction() { var x = document.getElementById("myTopnav"); if (x.className === "topnav") { x.className += " responsive"; } else { x.className = "topnav"; } } /* End Navigation Bar function */ /* Scroll to top function */ window.onscroll = function() {scrollFunction()}; fun...
/* global describe, it */ import assert from 'assert' import React from 'react' import Navigation from '../' import {mount, shallow} from 'enzyme' import {HashRouter} from 'react-router-dom' describe('Navigation', () => { it('should render as nav', () => { const wrapper = shallow(<Navigation />) assert(wrap...
/** * @depends {eip.js} */ var EIP = (function(EIP, $, undefined) { $(".sidebar_context").on("contextmenu", "a", function(e) { e.preventDefault(); if (!EIP.databaseSupport) { return; } EIP.closeContextMenu(); if ($(this).hasClass("no-context")) { return; } EIP.selectedContext = $(this); EI...
version https://git-lfs.github.com/spec/v1 oid sha256:2df883c0b9be87baf4923018977aea959d7965cfe10868913876c188219e7bce size 1869
'use strict'; (function() { // Responses Controller Spec describe('Responses Controller Tests', function() { // Initialize global variables var ResponsesController, scope, $httpBackend, $stateParams, $location; // The $resource service augments the response object with methods for updating and deletin...
var Helper = { arrayToMatrix: function(arr, limit) { var max = arr.length; if (limit == 0 || limit > max) { limit = max; } var stepSize = Math.ceil(max / limit); var list = []; var count = 0; for (let i = 0; i < stepSize; i++) { var arrItem = []; for (let j = 0; j < limit; j++) { if (count ...
/* eslint-env jest */ import webdriver from 'next-webdriver' import { join, dirname } from 'path' import fs from 'fs-extra' import url from 'url' import { renderViaHTTP, fetchViaHTTP, findPort, launchApp, killApp, waitFor, nextBuild, nextStart, normalizeRegEx, check, hasRedbox, getRedboxHeader,...
import nodeExternals from 'webpack-node-externals' import baseConfig from './webpack.base.config' export default { ...baseConfig, entry: './index', target: 'node', output: { ...baseConfig.output, filename: 'server.js' }, node: { __dirname: true }, externals: [nodeExternals()] }
module.exports = function(app, db) { app.post('/api/csp', function(req, res) { console.log(req.body); console.log(JSON.stringify(req.body)); console.log(JSON.stringify(req.body["csp-report"])); res.send("thanks!"); }); };
//= require company/company
import {connect} from 'react-redux' import {toggleMenu} from '../actions' import Navbar from '../components/Navbar/Navbar' const mapStateToProps = ({menu_open}, ownProps) => { return { menu_open } } const mapDispatchToProps = (dispatch, ownProps) => { return { hamburguerOnClick: () => { dispatch(t...
import chai from 'chai'; const should = chai.should(); import CallableType from '../../lib/core/callable-type'; import { reset } from '../../lib/core/type-registry'; describe('CallableType', function() { beforeEach(reset); afterEach(reset); it('should exist', function() { should.exist(CallableType); }); ...
console.log("Mitsuba WebSocket Server\n**************************"); //SETTINGS var port = 9003; var index = process.argv.indexOf("-p"); if(index != -1) port = parseInt( process.argv[ index + 1 ] ); //CREATE GAME ********************* var Mitsuba = require("./mitsuba.js"); //LAUNCH SERVER *************...
import React from 'react'; import withRoot from 'docs/src/modules/components/withRoot'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import markdown from './speed-dial.md'; function Page() { return <MarkdownDocs markdown={markdown} />; } export default withRoot(Page);
import '../styles/main.css' import Head from 'next/head' function MyApp({ Component, pageProps }) { return ( <> <Head> <meta charSet="utf-8" /> <meta httpEquiv="x-ua-compatible" content="ie=edge" /> <meta name="description" content="An open-source screen recorder built with web tech...
define(['app', 'angular', 'services/Pomodoro'], function (app, angular) { "use strict"; // Labels for notification var labels = { 'pomodoro': { 'title': 'Pomodoro finished!', 'body': 'Time for a break.' }, 'break': { 'title': "Break time's over!", 'body': 'Back to work.' ...
/** * Function that returns default values. * Used because Object.assign does a shallow instead of a deep copy. * Using [].push will add to the base array, so a require will alter * the base array output. */ 'use strict'; const path = require('path'); const srcPath = path.join(__dirname, '/../src'); const dfltPor...
var y = 0; var z = 0; var y2 = 0; var z = 0; function setup() { createCanvas(500,500) for (var i = 0; i < 1000; i++) { y = y + 4; z = z + 10; ellipse(25 , 25 , 55 + y, 55 +y); beginShape(); vertex(130 +z, 120 +z); vertex(195, 120 +z); vertex(195 , 185); vertex(130 + z, 185); endShape(CLOSE); noFill() ellipse(...
const RuntimeException = Jymfony.Contracts.PropertyAccess.Exception.RuntimeException; /** * @memberOf Jymfony.Contracts.PropertyAccess.Exception */ export default class AccessException extends RuntimeException { }
// @ts-check import * as React from 'react'; import ReactDOMServer from 'react-dom/server'; import { expect } from 'chai'; import { createRenderer } from 'test/utils'; import TabContext, { getPanelId, getTabId, useTabContext } from './TabContext'; describe('<TabContext />', () => { const { render, renderToString } =...
/*jshint node:true*/ module.exports = { scenarios: [ { name: 'default', bower: { dependencies: {} } }, { name: 'ember-1-13', bower: { dependencies: { 'ember': '~1.13.0' ...
import isCharJapanesePunctuation from '../../src/utils/isCharJapanesePunctuation'; import { JA_PUNC, EN_PUNC } from '../helpers/conversionTables'; describe('isCharJapanesePunctuation', () => { it('sane defaults', () => { expect(isCharJapanesePunctuation()).toBe(false); expect(isCharJapanesePunctuation('')).t...
'use strict'; function ProblemSet () { this.data = []; } ProblemSet.prototype.initialize = function (numberOfMembers) { for(var i = 0; i < numberOfMembers; i++) { this.data[i] = i; } }; ProblemSet.prototype.connect = function (first, second) { var firstRoot = rootOf(first, this.data); var...
'use strict'; describe('Controller: MainCtrl', function () { // load the controller's module beforeEach(module('testAngularApp')); var MainCtrl, scope; // Initialize the controller and a mock scope beforeEach(inject(function ($controller, $rootScope) { scope = $rootScope.$new(); MainCtrl = $co...
var info = require('./'); var assert = require('assert'); describe('info', function () { var app = function (endpoint, done) { return { get: function (endpoint_, method) { assert.equal(endpoint, endpoint_); var sender = { send: function (data...
'use strict'; var views; function VisibilityController (views) { if(!(this instanceof VisibilityController)) return new VisibilityController(views); this.views = views; } VisibilityController.prototype.hide = function (names, cb) { cb = cb || function () {}; var views = this.views; Object.keys(views) ...
var webpack = require('webpack'); var path = require('path'); var webpackMerge = require('webpack-merge'); // Webpack Config var webpackConfig = { entry: { 'main': './src/main.browser.ts', }, output: { publicPath: '', path: path.resolve(__dirname, './dist'), }, plugins: [ new webpack.Contex...
(function($) { /** * Russian language package * Translated by @cylon-v. Improved by @stepin, @oleg-voloshyn */ $.fn.bootstrapValidator.i18n = $.extend(true, $.fn.bootstrapValidator.i18n, { base64: { 'default': 'Пожалуйста, введите корректную строку base64' }, b...
'use strict'; const _ = require('lodash'); const fs = require('fs'); const logger = require('morgan'); const path = require('path'); const process = require('process'); const rfs = require('rotating-file-stream'); module.exports = function logger_middleware(options) { let log_path = path.resolv...
let doc = null if (typeof window !== 'undefined' && window.document) doc = window.document export function setDocument (newDoc) { doc = newDoc return doc } export function getDocument () { if (!doc) { throw new Error('Need to call domator.setDocument(document) first.') } return doc }
// @flow const _ = require('lodash/fp'); const { getPrettierInstance, someGlobsMatchFilePath, isFileFormattable, isPrettierProperVersion, } = require('../helpers'); const { getCurrentFilePath } = require('../editorInterface'); const { getExcludedGlobs, getWhitelistedGlobs, isFormatOnSaveEnabled, isDisab...
var Base = require('./base'); var Text = Base.extend({ template: require('./link.html'), paramAttributes: ['href', 'target'], data: function() { return { href: '', target: '' }; } }); module.exports = Text;
import React from 'react'; import PropTypes from 'prop-types'; import { Provider } from 'react-redux'; import App from './App'; import ErrorBoundary from 'components/Sentry/ErrorBoundary'; const Root = ({ store, history }) => ( <ErrorBoundary> <Provider store={store}> <App history={history} /> </Provid...
define(['module'], function (module) { 'use strict'; var parser = new window.DOMParser(); (function (parser) { var proto_parseFromString = window.DOMParser.prototype.parseFromString; // Firefox/Opera/IE throw errors on unsupported types try { // WebKit returns null on unsupported types ...
const { h, Component } = require("preact"); const Joyplot = require("./Joyplot"); const Pulse = require("./Pulse"); const Control = require("./Control"); const Vegas = require("./Vegas"); const styles = require("./App.scss"); const interactiveElement = document.querySelector( "[data-as-time-goes-by-root]" ); cons...
/*eslint no-console: ["off"]*/ const log2console = require("log2console"); const z = require("./z"); const X = require("./X"); function Y() { console.log(X, typeof X); console.log("Say Y"); z().potatoes(); } module.exports = Y;
/* Created By: John Kadyszewski if you want to use this code please give credit and link back to kadyszewski.com. thank you. */ /*changelog*/ /* --maded resume scalar(need to apply to the rest of the site) --DOUBLE CHECK SCALARS. */ // Create the canvas var canvas = document.createElem...
/* eslint unicorn/filename-case: "off", func-names: "off", camelcase: "off", no-unused-vars: "off" */ module.exports = function (iface) { const {mqttPub, mqttSub, mqttStatus, log, Service, Characteristic} = iface; return function createService_GarageDoorOpener(acc, settings, subtype) { if (typeof sett...
var info; var translations; // Load the Visualization API and the piechart package. google.load('visualization', '1', {'packages':['corechart','table','imagechart']}); var table1; var grades = ['Z','L','W','S','P']; var grade_labels = {'Z':'Zero','L':'Letter','W':'Word','S':'Sentence','P':'Paragraph'}; String.prototy...