Gerrit Linnemann 0dd4236e11 Initial Commit
2017-12-18 14:24:11 +01:00

15 lines
539 B
JavaScript

// Create a deferredConfig prototype so that we can check for it when reviewing the configs later.
function DeferredConfig () {
}
DeferredConfig.prototype.resolve = function (config, original) {};
// Accept a function that we'll use to resolve this value later and return a 'deferred' configuration value to resolve it later.
function deferConfig (func) {
var obj = Object.create(DeferredConfig.prototype);
obj.resolve = func;
return obj;
}
module.exports.deferConfig = deferConfig;
module.exports.DeferredConfig = DeferredConfig;