- Foldable left panel (user profile) and right panel (task details) - Clicking a task in the list or graph node selects it and shows details - Both views (task list + graph) always mounted via absolute inset-0 for correct canvas dimensions; tabs toggle visibility with opacity - Graph node selection animation: other nodes repel outward (charge -600), then selected node smoothly slides to center (500ms cubic ease-out), then charge restores to -120 and graph stabilizes - Graph re-fits on tab switch and panel resize via ResizeObserver - Fix UUID string IDs throughout (backend returns UUIDs, not integers) - Add TaskDetailPanel, UserPanel components - Add CLAUDE.md project documentation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3.6 KiB
es-get-iterator 
Get an iterator for any JS language value. Works robustly across all environments, all versions.
In modern engines, value[Symbol.iterator]() is sufficient to produce an iterator (an object with a .next method) for that object. However, older engines:
- may lack
Symbolsupport altogether - may have
Symbol.iteratorbut not implement it on everything it should, like arguments objects - may have
MapandSet, but a non-standard name for the iterator-producing method (.iteratoror['@@iterator'], eg) - may be old versions of Firefox that produce values until they throw a StopIteration exception, rather than having iteration result objects
- may be polyfilled/shimmed/shammed, with
es6-shimorcore-jsor similar
This library attempts to provide an abstraction over all that complexity!
In node v13+, exports is used to provide a lean implementation that lacks all the complexity described above, in combination with the browser field so that bundlers will pick up the proper implementation.
Targeting browsers with Symbol support
If you are targeting browsers that definitely all have Symbol support, then you can configure your bundler to replace require('has-symbols')() with a literal true, which should allow dead code elimination to reduce the size of the bundled code.
With @rollup/plugin-replace
// rollup.config.js
import replace from '@rollup/plugin-replace';
export default {
...
plugins: [
replace({
"require('has-symbols')()": 'true',
delimiters: ['', '']
})
]
};
Example
var getIterator = require('es-get-iterator');
var assert = require('assert');
var iterator = getIterator('a 💩');
assert.deepEqual(
[iterator.next(), iterator.next(), iterator.next(), iterator.next()],
[{ done: false, value: 'a' }, { done: false, value: ' ' }, { done: false, value: '💩' }, { done: true, value: undefined }]
);
var iterator = getIterator([1, 2]);
assert.deepEqual(
[iterator.next(), iterator.next(), iterator.next()],
[{ done: false, value: 1 }, { done: false, value: 2 }, { done: true, value: undefined }]
);
var iterator = getIterator(new Set([1, 2]));
assert.deepEqual(
[iterator.next(), iterator.next(), iterator.next()],
[{ done: false, value: 1 }, { done: false, value: 2 }, { done: true, value: undefined }]
);
var iterator = getIterator(new Map([[1, 2], [3, 4]]));
assert.deepEqual(
[iterator.next(), iterator.next(), iterator.next()],
[{ done: false, value: [1, 2] }, { done: false, value: [3, 4] }, { done: true, value: undefined }]
);
Tests
Simply clone the repo, npm install, and run npm test
