Created
January 7, 2016 15:13
-
-
Save KSXGitHub/e2fc5d65ae3b33a1e058 to your computer and use it in GitHub Desktop.
A particular `DeepIterableBase.CIRCULAR_DEEPER` returns `true` for any particular value for once
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var DeepIterable = require('x-iterable/deep-iterable'); | |
var sub0 = ['sub0']; | |
var sub1 = ['sub1']; | |
var target = ['abcdef', sub0, sub1]; | |
var REUSE = DeepIterable.CIRCULAR_DEEPER; | |
console.log({ | |
're-use': [ | |
DeepIterable.create(target, REUSE).toArray(), | |
DeepIterable.create(target, REUSE).toArray(), | |
DeepIterable.create(target, REUSE).toArray(), | |
DeepIterable.create(['abcdefABCDEF', target, Symbol('new')], REUSE).toArray() | |
], | |
'use-new': [ | |
DeepIterable.create(target, DeepIterable.CIRCULAR_DEEPER).toArray(), | |
DeepIterable.create(target, DeepIterable.CIRCULAR_DEEPER).toArray(), | |
DeepIterable.create(target, DeepIterable.CIRCULAR_DEEPER).toArray(), | |
DeepIterable.create(['abcdefABCDEF', target, Symbol('new')], DeepIterable.CIRCULAR_DEEPER).toArray() | |
] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment