From 3963e0ff44f74b2718bd19b4082fb800cb030a46 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Thu, 11 May 2017 14:23:47 -0400 Subject: [PATCH] lib: save a reference to intrinsic constructs --- lib/internal/util.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/internal/util.js b/lib/internal/util.js index 4dfcf81837b912..83c0915e5f02c6 100644 --- a/lib/internal/util.js +++ b/lib/internal/util.js @@ -278,3 +278,14 @@ promisify.custom = kCustomPromisifiedSymbol; exports.promisify = promisify; exports.customPromisifyArgs = kCustomPromisifyArgsSymbol; + +exports.intrinsic = { + FunctionApply: Function.prototype.apply, + FunctionCall: Function.prototype.call, + ObjectAssign: Object.assign, + ObjectSetPrototypeOf: Object.setPrototypeOf, + Object: Object, + Array: Array, + ObjectPrototype: Object.assign({}, Object.prototype), + ArrayPrototype: Object.assign({}, Array.prototype) +};