main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
539 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | 'use strict';
|
---|
| 2 | var uncurryThis = require('../internals/function-uncurry-this');
|
---|
| 3 | var iterateSimple = require('../internals/iterate-simple');
|
---|
| 4 | var SetHelpers = require('../internals/set-helpers');
|
---|
| 5 |
|
---|
| 6 | var Set = SetHelpers.Set;
|
---|
| 7 | var SetPrototype = SetHelpers.proto;
|
---|
| 8 | var forEach = uncurryThis(SetPrototype.forEach);
|
---|
| 9 | var keys = uncurryThis(SetPrototype.keys);
|
---|
| 10 | var next = keys(new Set()).next;
|
---|
| 11 |
|
---|
| 12 | module.exports = function (set, fn, interruptible) {
|
---|
| 13 | return interruptible ? iterateSimple({ iterator: keys(set), next: next }, fn) : forEach(set, fn);
|
---|
| 14 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.