code
stringlengths
2
1.05M
"use strict"; var config = require('../config'); var routermgr = require('../lib/routermgr'); //<--require Begin //<--require End const URLROOT = '{{currouter.urlroot}}'; const URL = {{{currouter.urlstr}}}; const HTTPTYPE = routermgr.HTTP_{{currouter.http}}; const NEEDLOGIN = {{currouter.needlogin}}; class Router_{...
'use strict'; var Color = require('../../components/color'); var heatmapHoverPoints = require('../heatmap/hover'); module.exports = function hoverPoints(pointData, xval, yval, hovermode, hoverLayer) { var hoverData = heatmapHoverPoints(pointData, xval, yval, hovermode, hoverLayer, true); if(hoverData) { ...
createTest('Nested route with the many children as a tokens, callbacks should yield historic params', { '/a': { '/:id': { '/:id': function(a, b) { shared.fired.push(location.hash, a, b); } } } }, function() { shared.fired = []; this.navigate('/a/b/c', function() { deepEqual(shar...
YUI.add('dom-style-ie', function (Y, NAME) { var HAS_LAYOUT = 'hasLayout', PX = 'px', FILTER = 'filter', FILTERS = 'filters', OPACITY = 'opacity', AUTO = 'auto', BORDER_WIDTH = 'borderWidth', BORDER_TOP_WIDTH = 'borderTopWidth', BORDER_RIGHT_WIDTH = 'borderRightWidth', BORDER_BOTTO...
const {Models} = require('../db'); const util = require('./util'); module.exports = router => { util.b(router, 'promos'); router.post('/promos', (req, res) => { const promoToSave = req.body; console.log(promoToSave); if (!promoToSave.id) { Models.promos.create(promoToSave)...
"use strict"; var utils = require("../utils"); var log = require("npmlog"); function formatData(data) { return { userID: utils.formatID(data.uid.toString()), photoUrl: data.photo, indexRank: data.index_rank, name: data.text, isVerified: data.is_verified, profileUrl: data.path, category: ...
/* Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ if(!dojo._hasResource["dojox.drawing.manager.Canvas"]){ //_hasResource checks added by build. Do not use _hasResource direc...
/* jshint node:true */ 'use strict'; var Node = require('./node.js'), sys = require('sys'); /** * A processing instruction provides an opportunity for application-specific instructions to be embedded within XML * and which can be ignored by XML processors which do not support processing their instructions (out...
/** * @fileoverview added by tsickle * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ goog.module('test_files.generic_fn_type.generic_fn_type'); var module = module || { id: 'test_files/generic_fn_type/generic_fn_type.ts' }; modul...
"use strict"; /* Quiz App */ /* Controllers */ // Main page controller angular.module("wuzQuizFrontendApp.controllers").controller("MainCtrl", function($scope, $stateParams, $rootScope,Session) { $scope.$on("identifyStatusChanged", function(args, payload) { console.log(payload); $scope.noticeMessage = payload; ...
var gulp = require('gulp'); var browserSync = require('browser-sync'); var sass = require('gulp-sass'); var sourcemaps = require('gulp-sourcemaps'); var handleErrors = require('../util/handleErrors'); var config = require('../config').sass; var autoprefixer = require('gulp-autoprefixer'); gulp...
"use strict"; function MainCtrl () { } angular .module('admin.ngApp', ['ngAnimate', 'ngSanitize', 'mgcrea.ngStrap']) .controller('MainCtrl', MainCtrl) .config(["$asideProvider", function($asideProvider) { angular.extend( $asideProvider.defaults,{container:"body",html:!0} ...
/* * app.js */ var config = require('./config') // 用于生产环境 if (!config.debug) { } require('colors'); var path = require("path"); var Loader = require("loader"); var express = require("express"); var errorhandler = require('errorhandler'); var session = req...
'use strict'; (function() { // Sciprotos Controller Spec describe('Sciprotos Controller Tests', function() { // Initialize global variables var SciprotosController, scope, $httpBackend, $stateParams, $location; // The $resource service augments the response object with methods for updating and deletin...
/** * Index Template By => create-module script * @version 1.0.0 * */ export { default } from './PublicationAddToListFormContainer';
if (typeof window !== 'undefined') { window.Tracker = require('./index'); }
'use strict'; const Promise = require('bluebird'); const bcrypt = Promise.promisifyAll(require('bcrypt')); const Model = require('./model'); /** * A simple user model. Part of the schema is implicitly inherited from Model, * i.e., the primary key and the timestamps. */ class User extends Model { get childSchem...
import React from 'react'; class ProgressBar extends React.Component { render() { let value = this.props.children !== null ? <div className="progress-bar-label-value">{this.props.children}</div> : null; return <div className={`progress-bar${value === null ? ' progress-bar__s...
import {inject, bindable} from 'aurelia-framework'; import {Collections} from 'services/collections'; import {DataContext} from 'services/datacontext'; import {Character, Person} from 'models/index'; @inject(Collections, DataContext) export class Home{ heading = 'Choose a planet...'; @bindable selectedPlanet; ch...
'use strict'; /* Controllers */ (function(module) { module.controller('ResumeCtrl', ['$timeout', '$scope', function($timeout, $scope) { }]); })(window.CtrlModule);
// Generated by IcedCoffeeScript 1.8.0-a (function() { module.exports = function() { if (this.shouldLoadScript) { coffeescript(function() { return window.minicms_component_markdown = function(prefix, form, name) { var editor, field; field = $('#field-' + form + '-' + name); ...
var app = angular.module('cc98.controllers') app.controller('boardSubCtrl', function ($scope, $http, $stateParams) { $scope.title = $stateParams.title; $scope.doRefresh = function () { var boardRootId = $stateParams.id; $http.get('http://api.cc98.org/board/' + boardRootId + '/subs') .suc...
import React from 'react'; import IconBase from './../components/IconBase/IconBase'; export default class Chatbubble extends React.Component { render() { if(this.props.bare) { return <g> <path d="M256,449.4c28.9,0,56.4-5.7,81.3-15.9c0.6-0.3,1.1-0.5,1.7-0.7c0.1,0,0.2,0,0.2-0.1c3.5-1.3,7.3-2,11.2-2 c4.3,0,8.4,0.8,...
import html from 'bel' import Events from 'plug/core/Events' import ShowUserRolloverEvent from 'plug/events/ShowUserRolloverEvent' import users from 'plug/collections/users' import getUserClasses from 'extplug/util/getUserClasses' export default function UserBadge (uid) { const user = users.findWhere({ id: uid }) ...
var geometry__rect_8h = [ [ "reduce", "namespacehryky_1_1geometry.html#a18354ece30244aa68fc3744f2cdb41fc", null ], [ "swap", "namespacehryky_1_1geometry.html#a73028b267b1f3811ebacb86acbee6742", null ] ];
/* * reqHelper.js * https://github.com/skalio/teambeamjs * * Copyright (c) 2015 Skalio GmbH * Licensed under the MIT license. * * @license */ /* global process */ 'use strict'; var Q = require('q'), fs = require('fs'), request = require('request'), https = require('https'), settings = require('./setting...
/* global Chart */ 'use strict'; window.chartColors = { red: 'rgb(255, 99, 132)', orange: 'rgb(255, 159, 64)', yellow: 'rgb(255, 205, 86)', green: 'rgb(75, 192, 192)', blue: 'rgb(54, 162, 235)', purple: 'rgb(153, 102, 255)', grey: 'rgb(201, 203, 207)' }; window.randomScalingFactor = function() { return (Math...
'use strict' const voucherifyClient = require('../src/index') const voucherify = voucherifyClient({ applicationId: 'c70a6f00-cf91-4756-9df5-47628850002b', clientSecretKey: '3266b9f8-e246-4f79-bdf0-833929b1380c' }) const payload = { name: 'Apple iPhone 6', metadata: { type: 'normal' }, attributes: [ ...
"use babel"; import github from './github'; import git from './git'; module.exports = {github, git};
// Database.js module.exports = function Database(configuration) { var mongoose = require('mongoose'); var mongooseUri = process.env.MONGO_STRING || process.env.MONGOLAB_URI || process.env.MONGOHQ_URL || 'mongodb://' + configuration.host + configuration.database; console.log('mongooseURI = ' + mongooseUri); ...
var request = require('request'); var et = require('elementtree'); var prettyBytes = require('pretty-bytes'); module.exports = { list: function (folder) { console.log(''); var folders = folder.findall('folders/folder'); folders.forEach(function(folder) { if (!folde...
import { combineReducers } from 'redux' import FiltersReducer from './FiltersReducer' import TasksReducer from './TasksReducer' module.exports = combineReducers({ tasks: TasksReducer, filters: FiltersReducer, })
module.exports = function (a, b, options) { if (a === b) { return options.fn(this); } };
var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Util = require('../../Util'); var SaklientException = require('../../errors/SaklientException'); ...
/* eslint-disable no-console */ import express from 'express' import webpackDev from './middleware/webpackDev' import webpackHot from './middleware/webpackHot' import apiProxy from './middleware/apiProxy' import serve from './middleware/serve' const app = express() app.use(webpackDev) app.use(webpackHot) /* Proxy api...
module.exports = { avgColour: require("./avg-colour"), centreColour: require("./centre-colour") };
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = global || self, (global.promisify = global.promisify || {}, global.promisify.js = factory())); }(this, (function () { '...
describe("Propagators", function() { describe("DDPropagator", function() { it('supports DD trace headers', function() { const propagator = new lightstep.DDPropagator(); let headers = { 'x-datadog-trace-id': '100000000000456', 'x-datadog-paren...
define([ "jquery" ], function($) { var jQuery = $.noConflict(true); jQuery.fn.setVisible = function(visible) { return visible ? this.show() : this.hide(); } return jQuery; });
var expressions = require('./expressions'), each = require('std/each'), curry = require('std/curry'), throttle = require('std/throttle'), addClass = require('fun-dom/addClass'), removeClass = require('fun-dom/removeClass'), on = require('fun-dom/on'), off = require('fun-dom/off'), arrayToObject = require('std/a...
/** * Requires. */ var util = require('util'); var Directive = require('./Directive'); /** * Exports. */ module.exports = InvalidDirective; util.inherits(InvalidDirective, Directive); function InvalidDirective() { // Nothing to do. }; /** * @Override Directive.process(). */ InvalidDirective.prototype.process ...
/** * Created by msav on 3/11/2017. */ var app = angular.module("dmsApp"); app.factory("documentService", function ($http, configService) { return { getTypesForCompany: function (vat) { return $http.get(configService.getConfig().host+"/document/getDocumentTypes/" + vat); } } });
'use strict'; const lexers = require('occam-lexers'); const TerminalPart = require('../../part/terminal'), EpsilonTerminalNode = require('../../../common/node/terminal/epsilon'); const { specialSymbols } = lexers, { epsilon } = specialSymbols; class EpsilonPart extends TerminalPart { parse(configurati...
const checkContext = require('./check-context'); module.exports = function () { return function (context) { checkContext(context, 'before', ['find'], 'disablePagination'); const $limit = (context.params.query || {}).$limit; if ($limit === '-1' || $limit === -1) { context.params.paginate = false; ...
/* eslint-disable no-console */ import fs from 'fs' import crypto from 'crypto' import { resolve } from 'path' import { Dir, DEV_PATH } from '../config' import transformFiles from './transform-files' const dirs = [ resolve(Dir.dist, 'js'), resolve(Dir.dist, 'css'), ] const mapData = {} function transformer(...
(function () { "use strict"; angular .module("ataCashout.results") .directive("resultPanel", resultPanel) .controller("ResultPanelController", ["$scope", ResultPanelController]); function resultPanel() { return { restrict: "E", scope: { result: "=", }, control...
import React from 'react'; import { NavLink } from 'react-router-dom'; const NavItem = ({ sub, toggleCollapse }) => ( <button onClick={() => { toggleCollapse(); }}> <NavLink to={sub.url} style={{display: 'block', height: '100%', textDecoration: 'none'}} > {sub.display_name} </Na...
var apiTester = require('./api-crud-executor.js'); apiTester({ name: 'FeatureAPI', baseurl: 'http://localhost:3000', baseapi: '/api/feature', resCacheData: [], resCacheKeys: function (response) { return {'id': response.id, 'name': response.name}; }, t...
define([ "jquery", "require", "./util", "./fb", "./server", "jquery.ui", "jquery.jcrop", "jquery.facedetection", "jquery.photobooth" ], function($, require) { var util = require("./util"); var fb = require("./fb"); var server = require("./server"); var jcropApi; /* ...
module.exports = function (grunt) { grunt.loadNpmTasks("grunt-contrib-uglify"); grunt.loadNpmTasks('grunt-karma'); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.initConfig({ uglify: { dev: { files: { 'app/js/app.min.js': ['app/js/app.js', 'app/...
class NotAnnotatedClass { constructor(name) { this.name = name } print() { console.log(this.name) } } class MyLogger { /** * @injectable(logger) */ constructor() { this.prefix = "app:" } log(message) { console.log(this.prefix + message) } } class MyDebugger { /** * @injectable(debugger) * @i...
var _ = require("lodash"); var fs = require("fs-extra"); module.exports = function(options) { options = _.extend({ file: "data.json", saveFrequency: 1, indexing: false }, options); var lastSaved = 0; //If the specified file doesn't exist, we create an empty JSON object if (!fs.existsSync(options.file)) {...
var React = require('react'); var KeyCode = require('./utils/key-code'); var StylePropable = require('./mixins/style-propable'); var AutoPrefix = require('./styles/auto-prefix'); var Transitions = require('./styles/transitions'); var WindowListenable = require('./mixins/window-listenable'); var Overlay = require('./ove...
// libs import { Component } from 'react'; import 'antd/dist/antd.css'; import { connect } from 'react-redux'; import Immutable from 'seamless-immutable'; import { Table, Card, Icon, Tag, Button } from 'antd'; import ReactJson from 'react-json-view'; import { openModal } from '../actions/modal.action'; import { createS...
'use strict'; const fs = require('fs'), Emitter = require('events').EventEmitter, emitter = new Emitter(), eventState = require('event-state'), dirTree = (path, cb) => { const buildBranch = (path, branch) => { fs.readdir(path, (err, files) => { if (err) { ...
var socket = io.connect(SAILFISH_SERVER); socket.on('connect', function () { socket.emit('browser-connected'); }); socket.on('runners.status', function(runners) { $("#runnerContainer").empty(); if(!_.isEmpty($("#runnerContainer"))) { _.each(runners, function(runner) { if(runner.lock...
import { Point } from "../lib/point.js"; import { ITextEditor } from "../lib/text-editor.js"; // This is a mock class of the ITextEditor interface export class TextEditor extends ITextEditor { constructor(lines) { super(); this._lines = lines.slice(); this._cursorPos = new Point(0, 0); this._selectio...
module.exports = { 'slogan': 'Find your next home or find your next place where you will be on yours vacations.', 'home': 'Home', 'about': 'About', 'login': 'Login', 'register': 'Register', 'publish': 'Publish', 'support': 'Support', 'contact-us': 'Contact Us', 'help': 'Help', 'privacy': 'Privacy', 'terms': ...
// Load the given HTML in the iframe within the given element function view(viewer_id, html) { var iframe = $("#" + viewer_id + " iframe", top.document); var doc = iframe[0].contentWindow.document; doc.open(); doc.write(html); doc.close(); } // Create a new ACE editor in the div with the given id, and return...
"use strict"; ace.define("ace/snippets/typescript", ["require", "exports", "module"], function (e, t, n) { "use strict"; t.snippetText = undefined, t.scope = "typescript"; });
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---------------------------------------------------------------...
// Karma configuration // Generated on 2016-09-23 module.exports = function(config) { 'use strict'; config.set({ // enable / disable watching file and executing tests whenever any file changes autoWatch: true, // base path, that will be used to resolve files and exclude basePath: '../', // t...
var hostnames = []; var tabHostnames = {}; var recipeCounters = {}; chrome.browserAction.setBadgeBackgroundColor({ color: '#000', }); chrome.tabs.query({}, function(results){ for(var i in results){ var tab = results[i]; handleBrowserAction(tab); } }); chrome.tabs.onUpdated.addListener(function(tabId, i...
/* --- Made by justgoscha and licensed under MIT license --- */ var app = angular.module('autocomplete', []); app.directive('autocomplete', function() { var index = -1; return { restrict: 'E', scope: { searchParam: '=ngModel', suggestions: '=data', onType: '=onType', onSelect: '=o...
import { formatSha as _formatSha, safe } from 'travis/utils/helpers'; import Ember from "ember"; export default Ember.Helper.helper(function(params) { return safe(_formatSha(params[0])); });
// Easing functions var easing = require('./src/easing'); // Component transformers var inertial = require('./src/inertial'); var interpolation = require('./src/interpolation'); var transition = require('./src/transition'); var interpolate = require('./src/interpolate'); var easeFocused = require('./src/easeFocused');...
/*jslint white: true, nomen: true */ // http://www.jslint.com/lint.html#options (function(win, doc) { // todo: bug - after resize on ios - smoke is wrong 'use strict'; /*global window, document, setTimeout, history, Image */ /*global Backbone, $, templateMaster, APP, log, Mover, _ */ win.APP = win...
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon")); var _jsxRuntime = require("react/jsx-runtime")...
import React, { Component } from 'react'; import { Menu, Dropdown, Button, Icon, message } from 'antd'; import { Link } from 'react-router'; import EmployeeTable from './table'; import { memberShip, employee, columns } from '../../accessConfig/employeeList'; import DropdownList from './../../commons/dropdown'; import {...
define(['exports', './error-renderer'], function (exports, _errorRenderer) { 'use strict'; exports.__esModule = true; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } function _inherits(subClass, superCla...
var wxCharts = require('../../../utils/wxcharts.js'); var app = getApp(); var lineChart = null; var startPos = null; Page({ data: { }, touchHandler: function (e) { lineChart.scrollStart(e); }, moveHandler: function (e) { lineChart.scroll(e); }, touchEndHandler: function (e) {...
'use strict'; // // Scheduled or immediate backup. // var exec = require('child-process-promise').exec; var argv = require('yargs').argv; var quote = require('quote'); var moment = require('moment'); var path = require('path'); var Q = require("q"); var conf = require('confucious'); conf.pushJsonFile("config.json")...
/* * Copyright (C) 2014 Daiki Nogami. * All rights reserved. */ 'use strict'; var uploadFile = function(req, res) { var formidable = require('formidable'); var fs = require('fs'); var util = require('../lib/util'); var logger = require('../lib/debugLog'); var form = new formidable.IncomingForm(...
/* brackets-xunit: jasmine */ /* brackets-xunit: includes=bower_components/lodash/dist/lodash.js,bower_components/bilby.js/bilby.js,bower_components/mithril/mithril.js,js/utilities.js,js/engine.js,js/objects.js,js/controller.js,js/events.js */ //,ui.js /* global describe, it, expect, t, _, bilby */ /*jslint asi: true*/...
var later = require("../index"); console.log(JSON.stringify({ "name": "later", "version": later.version, "main": "./later.js" }, null, 2));
// Copyright (c) 2015 Uber Technologies, Inc. // // 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 // to use, copy, modify, merge...
// @koala-prepend "js-polyfill.js" // @koala-prepend "nw.js-base-framework/source/js-base/!.js" // @koala-prepend "nw.js-base-framework/source/js-base/libs/jquery-2.1.3.min.js" // @koala-prepend "nw.js-base-framework/source/js-base/_g-variables.js" // @koala-prepend "nw.js-base-framework/source/js-base/_g.js" // @ko...
/** section: Language * class String * * Extensions to the built-in `String` class. * * Prototype enhances the [[String]] object with a series of useful methods for * ranging from the trivial to the complex. Tired of stripping trailing * whitespace? Try [[String#strip]]. Want to replace `replace`? Have a loo...
/* This file includes the code of TS Diagnostics error that should also be thrown from babel-parser. The TypeScript parser is highly tolerant on errors so these error would not produce parseDiagnostics which can be checked in the parser test runner. We check these error codes against the stderr log in the build/typescr...
// @flow import React, { Component } from 'react' import styled from 'styled-components' import { injectIntl, type IntlShape } from 'react-intl' import LoginButton from './LoginButton' import Loading from './Loading' import ErrorNotify from './ErrorNotify' import Input from './Input' import Feild from './Feild' import ...
Template.pool.helpers({ poolOrder: function(fencers) { var poolOrder = [ {"left": 1, "right": 2}, {"left": 3, "right": 4}, {"left": 5, "right": 1}, {"left": 2, "right": 3}, {"left": 5, "right": 4}, {"left": 1, "right": 3}, {"left": 2, "right": 5}, {"left": 4, "right...
import Button from '../Button'; import React from 'react'; import ReactTestUtils from 'react-dom/test-utils'; import renderer from 'react-test-renderer'; test('render button with correct label', () => { const mockCallback = jest.fn(); const button = renderer.create( <Button onClick={mockCallback} className="b...
/*! * Piwik - Web Analytics * * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function initDashboard(dashboardId, dashboardLayout) { // Standard dashboard if($('#periodString').length) { $('#periodString').after($('#dashboardSettings')); ...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
var gulp = require('gulp'); var browserSync = require("browser-sync").create(); var nodemon = require('gulp-nodemon'); var browserify = require('browserify'); //Bundles JS var reactify = require('reactify'); //Transforms React JSX to JS var source = require('vinyl-source-stream'); // Use conventional text streams with ...
// Perform a request against the simplepushclient server var doRequest = function doPost(type, uri, data, cb) { var xhr = new XMLHttpRequest({mozSystem: true}); xhr.onload = function onLoad(evt) { if (xhr.status === 200 || xhr.status === 0) { cb(null, xhr.response); } else { cb(xhr.status); ...
import React from "react" import { Global } from "@emotion/core" import { css } from "theme-ui" import { Layout, Main, Container } from "theme-ui" export default props => ( <> <Global styles={css({ "*": { boxSizing: `border-box`, }, body: { margin: 0, f...
import React from 'react'; import { Link } from 'react-router'; const App = () => ( <div> <h1>Hello App</h1> <Link to="/snap">SNAP!</Link> </div> ); export default App;
var total_records = 0; var url; var total_groups; var id; var loading = false; function initScroll(total_groups, url, id) { this.total_groups = total_groups; this.url = url; this.id = id; loading = true; $('#loader_image_div').show(); $.post(url + id,{'group_number': total_records}, function(data){ ...
import React from 'react'; import { LinkHijacker } from '@r/platform/components'; // A pass-through for node-platform's `LinkHijacker` // that has the a regexp for catching all links that look like reddit links. export default function(props) { const { onLinkClick, children } = props; return ( <LinkHijacker ...
/** * Is Provided object an RegExp? * * @param {*} object * @returns {boolean} */ export default function isRegExp(object) { return object instanceof RegExp; }
"use strict" const messages = require("..").messages const ruleName = require("..").ruleName const rules = require("../../../rules") const rule = rules[ruleName] testRule(rule, { ruleName, config: [true], accept: [ { code: ":fullscreen a {}", }, { code: ":root { --custom-property: {} }", }, { ...
'use strict'; const test = require('tape'); const express = require('express'); const rested = require('../lib'); class MyResource { constructor(id, info) { this.id = id; this.info = JSON.parse(JSON.stringify(info)); } createId() { this.id = 'foo'; return this.id; } } test('Core APIs', function (t) { ...
var Utils = { path: function(bucket, key) { return bucket + '/' + (key ? key : ''); }, toQuery: function(query, riak) { // use boolean strings since riak expects those for (var k in query) { if (typeof query[k] == 'boolean') { query[k] = String(query[k]); } } return r...
import firebase from 'firebase'; try { var config = { apiKey: "AIzaSyDbDlzyK4-lW-tAmL7XMK4CpgsX2JsAOs4", authDomain: "cristian-todo-app.firebaseapp.com", databaseURL: "https://cristian-todo-app.firebaseio.com", projectId: "cristian-todo-app", storageBucket: "cristian-todo-app.appspot.com", messaging...
/*! lilmvc - v0.0.7 - 2013-02-12 * Copyright (c) 2013 August Hovland <gushov@gmail.com>; Licensed MIT */ (function (ctx) { "use strict"; var defined = {}; var exported = {}; function resolve(from, name) { if (name.indexOf('.') === -1) { return name; } name = name.split('/'); from = ...
//Problem: Hints are shown even when form is valid //Solution: Hide and show them at appropriate times var $password = $("#password"); var $confirmPassword = $("#confirm_password"); //Hide hints $("form span").hide(); function isPasswordValid() { return $password.val().length > 8; } function arePasswordsMatching() ...
"use strict"; exports.__esModule = true; var token_1 = require("./token"); var utils = require("./utils"); var AbstractScanner = (function () { function AbstractScanner(source, config) { this.source = source; this.marker = { index: 0, line: 1, column: 1 };...
'use strict' import { ContactPage } from './contactPage' module.exports = { ContactPage, }
const GatsbyThemeAdvanced = jest.requireActual("gatsby-theme-advanced"); jest.mock("gatsby-theme-advanced/src/config/useConfig", () => { const configFixture = jest.requireActual("../test/fixtures/config").default; return jest.fn().mockReturnValue(configFixture); }); module.exports = { ...GatsbyThemeAdvanced, };...