(value)
| 318 | } |
| 319 | |
| 320 | function seqFromValue(value) { |
| 321 | const seq = maybeIndexedSeqFromValue(value); |
| 322 | if (seq) { |
| 323 | return isEntriesIterable(value) |
| 324 | ? seq.fromEntrySeq() |
| 325 | : isKeysIterable(value) |
| 326 | ? seq.toSetSeq() |
| 327 | : seq; |
| 328 | } |
| 329 | if (typeof value === 'object') { |
| 330 | return new ObjectSeq(value); |
| 331 | } |
| 332 | throw new TypeError( |
| 333 | 'Expected Array or collection object of values, or keyed object: ' + value |
| 334 | ); |
| 335 | } |
| 336 | |
| 337 | function maybeIndexedSeqFromValue(value) { |
| 338 | return isArrayLike(value) |
no test coverage detected