]> git.r.bdr.sh - rbdr/dotfiles/blob
72eb1f8a27ff3095f1c21792eac7ab5d7fd3b716
[rbdr/dotfiles] /
1 'use strict';
2
3 var iteratorSymbol = require('es6-symbol').iterator;
4
5 module.exports = function () {
6 var arr = ['foo', 1], iterator, result;
7 if (typeof arr[iteratorSymbol] !== 'function') return false;
8 iterator = arr[iteratorSymbol]();
9 if (!iterator) return false;
10 if (typeof iterator.next !== 'function') return false;
11 result = iterator.next();
12 if (!result) return false;
13 if (result.value !== 'foo') return false;
14 if (result.done !== false) return false;
15 return true;
16 };