massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / modules / esnext.iterator.map.js
index 054a7d1c78f894909e43b7267f6c54d21b18449d..4460473676ea9bc892061639bde3951404113eda 100644 (file)
@@ -1,14 +1,15 @@
 'use strict';
 // https://github.com/tc39/proposal-iterator-helpers
 var $ = require('../internals/export');
-var aFunction = require('../internals/a-function');
+var apply = require('../internals/function-apply');
+var aCallable = require('../internals/a-callable');
 var anObject = require('../internals/an-object');
 var createIteratorProxy = require('../internals/iterator-create-proxy');
 var callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');
 
-var IteratorProxy = createIteratorProxy(function (arg) {
+var IteratorProxy = createIteratorProxy(function (args) {
   var iterator = this.iterator;
-  var result = anObject(this.next.call(iterator, arg));
+  var result = anObject(apply(this.next, iterator, args));
   var done = this.done = !!result.done;
   if (!done) return callWithSafeIterationClosing(iterator, this.mapper, result.value);
 });
@@ -17,7 +18,7 @@ $({ target: 'Iterator', proto: true, real: true }, {
   map: function map(mapper) {
     return new IteratorProxy({
       iterator: anObject(this),
-      mapper: aFunction(mapper)
+      mapper: aCallable(mapper)
     });
   }
 });