source: trip-planner-front/node_modules/core-js/internals/collection-delete-all.js@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 526 bytes
Line 
1'use strict';
2var anObject = require('../internals/an-object');
3var aFunction = require('../internals/a-function');
4
5// https://github.com/tc39/collection-methods
6module.exports = function (/* ...elements */) {
7 var collection = anObject(this);
8 var remover = aFunction(collection['delete']);
9 var allDeleted = true;
10 var wasDeleted;
11 for (var k = 0, len = arguments.length; k < len; k++) {
12 wasDeleted = remover.call(collection, arguments[k]);
13 allDeleted = allDeleted && wasDeleted;
14 }
15 return !!allDeleted;
16};
Note: See TracBrowser for help on using the repository browser.