csf
Version:
Generator based flow control with context providing
20 lines (17 loc) • 453 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createChildContext;
/*
* Create new child context prototypically inherited with current
* context
*/
function createChildContext(initialContext) {
return function childContextCreator() {
var childContext = Object.create(this);
Object.assign(childContext, initialContext);
return childContext;
};
}
module.exports = exports["default"];