source: imaps-frontend/node_modules/es-abstract/2024/AddToKeptObjects.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 594 bytes
RevLine 
[d565449]1'use strict';
2
[79a0317]3var callBound = require('call-bound');
[d565449]4var SLOT = require('internal-slot');
5
6var $TypeError = require('es-errors/type');
7
8var ClearKeptObjects = require('./ClearKeptObjects');
[79a0317]9
10var isObject = require('../helpers/isObject');
[d565449]11
12var $push = callBound('Array.prototype.push');
13
14// https://262.ecma-international.org/12.0/#sec-addtokeptobjects
15
16module.exports = function AddToKeptObjects(object) {
[79a0317]17 if (!isObject(object)) {
[d565449]18 throw new $TypeError('Assertion failed: `object` must be an Object');
19 }
20 $push(SLOT.get(ClearKeptObjects, '[[es-abstract internal: KeptAlive]]'), object);
21};
Note: See TracBrowser for help on using the repository browser.