adobe / ferrum

Features from the rust language in javascript: Provides Traits/Type classes & a hashing infrastructure and an advanced library for working with sequences/iterators in js
https://www.ferrumjs.org
Apache License 2.0
519 stars 25 forks source link

Take is broken on plain arrays? #193

Closed tobia closed 3 years ago

tobia commented 3 years ago

Description take does not seem to work if the data argument is a plain JS array.

To Reproduce

> take([1,2,3,4], 3)
[ 1, 1, 1 ]

Expected behavior Unless I'm misunderstanding something, I expected to get [1, 2, 3]

Version: Ferrum 1.9.0 on Node 14.16.0

koraa commented 3 years ago

Oh yeah, the implementation uses next() without iter…fantastic catch, thank you! You seem to be doing some thorough checking of the library, thank you! I do appreciate it!

adobe-bot commented 3 years ago

:tada: This issue has been resolved in version 1.9.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: