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