|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
657 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 | var $ = require('../internals/export');
|
|---|
| 3 | var bind = require('../internals/function-bind-context');
|
|---|
| 4 | var aMap = require('../internals/a-map');
|
|---|
| 5 | var iterate = require('../internals/map-iterate');
|
|---|
| 6 |
|
|---|
| 7 | // `Map.prototype.some` method
|
|---|
| 8 | // https://github.com/tc39/proposal-collection-methods
|
|---|
| 9 | $({ target: 'Map', proto: true, real: true, forced: true }, {
|
|---|
| 10 | some: function some(callbackfn /* , thisArg */) {
|
|---|
| 11 | var map = aMap(this);
|
|---|
| 12 | var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|---|
| 13 | return iterate(map, function (value, key) {
|
|---|
| 14 | if (boundFunction(value, key, map)) return true;
|
|---|
| 15 | }, true) === true;
|
|---|
| 16 | }
|
|---|
| 17 | });
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.