1.0.0 • Published 5 years ago
sure-array v1.0.0
sure-array
Converts the input into an array or returns it if it is already an array.
Installation
npm install --save sure-array@^1.0.0yarn add sure-array@^1.0.0
(if configured properly)
npm install --save @jaid/sure-array@^1.0.0Example
import sureArray from "sure-array"
const result = sureArray(123)
const result2 = sureArray([123])
const result3 = sureArray()
const result4 = sureArray(undefined)
const result5 = sureArray(null)
const result6 = sureArray([[123]])Variable result will be:
[123]Variable result2 will be:
[123]Variable result3 will be:
[]Variable result4 will be:
[]Variable result5 will be:
[null]Variable result6 will be:
[[123]]Development
Setting up:
git clone git@github.com:jaid/sure-array.git
cd sure-array
npm installTesting:
npm run test:devTesting in production environment:
npm run testLicense
MIT License
Copyright © 2020, Jaid \jaid.jsx@gmail.com (https://github.com/jaid)
1.0.0
5 years ago