3 Commits
Author SHA1 Message Date
Mariusz Nowak af2657ec5d style: Prettify 2019-06-14 11:26:34 +02:00
Mariusz Nowak cc74464f3f refactor: update to new lint rules 2017-07-10 14:05:08 +02:00
Mariusz Nowak 4219c23a74 Reorganize Array.from to follow ECMASCript6 spec
- Array.from always returns copy of input array
- Array.from implements optional mapping functionality
- Array.toArray was introduced as alternative that does not produce copy of an array if it's not needed
- Array#copy was removed, as same now can be achived by Array.from

Array.from doesn't follow ES6 spec in full:
- It doesn't support iterators (which are non existent and cannot be fully shimmed in ES5)
- It doesn't produce array subclasses if it's called in context of such constructors. Array subclasses are not possible in plain ES5 (note: still in many implementations they can be produced with help of `__proto__`, so this part may be subject to changes)
2013-10-01 13:57:59 +02:00