Son CV dans un terminal web en Javascript! https://terminal-cv.gregandev.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terminal-cv/node_modules/core-js/internals/collection-delete-all.js

18 lines
586 B

1 year ago
'use strict';
var call = require('../internals/function-call');
var aCallable = require('../internals/a-callable');
var anObject = require('../internals/an-object');
// https://github.com/tc39/collection-methods
module.exports = function deleteAll(/* ...elements */) {
var collection = anObject(this);
var remover = aCallable(collection['delete']);
var allDeleted = true;
var wasDeleted;
for (var k = 0, len = arguments.length; k < len; k++) {
wasDeleted = call(remover, collection, arguments[k]);
allDeleted = allDeleted && wasDeleted;
}
return !!allDeleted;
};