Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / modules / esnext.map.find.js
1 'use strict';
2 var $ = require('../internals/export');
3 var IS_PURE = require('../internals/is-pure');
4 var anObject = require('../internals/an-object');
5 var bind = require('../internals/function-bind-context');
6 var getMapIterator = require('../internals/get-map-iterator');
7 var iterate = require('../internals/iterate');
8
9 // `Map.prototype.find` method
10 // https://github.com/tc39/proposal-collection-methods
11 $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
12   find: function find(callbackfn /* , thisArg */) {
13     var map = anObject(this);
14     var iterator = getMapIterator(map);
15     var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
16     return iterate(iterator, function (key, value, stop) {
17       if (boundFunction(value, key, map)) return stop(value);
18     }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).result;
19   }
20 });