From 81ddf9b700bc48a1f8e472209f080f9c1d9a9b09 Mon Sep 17 00:00:00 2001 From: Piotr Russ Date: Wed, 18 Nov 2020 23:26:45 +0100 Subject: rm node_modules --- node_modules/es-abstract/2016/ObjectCreate.js | 37 --------------------------- 1 file changed, 37 deletions(-) delete mode 100644 node_modules/es-abstract/2016/ObjectCreate.js (limited to 'node_modules/es-abstract/2016/ObjectCreate.js') diff --git a/node_modules/es-abstract/2016/ObjectCreate.js b/node_modules/es-abstract/2016/ObjectCreate.js deleted file mode 100644 index e2445b0..0000000 --- a/node_modules/es-abstract/2016/ObjectCreate.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../GetIntrinsic'); - -var $ObjectCreate = GetIntrinsic('%Object.create%', true); -var $TypeError = GetIntrinsic('%TypeError%'); -var $SyntaxError = GetIntrinsic('%SyntaxError%'); - -var Type = require('./Type'); - -var hasProto = !({ __proto__: null } instanceof Object); - -// https://www.ecma-international.org/ecma-262/6.0/#sec-objectcreate - -module.exports = function ObjectCreate(proto, internalSlotsList) { - if (proto !== null && Type(proto) !== 'Object') { - throw new $TypeError('Assertion failed: `proto` must be null or an object'); - } - var slots = arguments.length < 2 ? [] : internalSlotsList; - if (slots.length > 0) { - throw new $SyntaxError('es-abstract does not yet support internal slots'); - } - - if ($ObjectCreate) { - return $ObjectCreate(proto); - } - if (hasProto) { - return { __proto__: proto }; - } - - if (proto === null) { - throw new $SyntaxError('native Object.create support is required to create null objects'); - } - var T = function T() {}; - T.prototype = proto; - return new T(); -}; -- cgit v1.2.3