All files collect.ts

100% Statements 8/8
100% Branches 0/0
100% Functions 1/1
100% Lines 7/7
1 2 3 4 5 6 7 8 9 10 11 12 13 146x       22x 22x 75x 75x   22x     6x  
import { Collection, asIterable } from './utils'
import Sequence from './Sequence'
 
function collect<T>(collection: Collection<T>) {
  const iterable = asIterable(collection)
  const result = []
  for(const value of iterable) {
    result.push(value)
  }
  return result
}
 
export default collect