code
stringlengths
2
1.05M
/* * Module dependencies. */ var t = require('t'); var Emitter = require('emitter'); var domify = require('domify'); var empty = require('empty'); var events = require('events'); var classes = require('classes'); var serialize = require('serialize'); var regexps = require('regexps'); var form = require('./resend-val...
const express = require('express'); const path = require('path'); const favicon = require('serve-favicon'); const logger = require('morgan'); const bodyParser = require('body-parser'); const sass = require('node-sass-middleware'); const index = require('./routes/index'); const app = express(); // view engine setup ap...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var colours = exports.colours = { "viewBox": "0 0 20 20", "children": [{ "name": "path", "attribs": { "d": "M3.179,5.998C2.756,5.648,2.122,5.708,1.771,6.13L0.494,7.669c-0.35,0.423-0.291,1.058,0.131,1.407l7.888,6.542L4.706,7.264\r\n\tL3.179,...
{ "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, "features": [ { "type": "Feature", "properties": { "Unnamed: 0": 0, "Incident Number": 72120099, "Date": "07\/31\/2007", "Time": "08:44 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE...
// Karma configuration 'use strict'; 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.org/browse/keyword/karma-adapter frameworks: ['mocha', ...
import React from 'react'; import { NavLink } from 'react-router-dom'; import pathToRegexp from 'path-to-regexp'; const ParamLink = ({ children, match: { url = '', path = '', params: currentParams = {} } = {}, location: { pathname = '' } = {}, params = {}, }) => { const urlPartToInsert = pathToRegexp.compile...
"use strict" var iota = require("iota-array") var arrayMethods = [ "concat", "join", "slice", "toString", "indexOf", "lastIndexOf", "forEach", "every", "some", "filter", "map", "reduce", "reduceRight" ] function compare1st(a, b) { return a[0] - b[0] } function order() { var stride = th...
module.exports = function stats () { return { vaoCount: 0, bufferCount: 0, elementsCount: 0, framebufferCount: 0, shaderCount: 0, textureCount: 0, cubeCount: 0, renderbufferCount: 0, maxTextureUnits: 0 } }
webpackJsonp([2,10,9],{ /***/ 85: /***/ function(module, exports, __webpack_require__) { 'use strict'; var t = __webpack_require__(86); module.exports = t; /***/ }, /***/ 86: /***/ function(module, exports) { "use strict"; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? f...
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react"), require("react-redux"), require("vue"), require("react-dom"), require("redux"), require("vue-router"), require("vuex")); else if(typeof define === 'fun...
/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails react-core * @jest-environment node */ 'use strict'; let React; let ReactNativeRT; let RTManager; describe('ReactNativeRT'...
#!/bin/env node /*! * * Gumer Playstation Network API * v0.1.2 * --- * @desc A simple example of usage using Express, it returns the Raw object from Sony' servers * @author José A. Sächs (admin@jsachs.net / admin@smartpixel.com.ar / jose@animus.com.ar) * */ //Get the environment variables we need. var ipaddr = proc...
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const autoprefixer = require('autoprefixer'); const WriteFilePlugin = require('write-file-webpack-plugin'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const path = require('path'); module.exports = { entry: { jcgj: './src/index...
import os from 'os'; import childProcess from 'child_process'; import treeKill from 'tree-kill'; import { getJreBinaryPath } from '../updaters/jre-updater'; import { getJoalJarPath, getJoalConfigPath } from '../updaters/joal-updater'; const uuidv4 = () => 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => ...
'use strict'; const { and } = require('../lib/utils'); const assert = require('assert'); describe('The utility module', () => { it('provides a logical AND method', () => { assert(and(true)); assert(and(true, true)); assert(and(true, false) === false); assert(and(true, null) === false); assert(an...
/** * Cesium - https://github.com/AnalyticalGraphicsInc/cesium * * Copyright 2011-2017 Cesium Contributors * * 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.org/l...
import _ from 'underscore'; /** * Merge fetched array or object into local data * TODO: Too manual. Use normalizr or something else. * * @param {Array} oldList * @param {Array|Object} response */ export default function mergeResponse(oldList, response) { const newList = _.isArray(response) ? response : [respon...
const db_control = require('./database/db_control')() function model() { function create(req, user, callback) { db_control.newRequest({ type: 'write', filename: user.guid, folder: 'data_user', json: JSON.stringify(user), callback: createResponse ...
export default class DeviceProcessorController { constructor(adb) { this.adb = adb; this.stats = null; this.cpus = null; this.loads = []; } init(device) { this.adb.client.openProcStat(device.id).then(stats => { stats.on('load', load => { t...
let stack = { init(){ this.peek(); }, listenObjById(id, type, callback){ return document.getElementById(id).addEventListener(type, callback); }, peek(){ let obj = this.listenObjById('stack', 'click', () => { function Stack(){ let item = []; ...
/** * @author adoankim <adoankim@alumnos.uvigo.es> * @copyright 2014 adoankim * @license {@link https://github.com/adoankim/PhaserGoF/blob/master/LICENSE|MIT License} * * testCell.js */ var chai = require('chai'); var assert = chai.assert, expect = chai.expect, should = chai.should(); va...
'use strict'; var PDF = require('pdfkit'); var utils = {}; var cmToPx = val => val * 0.393701 * 72; var round = number => Math.max(Math.floor(number), 1); utils.addText = (doc, text, start, end) => { doc.text(text.substring(start, end), { continued: true }); }; utils.getDocument = options => { var margin = ...
const { presetWeb } = require('@fower/preset-web') const { upFirst } = require('@fower/utils') const { SemicolonPreference } = require('typescript') const { join } = require('path') const { Project } = require('ts-morph') /** init somethings */ const project = new Project() const cwd = process.cwd() const outPath = jo...
/*! * reveal.js * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2016 Hakim El Hattab, http://hakim.se */ (function( root, factory ) { if( typeof define === 'function' && define.amd ) { // AMD. Register as an anonymous module. define( function() { root.Reveal = factory(); return root.Re...
version https://git-lfs.github.com/spec/v1 oid sha256:003c3749900eed542c4a51a783613447038d150af5104611b86512c09624b166 size 81666
// Generates Markdown-formatted API documentation from module/command help functions. import { compileHelp } from '../src/cli.js'; import * as utils from '../src/utils.js'; import * as log from '../src/log.js'; import { setConfigDirs } from '../src/store.js'; import allCommands from '../src/commands/index.js'; setCon...
import React from 'react'; import { shallow } from 'enzyme'; import { expect } from 'chai'; import TaskForm from '../index'; describe('<TaskForm />', () => { it('should render task form', () => { const wrapper = shallow(<TaskForm handleSubmit={() => {}} />); const formInput = wrapper.find('input'); ex...
class IssueList { /** * @param {Element} element */ constructor (element) { this.element = element; this.issues = this.element.querySelectorAll('.issue'); } /** * @returns {number} */ count () { return this.element.querySelectorAll('.issue').length; }...
'use strict'; var siofu = require("socketio-file-upload"); module.exports = siofu;
{ return unsafeUnwrap(this).id; }
// shared setup code var Backbone = require('backbone'); var Marionette = require('backbone.marionette'); var _ = require('underscore'); // Sidestep jquery being required on the server Marionette.$ = function() {}; _.extend(Marionette.$, require('underscore.deferred')); var App = new Marionette.Applicatio...
version https://git-lfs.github.com/spec/v1 oid sha256:988c41ad22eadaac6727eefc9f5d47cbbab46512694f1cc026fe8fe2b22aca04 size 43912
'use strict'; // Dependencies const fs = require('fs-extra') const path = require('path') const readdir = require('recursive-readdir') function readSourceDir(dir) { return new Promise(function resolver(resolve, reject) { readdir(dir, function callback(err, contents) { if (err) return reject(err) res...
// Override TXHRTransport.flush // // The 0.9.2 transport flush() method implementation only calls the callback on // status 200 and never invokes the client callback on HTTP status errors. This // replaces the implementation with one that always calls the callback, // including on errors and exceptions. Thrift.TXHRTr...
import React, { Component } from 'react'; class todoItem extends Component { constructor(props) { super(props); this.state = {}; } getColor(priority, completed) { const itemDesc = this.props.desc; console.log(`[Debug]getting color for ${itemDesc}`); if (completed) { return '#757575'; ...
/** * Created by dsmiley on 7/11/17. */ describe('Lavender.Point', function(){ it('Testing Lavender.Point', function() { var point = new Lavender.Point(); expect(point.x).toBe(0); expect(point.y).toBe(0); point.x = 5; point.y = 15; expect(point.x).toBe(5); ...
import React from 'react'; import app from './app'; const dehydratedState = window.App.Context; // Sent from the server window.React = React; // For chrome dev tool support app.rehydrate(dehydratedState, function( err, context ) { if ( err ) { throw err; } window.context = context; const moun...
"use strict"; const root = require('./helpers.js').root; const ip = require('ip'); exports.HOST = ip.address(); exports.DEV_PORT = 3000; exports.E2E_PORT = 4201; exports.PROD_PORT = process.env.PORT || 8088; /** * These constants set whether or not you will use proxy for Webpack DevServer * For advanced configurati...
'use strict'; var gulp = require('gulp'); var minifyJs = require('gulp-minify'); var cleanCSS = require('gulp-clean-css'); var gulpCssDataUri = require('gulp-css-base64'); var rename = require('gulp-rename'); var del = require('del'); var runSequence = require('run-sequence'); var replace = require('gulp-string-replac...
require('../css/style.css'); var petstore = require('./petstore'); var input = petstore.input; document.querySelector('body').appendChild(input);
import React from 'react' import { Route, Link, Switch, BrowserRouter as Router, Redirect} from 'react-router-dom' import IndexPage from '../container/IndexPage/IndexPage' import EditorPage from '../container/EditorPage/EditorPage' import { Blog } from '../container/BlogPage' import NavPage from '../container/NavPage/...
// daiaAvailability.js // ------------------- // Version: 1.0 // Author: Owen Stephens // Last Edit: 15/03/2011 // Displays availability from DAIA compliant information /* * Constructor arguments: * arg: ju - instance of juice * arg: insert - JuiceInsert to use * arg: targetDiv - id of element to place image in ...
"use strict"; var gcloud = require("gcloud"); export default class DataStore { constructor(config){ this._config = config; this._ds = gcloud(config).datastore; } get config(){ return this._config; } get store(){ return this._ds; } get dataset(...
/* globals $ */ /* Create a function that takes a selector and: * Finds all elements with class `button` or `content` within the provided element * Change the content of all `.button` elements with "hide" * When a `.button` is clicked: * Find the topmost `.content` element, that is before another `.button` and: ...
// Custom VietNam Moment.js Locales // Based on: https://github.com/moment/moment/blob/develop/locale/vi.js moment.locale('vi', { months : 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'), monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th...
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), coffee: { compile: { options: { bare: true, sourceMap: true }, files: { 'static/js/<...
'use strict'; /* global $, window, plugin, grecaptcha, utils, app, document */ $(function () { var pluginName = 'spam-be-gone'; function ensureRecaptchaThenCreate() { if (!$('script[src*="www.recaptcha.net/recaptcha/api.js"]').length) { injectScript('//www.recaptcha.net/recaptcha/api.js?onload=__nodebbSpamBeG...
/*! Wheelzoom 3.0.0 license: MIT http://www.jacklmoore.com/wheelzoom */ window.wheelzoom = (function(){ var defaults = { zoom: 0.10 }; var canvas = document.createElement('canvas'); function setSrcToBackground(img) { img.style.backgroundImage = "url('"+img.src+"')"; img.style.backgroundRepeat = 'no-repeat...
/* * jQuery File Upload Audio Preview Plugin * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2013, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * http://www.opensource.org/licenses/MIT */ /* jshint nomen:false */ /* global define, require, window, document */ (func...
/* global tavJS, undefied, Object */ /** * String validate test * @author Matheus Fidelis <msfidelis01@gmail.com> * @version 1.0.0 * * @param {object} data Element that will test * @returns {object} Results of validate */ tavJS.validate.string = function (data) { var result = null; /** * Construct...
var webpack = require('webpack'); var { version } = require('./package.json'); var PROD = process.argv.indexOf('-p') >= 0; console.log(`*** building package version ${version} ***\n`) module.exports = { entry: { 'amap': __dirname + '/src/amap.js', }, output: { libraryTarget: 'umd', library: ['echart...
module.exports = { // parser: 'sugarss', plugins: { // 'postcss-import': {}, // 'postcss-cssnext': {}, 'autoprefixer': {} // 'cssnano': {} }, sourceMap: true };
const debug = require("debug")("decoder:test:downgrade-test"); const assert = require("chai").assert; const Big = require("big.js"); const clonedeep = require("lodash.clonedeep"); const Ganache = require("ganache-core"); const path = require("path"); const Web3 = require("web3"); const Decoder = require("../../.."); c...
$(function() { $("#book-fields").hide(); $("#show").click(function(){ $("#book-fields").show(); }); });
'use strict'; var assert = require('chai').assert , SLIP = require('../src/slip.js') , fs = require('fs') , conf = JSON.parse(fs.readFileSync('test/test-config.json', {encoding: 'utf8'})) describe('SLIP class', function () { it('exists', function(){ assert.isFunction(SLIP) }) it('inherits SerialPort...
import perceptron from '../perceptron/perceptron'; /** * Hálózat modellje * @param numInputNeurons: a hálózat bemenetinek száma * @param numHiddenNeurons: a rejtett réteg neuronjainak száma * @param learningFactor: tanulási paraméter * @param initalWeightClamp: súly paraméter (generált súlyok ese...
// Karma configuration module.exports = function(config) { config.set({ // base path, that will be used to resolve files and exclude basePath: '../../', background: true, // testing framework to use (jasmine/mocha/qunit/...) frameworks: ['jasmine'], // list of files / patterns to load in the browser f...
// All code points in the `Hatran` script as per Unicode v9.0.0: [ 0x108E0, 0x108E1, 0x108E2, 0x108E3, 0x108E4, 0x108E5, 0x108E6, 0x108E7, 0x108E8, 0x108E9, 0x108EA, 0x108EB, 0x108EC, 0x108ED, 0x108EE, 0x108EF, 0x108F0, 0x108F1, 0x108F2, 0x108F4, 0x108F5, 0x108FB, 0x108FC, 0x108FD, 0x108FE, 0x...
// Each of these is duplicated to the the same indexed player GridGame.data.key_maps = { green: { 87: 'north', // w 65: 'west', // a 83: 'south', // s 68: 'east' // d }, red: { 38: 'north', // up 37: 'west', // left 40: 'south', // down 39: 'east' // right }, yellow: { ...
angular.module('docsApp').run(['$templateCache', function($templateCache) { $templateCache.put('partials/contributors.tmpl.html', '<div ng-controller="GuideCtrl" class="doc-content">\n' + ' <md-content>\n' + ' <p>\n' + ' We are thankful for the amazing community and <em>contributors</em> to A...
import Helpers from '../../utils/helpers'; import Headers from './headers'; import Send from './send'; /** * Gets the AccountMetaDataPair of an account. * * @param {object} endpoint - An NIS endpoint object * @param {string} address - An account address * * @return {object} - An [AccountMetaDataPair]{@link http:...
var processValue = require('./lib/util/valueProcessor'); var piGlowInterface = require('./lib/interface'); var PiGlowBackend = require('./lib/PiGlowBackend'); var PiGlowBackendMock = require('./lib/PiGlowBackendMock'); var BackendMockPrettyPrint = require('./lib/PiGlowBackendMockPrettyPrint'); /** * convenience const...
export function RoutesConfig ($stateProvider, $urlRouterProvider) { 'ngInject' var getView = (viewName) => { return `./views/app/pages/${viewName}/${viewName}.page.html` } var getLayout = (layout) => { return `./views/app/pages/layout/${layout}.page.html` } $urlRouterProvider.otherwise('/') $s...
define([ 'snippets-model' ], function ( snippetsModel ) { 'use strict'; /** * This plugin adds each mastalk md snippet */ return function (type) { return function (scribe) { var commandName = 'mastalk_' + type; var mastalkCommand = new scribe.api.Command('insertHTML'); mastalk...
window.onload = function () { $('.all-flags .flag-icon-background').click(function(event){ var flag = $(event.currentTarget).attr('title'); var w = 640; var h = 480; var left = (screen.width / 2) - (w / 2); var top = (screen.height / 2) - (h / 2); if (flag) { window.open('flags/4x3/' + ...
var _ = require('lodash'), util = require('util'), common = require('./common'), JSONStream = require('JSONStream'), EventEmitter = require('events').EventEmitter; module.exports = SocketConnection; /** * Creates a new SocketConnection using specified socket. * @param {object} socket Socket handle...
(function( $ ) { var methods = { init: function(options) { // Check for the various File API support. if (window.File && window.FileReader && window.FileList && window.Blob) { // Great success! All the File APIs are supported. } else { ale...
/*! jQuery UI - v1.12.1 - 2017-08-12 * http://jqueryui.com * Includes: widget.js, position.js, keycode.js, unique-id.js, widgets/autocomplete.js, widgets/menu.js * Copyright jQuery Foundation and other contributors; Licensed MIT */ (function( factory ) { if ( typeof define === "function" && define.amd ) { // AMD. ...
// Get the lists available in RTM. // Note that this only returns active, non-smart, non-deleted lists // // Prereqs: // None // Results: // Sets a local tasker variable called lists, that contains an array of list_id|list_name strings function rtmGetLists(){ lists = getLists(); $.each(lists, function(index, lis...
/** * Created by xiehuimin on 2018/3/13. * 网上自助通用表单 借支单,借款信息子表单组件-适用单币种和多币种 * Dependence: * jquery.js, 基于jquery组件封装开发 * select2.js, * autoNumric.js, */ ;(function ($) { // Definition TG loanInfo plugin, for piece of form $.fn.loanInfo = function (method) { if (methods[method]) { return met...
angular.module('starter.services', []) .factory('Chats', function() { // Might use a resource here that returns a JSON array // Some fake testing data var chats = [{ id: 0, name: 'Steve Paul Jobs was an entrepreneur ... ', lastText: "April 13, 2016", face: 'http://a5.files.biography.com/image/up...
import React from "react"; import ReactDOM from "react-dom"; import App from "./App"; import registerServiceWorker from "./registerServiceWorker"; import "./css/index.css"; ReactDOM.render(<App />, document.getElementById("root")); registerServiceWorker();
/* */ "format cjs"; (function(process) { (function(f) { if (typeof exports === "object" && typeof module !== "undefined") { module.exports = f(); } else if (typeof define === "function" && define.amd) { define([], f); } else { var g; if (typeof window !== "undefined") { g ...
/** @constructor */ ScalaJS.c.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2 = (function() { ScalaJS.c.scala_runtime_AbstractFunction1.call(this); this.$$outer$2 = null; this.x2$1$f = null }); ScalaJS.c.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2.prototype = new Scal...
JAPR = {} || JAPR; JAPR.addPreferencesBox = function() { var tab = JA.menu.appendChild( document.createElement( 'div' ) ); tab.title = 'Change the ways things are viewed'; tab.innerHTML = '<a href=# id=tabPreferences ><p class=button >' + '<i class="fa fa-wrench"></i> Preferences...' + '</p></a>'; ...
var temps = {}; // Define historic climate data temps = { 'Bangor' : { thiswinter_low: -20, thiswinter_lowdate: 'Jan. 4', record_low: -32, record_lowdate: 'Feb. 2, 1948', record_lowsince: 1925 }, 'Caribou' : { thiswinter_low: -28, thiswinter_lowdate: 'Jan. 2', record_low: -41,...
Oskari.registerLocalization( { "lang": "da", "key": "LayerSelection", "value": { "title": "Valgte lag", "desc": "", "layer": { "style": "Stil", "show": "Vis", "hide": "Skjul", "hidden": "Kortet er blevet skjult midlertidigt", ...
import React, {Component} from 'react'; class SearchBar extends Component{ constructor(props){ super(props); this.state ={ term: '' }; } render() { return ( <div className="search-bar"> <input value={this.state.term} onChange={(event)=> this.onInputChange(...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BootstrapConfig = exports.TypeaheadHighlightValueConverter = exports.AubsTypeaheadCustomElement = exports.AubsTooltipCustomAttribute = exports.AubsTabsetCustomElement = exports.AubsTabCustomElement = exports.AubsPopoverCustomAttri...
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), Schema = mongoose.Schema; /** * Filme Schema */ var FilmeSchema = new Schema({ // Filme model fields // ... titulo:{ type:String, required:'titulo necessario' }, sinopse:{ type:String }, categoria:{ type:Schema.Obje...
import React from 'react'; import App from './App'; require("./main.scss"); React.render(<App />, document.getElementById('root'));
var gulp = require('gulp'); var rev = require('gulp-date-rev'); var buffer = require('gulp-buffer'); var browserify = require('browserify'); var source = require('vinyl-source-stream'); const distJS = 'dist'; gulp.task('default', function () { var b = browserify('index.js'); return b.bundle() .pipe(source('in...
/* */ 'use strict'; var expand = require('./lib/expand'); var utils = require('./lib/utils'); function micromatch(files, patterns, opts) { if (!files || !patterns) return []; opts = opts || {}; if (typeof opts.cache === 'undefined') { opts.cache = true; } if (!Array.isArray(patterns)) { return ma...
import React from 'react'; import { shallow } from 'enzyme'; import AutoComplete from '../../../components/autoComplete/autoComplete'; import AutoCompleteItem from '../../../components/autoComplete/autoCompleteItem'; describe('Input: ref', () => { it('should determine ref for item', () => { const element = {}; ...
// The server port - the port to run Pokemon Showdown under exports.port = 8000; // The server id - the id specified in the server registration. // This should be set properly especially when there are more than one // pokemon showdown server running from the same IP exports.serverId = 'universal'; // proxyIps - ...
GNATdoc.EntitiesCategory = { "label": "Simple Types", "entities": [ { "label": "Notify_Urgency", "docHref": "docs/notify.notification.html#L50C9", "declared": "Notify.Notification", "srcHref": "srcs/notify-notification.ads.html#L50" } ] };
"use babel"; import ActionComponent from '../../lib/views/action-component'; import PullRequest, {State} from '../../lib/models/pull-request'; import Repository from '../../lib/models/repository'; import demoTransport from '../../lib/transport/demo'; describe("ActionComponent", () => { let r, component, root; be...
/** * Created by out_xu on 17/4/8. */ import React, { Component } from 'react' import { Button, Col, Form, Icon, Input, InputNumber, Modal, Radio, Row, Spin, Switch, Tag } from 'antd' import { Link } from 'react-router' import QueueAnim from 'rc-queue-anim' import { goto } from 'utils' import './index.less' const ...
Posts = new Meteor.Collection('posts'); Posts.allow({ update: ownsDocument, remove: ownsDocument }); Posts.deny({ update: function(userId, post, fieldNames) { // may only edit the following two fields: return (_.without(fieldNames, 'url', 'title').length > 0); } }); Meteor.methods({ post: function(...
export { default } from 'ember-drop-zone/utils/get-files';
module.exports = require('./lib/create-app'); module.exports.createServer = require('./lib/create-server');
{ ("use strict"); return { setters: [function(_) {}, function(_2) {}], execute: function() {} }; }
/** * Widget * 只是提出一种开放平台widget组件开发和使用设想 * 具体需要根据具体业务进行修改添加代码 * $.Widget.define('invite',{ * js:[],//依赖js * css:[],//依赖css样式表 * loginRequired: true,//是否需要登录后操作 * main: function(){}//主体函数,接收opt对象,this为promise的widget,包括了onSuccess、onCallback等事件 * //可以执行fireCallback,fireCallbackWith,fireSuccess,fireFail方法 * ...
'lang sweet.js'; import { implements, protocol } from 'sweet-interfaces'; protocol Semigroup { // concat :: Semigroup a => a ~> a -> a concat(b) { return this.concat(b); } } Reflect.implement(String, Semigroup); Reflect.implement(Array, Semigroup); Object.prototype[Semigroup.concat] = function concat(b) {...
const elasticsearch = require('elasticsearch'); module.exports = class Configuration { constructor(config) { this.config = config; } async getClient() { if (this.config.getClient) { return this.config.getClient(); } let args = { hosts: this.config.connection.hosts, apiVersion...
/* global app:true */ (function() { 'use strict'; app = app || {}; app.AdminGroup = Backbone.Model.extend({ idAttribute: '_id', url: function() { return '/admin/admin-groups/'+ this.id +'/'; } }); app.Delete = Backbone.Model.extend({ idAttribute: '_id', defaults: ...
import { css } from 'styled-components'; import { stepToRem, pxToRem } from '../../../helpers/utils/typography'; import { ScreenConfig } from '../../../constants/screen-config'; export var titleModifiersNames = ['primary', 'secondary', 'tertiary', 'quaternary', 'quinary', 'senary', 'septenary']; export var titleModifie...
'use strict'; function FileService(Utils) { return { /** * Returns merged file data with provided defaults * * @param file file data * @param defaults default file settings to merge with * @returns Object merged file data with defaults */ prepar...
'use strict'; // Register `PractitionerListApp.practitionerDetail` component, along with its associated controller and template angular. module('PractitionerListApp.practitioner-detail'). component('practitionerDetail', { templateUrl: 'components/practitioner-detail/practitioner-detail.template.html', cont...
import _ from 'lodash'; import radio from 'radio'; import Backbone from 'backbone'; import Marionette from 'marionette'; import AuthBtn from 'behaviors/AuthBtn'; import css from './style.scss'; import tpl from './template.nunj'; import { APP_CHANNEL, APP_NOTIFICATION } from 'constants'; export default Mario...