Package Exports
- toarray
- toarray/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (toarray) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
I find myself writing item = item instanceof Array ? item : [item] a lot, so I decided to make a simple library to does
it for me. A few examples:
toArray = require("toarray");
console.log(toArray("hello-world!")); //["hello-world!"]
console.log(toArray(["hello-world!"])); //["hello-world!"]
console.log(toArray(undefined)); //[]