fcf.isIterable() function
Package: fcf-framework-core
File: fcf-framework-core:fcf.js
Available from version: 2.0.2
Checks if an argument is iterable, but is not a string.
Arguments
- Checked object
Result
- Returns true if the argument is iterable
Example: Function application
console.log(`[]: `, fcf.isIterable([]));
console.log(`new Map(): `, fcf.isIterable(new Map()));
console.log(`{}: `, fcf.isIterable({}));
console.log(`"str": `, fcf.isIterable("str"));
console.log(`1: `, fcf.isIterable(1));
console.log(`null: `, fcf.isIterable(null));
Output:
[]: true
new Map(): true
{}: false
"str": false
1: false
null: false