ClearKeptObjects.js 302 B

123456789101112
  1. 'use strict';
  2. var SLOT = require('internal-slot');
  3. var keptObjects = [];
  4. // https://ecma-international.org/ecma-262/12.0/#sec-clear-kept-objects
  5. module.exports = function ClearKeptObjects() {
  6. keptObjects.length = 0;
  7. };
  8. SLOT.set(module.exports, '[[es-abstract internal: KeptAlive]]', keptObjects);