Skip to content

Commit

Permalink
use Array.from to expand array splats
Browse files Browse the repository at this point in the history
Prior to this commit, [].slice was used to turn array-like things into
arrays when needed for splats in array literals. This commit uses
Array.from instead, when available at runtime, and falls back to slice
when not. This allows a wider range of iterables to be used as splats,
on the platforms that support them (platforms missing Array.from will
also be missing more exotic iterables).

Fix gkz#963.
  • Loading branch information
rhendric committed May 15, 2017
1 parent 6116559 commit 58892f2
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 70 deletions.

0 comments on commit 58892f2

Please sign in to comment.