code stringlengths 2 1.05M |
|---|
function collapse() {
var links = $('.js-collap-ln'),
descriptions = $('.js-collap-content'),
activeClass = 'js-collap-ln_active';
links.removeClass(activeClass);
descriptions.hide();
$(links[0]).addClass(activeClass);
$(descriptions[0]).show();
links.on('click', function(e) {
e.prev... |
/**
* Simply compares two string version values.
* https://gist.github.com/alexey-bass/1115557
*
* Example:
* versionCompare('1.1', '1.2') => -1
* versionCompare('1.1', '1.1') => 0
* versionCompare('1.2', '1.1') => 1
* versionCompare('2.23.3', '2.22.3') => 1
*
* Returns:
* -1 = left is LOWER than right
* ... |
/**
* Exports object that contains names of options as a key and their configuration objects as a value
*
* @example
* export default {
* optionName: {
* desc: 'Description for the option',
* alias: 'Short name for the option',
* type: Boolean || String || Number,
* defaults: 'Default value',... |
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2016 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
//Provides class sap.ui.model.odata.v4.ODataContextBinding
sap.ui.define([
"jquery.sap.global",
"sap/ui/model/Binding",
"sap/ui/mo... |
(function($) {
$.fn.countdown = function(options, callback) {
//custom 'this' selector
thisEl = $(this);
//array of custom settings
var settings = {
'date': null,
'format': null
};
//append the settings array to options
if(options) {
$.extend(settings, options);
}
//main... |
// 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... |
//
// Client side activity detection for the session timeout
// - depends on jquery
//
// Meteor settings:
// - staleSessionHeartbeatInterval: interval (in ms) at which activity heartbeats are sent up to the server
// - staleSessionActivityEvents: the jquery events which are considered indicator of activity e.g. in an ... |
'use strict';
/*
* Module dependencies
*/
export default class Column{
//Constructor de la clase
constructor(){
}
} |
// Generated from /Users/tobe/Source/Java/stallion/src/main/antlr4/thosakwe/stallion/grammar/Stallion.g4 by ANTLR 4.6
// jshint ignore: start
var antlr4 = require('antlr4/index');
// This class defines a complete generic visitor for a parse tree produced by StallionParser.
function StallionVisitor() {
antlr4.tree.Pa... |
process.env.TEST_ENV = true
const Feed = require('../../../structs/db/Feed.js')
const Supporter = require('../../../structs/db/Supporter.js')
const FeedModel = require('../../../models/Feed.js')
const FilteredFormatModel = require('../../../models/FilteredFormat.js')
const SubscriberModel = require('../../../models/Sub... |
describe('pipeline_07', function() {
const assert = chai.assert
const styles = testGlobals.styles
const logTime = testGlobals.logTime
const stringifyCondensed = testGlobals.stringifyCondensed
const approxEquals = KerasJS.testUtils.approxEquals
const layers = KerasJS.layers
const testParams = {
layers... |
/*!
* Bootstrap v3.0.1 by @fat and @mdo
* Copyright 2013 Twitter, Inc.
* Licensed under http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world by @mdo and @fat.
*/
if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery") }
/* ===================... |
import '../class';
frappe.ui.form.Layout = class Layout {
constructor (opts) {
this.views = {};
this.pages = [];
this.sections = [];
this.fields_list = [];
this.fields_dict = {};
$.extend(this, opts);
}
make() {
if (!this.parent && this.body) {
this.parent = this.body;
}
this.wrapper = $('<div... |
// Flatten trivial IIFEs
module.exports = function scalarReplacementPlugin({ types: t }) {
return {
visitor: {
CallExpression(path) {
const { callee, arguments: _arguments } = path.node;
if (_arguments.length > 0) return; // arguments
if (!t.isFunction(callee)) return; // not a function
if (cal... |
/**
* User controller
*/
var env = process.env.NODE_ENV || 'development';
var User = require('../models/user');
var logger = require('../lib/logger');
var controller = require('./base');
var utils = require('../lib/utils'); // utility library
/**
* Get users
*/
exports.index = fun... |
/**
* Dependencies
*/
var i8n = require('inflection');
var defineScope = require('./scope.js').defineScope;
var ModelBaseClass = require('./model.js');
module.exports = Relation;
function Relation() {
}
Relation.relationNameFor = function relationNameFor(foreignKey) {
for (var rel in this.relations) {
... |
/**
* Definition for a binary tree node.
* function TreeNode(val) {
* this.val = val;
* this.left = this.right = null;
* }
*/
/**
* @param {TreeNode} root
* @return {number}
*/
var maxDepth = function(root) {
var result = 0;
if(root === null) return result;
result ++;
var... |
define([
'jquery',
'backbone',
'hogan',
'youtubePlayer',
'text!templates/playVideo.html'
], function($, Backbone, Hogan, ytPlayer, PlayVideoTemplate) {
return Backbone.View.extend({
initialize: function (options) {
if(options != null && options.id != undefined) {
this.videoId = options.id... |
'use strict';
const vendor = require('../lib/vendor');
const VALUE = '-1px -1px 1px rgba(0, 0, 0, 0.2) inset';
it('returns prefix', () => {
expect(vendor.prefix('-moz-color')).toEqual('-moz-');
expect(vendor.prefix('color' )).toEqual('');
expect(vendor.prefix(VALUE)).toEqual('');
});
it('returns unp... |
/*
@depends ../core/game.class.js
@depends ../objs/player.class.js
*/
var game = new Game(
new TileGroup(null, {
origin: new Point(0, 0),
baseColor: "slategrey",
tileSize: 25,
spacing: 1,
w: 40,
h: 20
}), Utils.loadGame() || DungeonGenerator.traditional.makeLevel(new Player(new Point(10,10))... |
'use strict';
module.exports = {
app: {
title: 'HISCOM',
description: 'Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js',
keywords: 'mongodb, express, angularjs, node.js, mongoose, passport',
googleAnalyticsTrackingID: process.env.GOOGLE_ANALYTICS_TRACKING_ID || 'GOOGLE_ANALYTICS_T... |
var assert = require('assert')
var helpers = require('../helpers')
describe('selected-pagination', function () {
it('Format lines loaded from the file turned array. ' +
'We will use dummy data for the array for now', function () {
let arr1 = ['Line 01 - FriJun 23 11:23:44 2017 [5048][1][FATAL]',
... |
import './test-status';
|
/*jshint expr: true*/
var Input = require('../lib/input');
var Stroke = require('../lib/stroke');
var chai = require('chai');
var expect = chai.expect;
// sequentially press keys
var press = function (Kayn, strokes) {
for(var i in strokes) {
Kayn.keydown(strokes[i]);
Kayn.keyup(strokes[i]);
}
};
// simultaneo... |
// 获取应用实例
let app = getApp();
let wxParser = require('../../wxParser/index');
Page({
data: {},
onLoad: function () {
let that = this;
let html = `<a href="/pages/logs/logs">文本内容</a><br><p class="test-class-name" style="text-align: center;" style="color: #ccc;">p 直属内容<u><i><strike color="#f00">tes<b color=... |
/**
* I manage freehand painting.
*
* The steps:
*
* 1. 'request-freehandPainting' will be triggered
* 2. prepare for this painting
* 3. start painting. The painting itself is ran from
* withFreehandPainter
*/
define(function(require) {
var defineComponent = require('flight/lib/component'),
withFreeha... |
var sysPath = require('path');
exports.config = {
files: {
javascripts: {
joinTo: {
'js/app.js': /^app/,
'js/vendor.js': /^(vendor|bower_components)/
},
order: {
before: ['vendor/scripts/console-polyfill.js', 'vendor/script... |
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var BitmapMask = require('../../display/mask/BitmapMask');
var GeometryMask = require('../../display/mask/GeometryMask... |
/**
* marked - a markdown parser
* Copyright (c) 2011-2013, Christopher Jeffrey. (MIT Licensed)
* https://github.com/chjj/marked
*/
;(function() {
/**
* Block-Level Grammar
*/
var block = {
newline: /^\n+/,
code: /^( {4}[^\n]+\n*)+/,
fences: noop,
hr: /^( *[-*_]){3,} *(?:\n+|$)/,
heading: /^ *(#{1,6}... |
//
//
//
'use strict';
var defs = require('./defs');
var when = require('when'), defer = when.defer;
var inherits = require('util').inherits;
var EventEmitter = require('events').EventEmitter;
var BaseChannel = require('./channel').BaseChannel;
var acceptMessage = require('./channel').acceptMessage;
var Args = requir... |
version https://git-lfs.github.com/spec/v1
oid sha256:bdfd64f318ad82c9c42b5db582b02b9b8626922f3317111fe4837ec1e09736a1
size 43133
|
var path = require("path");
var webpack = require("webpack");
module.exports = {
// This is the main file that should include all other JS files
entry: "./src/scripts/main.jsx.coffee",
target: "web",
debug: true,
// We are watching in the gulp.watch, so tell webpack not to watch
watch: false,
// watchDela... |
/**
* Function takes a callback.
* @param fn => function
*/
Array.prototype.customMap = function(fn) {
let results = [];
for (let i = 0; i < this.length; i++) {
results.push(fn(this[i]));
}
return results;
}; |
YUI.add("template-alpha", function (Y) {
Y.namespace("Template")["alpha"] = Y.Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return escapeExpre... |
var generate = function generate(num, fn) {
var a = [];
for (var i = 0; i < num; ++i) {
a.push(fn(i));
}return a;
};
var replicate = function replicate(num, val) {
return generate(num, function () {
return val;
});
};
var concat = function concat(a, b) {
return a.concat(b);
};
var flatten = funct... |
/*
A simple library for tracking JS dependencies
*/
const _dependencies = new Set();
function require(fileName) {
if (!_dependencies.has(fileName)) {
throw 'Missing dependency: ' + fileName;
}
}
function provide(fileName) {
_dependencies.add(fileName);
} |
/**
* Gets the repositories of the user from Github
*/
// import { take, call, put, select, cancel, takeLatest } from 'redux-saga/effects';
// import { LOCATION_CHANGE } from 'react-router-redux';
// import request from 'utils/request';
// import { makeSelectUsername } from 'containers/HomePage/selectors';
/**
* ... |
export const dbname = 'ndm'
|
import * as React from 'react';
import PropTypes from 'prop-types';
import { Transition } from 'react-transition-group';
import { elementAcceptingRef } from '@material-ui/utils';
import { duration } from '../styles/createTransitions';
import useTheme from '../styles/useTheme';
import { reflow, getTransitionProps } from... |
import UserModel from '../../../database/models/user-model'
export default function remove(users = []){
// todo define what to remove
return UserModel.find({}).remove()
} |
import React, {Component, PropTypes} from 'react';
import {Link} from 'react-router';
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import {isLoaded as isInfoLoaded} from '../reducers/info';
import {isLoaded as isAuthLoaded} from '../reducers/auth';
import {load as loadInfo} from '../ac... |
/*
* DefaultImage widget'as
* nustato nuotrauką kaip titulinę albumo
*/
(function ($) {
function DefaultImage(){}
DefaultImage.prototype.options = {
aID: 0
};
DefaultImage.prototype._create = function () {
this.CSRF = this.element.attr('data-csrf_token');
this.ID = this.elemen... |
/*!
* jQuery Cycle Plugin (with Transition Definitions)
* Examples and documentation at: http://jquery.malsup.com/cycle/
* Copyright (c) 2007-2012 M. Alsup
* Version: 2.9999.81 (15-JAN-2013)
* Dual licensed under the MIT and GPL licenses.
* http://jquery.malsup.com/license.html
* Requires: jQuery v1.7.1 or later... |
(function() {
var __defineProperty = function(clazz, key, value) {
if (typeof clazz.__defineProperty == 'function') return clazz.__defineProperty(key, value);
return clazz.prototype[key] = value;
},
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) {
if (typeof parent.__extend == 'f... |
module.exports = {
vendorFiles: [
'zepto/zepto.min.js',
'zepto/zepto-touch.js',
'topcoat/css/topcoat-mobile-light.min.css',
'fastclick/lib/fastclick.js',
'overthrow/src/overthrow-detect.js',
'overthrow/src/overthrow-polyfill.js',
'overthrow/src/overthrow-toss.js',
'overthrow/src/overthrow-ini... |
import Observable from 'zen-observable';
import test from '../../..';
test(t => {
return new Observable(() => {
t.pass();
});
});
|
b: for (var a = 1; a < 2; ++a) {
if (a < 3) continue b;
c.d(a);
} |
import React from 'react'
import User from '../user/index.js'
import {connect} from 'react-redux'
import {Route} from 'react-router-dom'
import {withRouter} from 'react-router'
import {NavLink} from 'react-router-dom'
import FontAwesome from 'react-fontawesome'
import * as route from '../../action/route.js'
imp... |
var gulp = require('gulp'),
sass = require('gulp-sass'),
nodemon = require('nodemon'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
es2015 = require('babel-preset-es2015'),
babel = require('gulp-babel'),
cleancss = require('gulp-clean-css'),
rename = require('gulp-rename'),
gutil ... |
var gulp = require('gulp');
var gulpSequence = require('gulp-sequence');
gulp.task('build:production', function(cb) {
process.env.NODE_ENV = 'production'
gulpSequence('clean', ['fonts', 'iconFont', 'images', 'portraits'], ['sass', 'webpack:production'], 'html', 'rev', cb);
});
|
#!/usr/bin/env node
var nopt = require("../lib/nopt")
, types = {
num: Number
, bool: Boolean
, help: Boolean
, list: Array
, "num-list": [Number, Array]
, "str-list": [String, Array]
, "bool-list": [Boolean, Array]
, str: String
}
, shorthands... |
(function () {
'use strict';
var app = angular.module('moviesApp', []);
app.controller('MovieCtrl', function () {
this.movies = [
{ id: 1, title: 'Furious 7', year: 2015, rating: 4, poster: 'http://image.tmdb.org/t/p/original/dCgm7efXDmiABSdWDHBDBx2jwmn.jpg' },
{ id: 2, ti... |
'use strict'
/**
* logger.js
* Custom logger for debugging
******************************/
const { createLogger, format, transports } = require('winston')
const { isRenderer } = require('./utils')
// const { app } = require('electron')
if (process.env.TEST_RUN || isRenderer()) {
module.exports = createLogger({
... |
export default {
translation: {
appName: 'Laravel',
en: 'English',
he: 'עברית',
login: 'התחברות',
logout: 'להתנתק',
register: 'הירשם',
name: 'שם',
email: 'דוא"ל',
password: 'סיסמה',
confirmPassword: 'אשר סיסמה',
sendPasswordRese... |
import React from 'react';
import {Container} from 'cerebral-react';
import controller from './controller.js';
import Router from 'cerebral-router';
import App from './components/App.js';
import homeOpened from './signals/homeOpened.js';
import messagesOpened from './signals/messagesOpened.js';
import messageOpened f... |
'use strict';
module.exports = {
db: 'mongodb://localhost/tmakl3-test',
port: 3001,
app: {
title: 'tmakl3 - Test Environment'
},
facebook: {
clientID: process.env.FACEBOOK_ID || 'APP_ID',
clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET',
callbackURL: '/auth/facebook/callback'
},
twitter: {
cl... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Router from 'next/router';
import { graphql } from 'react-apollo';
import gql from 'graphql-tag';
import styled from 'styled-components';
import Button from 'material-ui/Button';
import auth from '../../utils/auth';
const Content = st... |
// ----------------------------------------------------------------
// Confirm Class
// ----------------------------------------------------------------
// Model
class ConfirmModel extends CommonModel {
static get TYPE_0BUTTON() { return 0; }
static get TYPE_1BUTTON() { return 1; }
static get TYPE_2BUTTON() { ... |
var WebSocketServer = require('ws').Server;
var sockjs = require('sockjs');
/**
* Instantiating WebSocketServer by default
* other options provide adapters
*/
module.exports = {
ws: WebSocketServer,
sockjs: SockJsAdapter
};
function SockJsAdapter(config) {
var opts = Object.assign({}, config, {
... |
export default {
base: {
width: '100vw',
height: '100vh',
background: '#fff',
overflowY: 'hidden',
position: 'relative',
},
};
|
function Config() {
var name = 'threejs-editor';
var storage = {
'language': 'en',
'exportPrecision': 6,
'autosave': true,
'theme': 'css/main.css',
'project/title': '',
'project/editable': false,
'project/vr': false,
'project/renderer/antialias': true,
'project/renderer/shadows': true,
'proje... |
exports.init = function(core) {
core.data = {};
core.data.test = function() {
console.log('My core data test');
};
return core.data;
}; |
import React, {Component, PropTypes} from 'react';
import Dropdown from '../../src/Dropdown';
import * as Icons from '../../src/Icons/dist';
class IconChooser extends Component {
render() {
const options = Object.keys(Icons).map(name => {
return {id: name, value: <div style={{paddingLeft: "10px"}}>{React.... |
import { Accounts } from 'meteor/accounts-base';
import { Events } from './events.js';
import { nextDay, nextEvent } from '../helpers/date.js';
Accounts.config({
sendVerificationEmail: false,
forbidClientAccountCreation: true
});
Accounts.onLogin(() => {
if (Events.find({date: nextEvent()}).count() === 0) {
... |
var pr3 = function () {
var width,
height;
width = document.getElementById('problem3w').value;
height = document.getElementById('problem3h').value;
var area = width * height;
console.log('The area of a rectangle with width ' + width + 'and height ' + height + 'is ' + area);
jsConsole... |
/*
Nex.location
eg
index.html#/Home/Login
*/
;(function($){
"use strict";
var route = Nex.define('Nex.route.Route').setXType('route').setAliasName('Nex.Route');
route.extend({
version : '1.0',
getDefaults : function(opt){
var _opt = {
prefix : 'nexroute-',
ajax : null,
data : {},
_qdata : {},... |
import React from 'react'
import RA from './RotateArrow'
import './Item.scss'
const Item = ({ reverse = false, children, handleClick, open = true }) => {
return (
<div className={`item-section ${reverse && 'reverse'}`} onClick={handleClick}>
<img
src={require('../assets/item-bg-1.png')}
alt... |
'use strict';
var Base = require('base');
var plugin = require('..');
// given you have a plugin named `base-foo`
function baseFoo(options) {
return function(app) {
app.use(plugin('foo'));
// then call the `app.debug` method
var debug = app.debug();
// then use it like this:
debug('yelling abc... |
'use strict';
import AlizeConfig from 'data/alizeConfig';
import Alize from 'alize';
import 'babel-polyfill';
export function setup(config = {}) {
return new Alize(new AlizeConfig(config));
}
export function build(config = {}) {
return new Alize(new AlizeConfig(config)).getClient();
}
export default {
setup,... |
const mr = require('myth-request')
const assert = require('assert')
module.exports = km
// koa myth
// @param {String} bundle
// @return {GeneratorFunction}
function km(bundle) {
assert.equal(typeof bundle, 'object')
const handler = mr(bundle.toString())
// koa middleware. Sets body to
// be a css str... |
import {Meteor} from 'meteor/meteor';
import {Util} from '../util.js';
export const EmailHelpers = {
projectUrl(projectId) {
console.log("projectId:", projectId);
return Util.buildUrl(Meteor.absoluteUrl(), "projects", projectId)
}
}; |
import moment from 'moment';
import wait from 'ember-test-helpers/wait';
import {authenticateSession, invalidateSession} from 'ember-simple-auth/test-support';
import {beforeEach, describe, it} from 'mocha';
import {blur, click, currentURL, fillIn, find, findAll} from '@ember/test-helpers';
import {expect} from 'chai';... |
import DeviceOrientationControls from './DeviceOrientationControls'
import TouchControls from './TouchControls'
import ControlsBase from './ControlsBase'
export default class MobileDeviceControls extends ControlsBase {
constructor (player, element) {
super(player, element)
this.deviceOrientationControls =... |
var Bundl = require('bundl');
var minify = require('bundl-minify');
var packageJSON = require('../package.json');
var rename = require('bundl-rename');
var wrap = require('bundl-wrap');
var write = require('bundl-write');
var options = {
srcDir: '../src/dollar',
outputDir: '../prebuilt',
quiet: true
};
v... |
// Tree of visible forum sections (used in topic move dialogs).
//
// - env.res.sections - out
//
'use strict';
module.exports = function (N, apiPath) {
// Fetch sections
//
N.wire.before(apiPath, async function sections_fetch(env) {
env.data.sections = await N.models.forum.Section
... |
chrome.app.runtime.onLaunched.addListener(function() {
var width = 500;
var height = 300;
chrome.app.window.create('app/index.html', {
id: 'main',
bounds: {
width: width,
height: height
}
});
});
|
/**
* TumblrPostFactory.js
* --------------------
* Factory that, given Tumblr data, provides appropriate Post objects
* corresponding to their types.
*/
/**
* @constructor
*/
function TumblrPostFactory()
{
}
// ******************
// * static methods *
// ******************
/**
* Creates a Post object for Tu... |
(async function () {
let programs = await db.getPrograms();
if (!programs.length) programs = [];
switch (request.method) {
case 'GET':
{
const recorded = await chinachu.getRecorded();
const length = recorded.length;
for (let i = 0; i < length; i++) {
const program = await db.getProgramById(r... |
(function(){
function gotoIframe(){
if (document.getElementById('game_frame'))
{
document.location.href = document.getElementById('game_frame').src;
}
}
gotoIframe();
//document.addEventListener("DOMContentLoaded",gotoIframe);
})();
|
var scripty = require('azure-scripty');
var moment = require('moment');
var _ = require('lodash');
var prettyjson = require('prettyjson');
var console = require('better-console');
module.exports.showDeploymentLog = function (resourceGroup, deploymentName) {
scripty.invoke(
{
command: 'group log... |
import models from '../models'
import SubmenuProxy from './submenu'
import Promise from 'promise';
import * as ResultMsg from '../constrants/ResultMsg';
let MenuModel = models.Menu
let SubmenuModel = models.Submenu
exports.getMenuById = function (id, callback) {
return new Promise(function(resolove, reject) {
... |
'use strict';
module.exports = {
db: 'mongodb://localhost/carolyne-billings-yoga-test',
port: 3001,
app: {
title: 'Carolyne Billings Yoga - Test Environment'
},
facebook: {
clientID: process.env.FACEBOOK_ID || 'APP_ID',
clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET',
callbackURL: 'http://localh... |
#!/usr/bin/env node
'use strict';
const RET_CODE_ERROR = 1;
const RET_CODE_SUCCESS = 0;
const argv = require('yargs')
.usage('Usage: $0')
.demand(0, ['module'])
// Function
.string('module')
.alias('m', 'module')
.coerce('module', (arg) => {
return require('path').resolve(arg);
})
... |
define(function (require) {
const EventModel = require('/pam-event.js')
const [$, $$] = require('/vools.js')
const EditorAction = require('controller/editor/action.js')
const Profile = Object.create(EventModel)
const timeout = ms => new Promise(r => setTimeout(r, ms))
console.warn(EditorAction)
// Laye... |
'use strict';
const fs = require('fs'),
path = require('path');
const PEG = require('pegjs');
const pegjsPath = path.resolve(__dirname, 'where.pegjs');
const options = {
cache: false,
output: 'parser',
optimize: 'speed',
trace: false,
plugins: []
};
const parser = PEG.generate(fs.readFileSync(pegjsPath,... |
const a = new Promise(resolve => setTimeout(resolve, 1000, 'hello'))
const b = ' '
const c = new Promise(resolve => setTimeout(resolve, 200, 'world'))
// b は Promise.resolve(b) に変換される
Promise.all([a, b, c]).then(x => console.log(x.join('')))
|
import Ember from 'ember';
import config from '../config/environment';
import IsBetweenHelper from 'ember-moment/helpers/is-between';
export default IsBetweenHelper.extend({
globalAllowEmpty: !!Ember.get(config, 'moment.allowEmpty')
});
|
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2020 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
var FLIPPED_HORIZONTAL = 0x80000000;
var FLIPPED_VERTICAL = 0x40000000;
var FLIPPED_ANTI_DIAGONAL = 0x20000000; // Top-right is swapped with bot... |
'use strict';
var _stringify = require('babel-runtime/core-js/json/stringify');
var _stringify2 = _interopRequireDefault(_stringify);
var _path = require('path');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
module.exports = function (content, sourceMap) {
this.... |
import { defineMessages } from 'react-intl';
export default defineMessages({
congratuation: {
defaultMessage: '恭喜',
id: 'app.notify.congratuation'
},
success: {
defaultMessage: '成功',
id: 'app.notify.success'
},
sorry: {
defaultMessage: '不好意思',
id: 'app.notify.sorry'
},
failure: {
... |
module.exports = require('lodash/object/assign');
|
export const SET_CODE_KEY = 'SET_CODE_KEY';
export const ADD_CODE_DATA = 'ADD_CODE_DATA';
export const UPDATE_CODE_DATA = 'UPDATE_CODE_DATA';
const store = {
state: {
// 会话列表
datasets: [
{
id: '',
name: 'blank',
parent: '',
... |
/**
* Capitan
*
* Copyright brandung GmbH & Co.KG
* http://www.brandung.de/
*
* Date: 19.08.2015
* MIT License (MIT)
*
* Resize handler with debounce, should be used for resize handling purposes instead of e.g. $(window).on('resize', ...)
*/
Capitan.Util.injectSmartResize = function ($, sr) {
// debouncing f... |
/* jshint node: true */
'use strict';
module.exports = {
name: 'ember-localforage-adapter',
included: function included(app) {
this._super.included.apply(this, arguments);
if (app.app) {
app = app.app;
}
this.app = app;
app.import(app.bowerDirectory + '/localforage/dist/localforage.js');
... |
'use strict';
var Converter = require('xml2object');
var es = require('event-stream');
var js2xmlparser = require('js2xmlparser');
module.exports = function (foundry) {
foundry.registerConverter('xml:object', xml2object);
foundry.registerConverter('object:xml', object2xml);
}
// could not find any d... |
module.exports = {
mode: "development",
entry: {
SwipeCounter: "./lib/SwipeCounter.js",
SwipeMarkdown: "./lib/SwipeMarkdown.js",
SwipePage: "./lib/SwipePage.js",
SwipeScreen: "./lib/SwipeScreen.js",
SwipeBook: "./lib/SwipeBook.js",
SwipeElement: "./lib/SwipeElement.js",
SwipeMediaPlayer... |
require('../smart.min.js');
var fs = require('fs');
function getData()
{
return {
'foo' : 'bar',
'a' : ['0','1','2','3','4','5','6','7','8','9'],
'a2' : ['0',{baz:'baz'}],
'o' : { '0':'0','1':'1','2':'2','3':'3','4':'4','5':'5','6':'6','7':'7','8':'8','9':'9' },
'ob' : {
'prop1': 'prop1',
... |
// Generated by CoffeeScript 1.3.3
(function() {
var LawnchairStore, Spine;
Spine = require('spine');
LawnchairStore = require('./lawnchair_store');
Spine.Model.Lawnchair = {
extended: function() {
this.extend(LawnchairStore);
this.change(this.saveLawnchair);
return this.fetch(this.load... |
var _ = require('lodash')
var oo = require('@carbon-io/carbon-core').atom.oo(module)
var STRINGS = {
upsertParameter: {
upsert: {
description: 'Enable upsert'
}
},
parameters: {
update: {
description: 'The update spec'
}
}
}
/*******************************************************... |
(function () {
'use strict';
define(function () {
return [
{
key: 'first',
labelText: 'Field One',
sort: true,
placeholder: 'placeholder value'
},
{
key: 'second',
labelTe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.