Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
347 bytes
|
Line | |
---|
1 | var anObject = require('../internals/an-object');
|
---|
2 | var getIteratorMethod = require('../internals/get-iterator-method');
|
---|
3 |
|
---|
4 | module.exports = function (it) {
|
---|
5 | var iteratorMethod = getIteratorMethod(it);
|
---|
6 | if (typeof iteratorMethod != 'function') {
|
---|
7 | throw TypeError(String(it) + ' is not iterable');
|
---|
8 | } return anObject(iteratorMethod.call(it));
|
---|
9 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.