Urara-Blog/node_modules/.pnpm-store/v3/files/2f/ccf51fc4b8443c06adb6b00336134d0010c4a8491a4823b35d02cae2c30261de49adaef6e596d57015116ac0a2a407628ab2219d1cc8f4eeacd6948c6c8e93
2022-08-14 01:14:53 +08:00

21 lines
645 B
Text

'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bind/callBound');
var SLOT = require('internal-slot');
var $TypeError = GetIntrinsic('%TypeError%');
var ClearKeptObjects = require('./ClearKeptObjects');
var Type = require('./Type');
var $push = callBound('Array.prototype.push');
// https://ecma-international.org/ecma-262/12.0/#sec-addtokeptobjects
module.exports = function AddToKeptObjects(object) {
if (Type(object) !== 'Object') {
throw new $TypeError('Assertion failed: `object` must be an Object');
}
$push(SLOT.get(ClearKeptObjects, '[[es-abstract internal: KeptAlive]]'), object);
};