npm install arrayme --save
const arrayme = require('arrayme');
arrayme('hello'); //=> ['hello']
arrayme(null); //=> []
arrayme(); //=> []
// Disable check on null
arrayme(null, false); //=> [null]
You can view the changelog here
arrayme is open-sourced software licensed under the MIT license