
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
lazy-arrayify
Advanced tools
We are lazy, also [lazy-cache][]d and [browserify][]-ready - just arrayify, falsey values returns empty array. In bonus with `.isArray` method.
We are lazy, also lazy-cached and browserify-ready - just arrayify, falsey values returns empty array. In bonus with
.isArraymethod.
npm i lazy-arrayify --save
For more use-cases see the tests
const lazyArrayify = require('lazy-arrayify')
Check if value is array using the isarray module.
Params
val {Mixed}returns {Boolean}Example
var isArray = require('lazy-arrayify').isArray
console.log(isArray(1234)) // => false
console.log(isArray('str')) // => false
console.log(isArray(null)) // => false
console.log(isArray()) // => false
console.log(isArray(0)) // => false
console.log(isArray(false)) // => false
console.log(isArray([null, 123])) // => true
console.log(isArray([null])) // => true
console.log(isArray([false])) // => true
Returns empty array on falsey values.
Params
val {Mixed}returns {Array}Example
var arrayify = require('lazy-arrayify').arrayify
console.log(arrayify(1234)) // => [1234]
console.log(arrayify('str')) // => ['str']
console.log(arrayify(null)) // => []
console.log(arrayify()) // => []
console.log(arrayify(0)) // => []
console.log(arrayify(false)) // => []
console.log(arrayify([null, 123])) // => [null, 123]
console.log(arrayify([false])) // => [false]
prev and next methods. | homepagePull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.
FAQs
We are lazy, also [lazy-cache][]d and [browserify][]-ready - just arrayify, falsey values returns empty array. In bonus with `.isArray` method.
The npm package lazy-arrayify receives a total of 30 weekly downloads. As such, lazy-arrayify popularity was classified as not popular.
We found that lazy-arrayify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.