arrayme

Transforms a value to an array

Usage no npm install needed!

<script type="module">
  import arrayme from 'https://cdn.skypack.dev/arrayme';
</script>

README

arrayme

Transforms a value to an array.

Installation

Node.js

npm install arrayme --save

Example

const arrayme = require('arrayme');

arrayme('hello'); //=> ['hello']
arrayme(null); //=> []
arrayme(); //=> []

// Disable check on null
arrayme(null, false); //=> [null]

Changelog

You can view the changelog here

License

arrayme is open-sourced software licensed under the MIT license

Author

Fabio Ricali