source: node_modules/d3-shape/src/array.js

Last change on this file was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 242 bytes
Line 
1export var slice = Array.prototype.slice;
2
3export 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.