Shared Secret string used to validate requests, is hardcoded within codebase, and not exposed in this document on purpose.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var Database, defineUser, migrateObject, migrateProperty, migrateType, memoize, getPrototypeOf | |
, DbjsEvent, isGetter; | |
migrateType = function (type, targetDatabase) { | |
var prototype, sourceEvent, targetEvent; | |
if (targetDatabase.objects.getById(type.__id__)) return; | |
prototype = getPrototypeOf(type); | |
migrateType(prototype, targetDatabase); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var esniff = require('./') | |
, name = 'i18n.bind' | |
, hasOwnProperty = Object.prototype.hasOwnProperty | |
, $common = esniff.$common | |
, wsSet = esniff.wsSet | |
, move = esniff.move |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var Database = require('dbjs') | |
, serialize = require('dbjs/_setup/serialize/value') | |
, unserialize = require('dbjs/_setup/unserialize/value') | |
, DbjsEvent = require('dbjs/_setup/event') | |
, db = new Database(); | |
// 1. Save |
Provided as distinct CJS modules, installable via npm
Individual modules of es5-ext package. See ES6 features for usage information.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// Define reusable utils, outside of exported function body | |
var someUtilA = function () { | |
/* ... */ | |
}; | |
var someUtilB = function () { | |
/* ... */ | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This simplified test case unfortunately doesn't reproduce the issue | |
// nevertheless such error occurs in complex app I'm working with | |
'use strict'; | |
var Foo = function () {} | |
, resolve = function () { return {}; }; | |
Object.defineProperty(Foo.prototype, 'bar', { | |
configurable: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Deferred | |
var asyncFn1 = function () { | |
var deferred = new Deferred(); | |
// Initialize async operation and resolve it with either: | |
// deferred.resolve or deferred.reject | |
return deferred.promise; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs') | |
, join = require('path').join | |
, promisify = require('deferred').promisify | |
, readdir = promisify(fs.readdir), lstat = promisify(fs.lstat); | |
module.exports = function (dir) { | |
var largest = null, largestSize = -1; | |
return readdir(dir).map(function (file) { | |
return lstat(join(dir, file))(function (stats) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lstat = function (path, cb) { | |
var count = 11; | |
setImmediate(function self() { | |
if (--count) setImmediate(self); | |
else cb(null, {}); | |
}); | |
}; |