source:
node_modules/d3-shape/src/array.js
| Last change on this file was e4c61dd, checked in by , 6 months ago | |
|---|---|
|
|
| File size: 242 bytes | |
| Line | |
|---|---|
| 1 | export var slice = Array.prototype.slice; |
| 2 | |
| 3 | export default function(x) { |
| 4 | return typeof x === "object" && "length" in x |
| 5 | ? x // Array, TypedArray, NodeList, array-like |
| 6 | : Array.from(x); // Map, Set, iterable, string, or anything else |
| 7 | } |
Note:
See TracBrowser
for help on using the repository browser.
