
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
Turn anything into an array
$ npm install --save array-ify
var arrayify = require('array-ify');
arrayify('unicorn');
//=> ['unicorn']
arrayify(['unicorn']);
//=> ['unicorn']
arrayify(null);
//=> [null]
arrayify(undefined);
//=> [undefined]
The difference that is this module does NOT turn null or undefined to an empty array.
MIT © Steve Mao
The arrify package is similar to array-ify in that it converts a value to an array. If the value is already an array, it returns it unchanged. If the value is null or undefined, it returns an empty array. It is a lightweight and straightforward alternative to array-ify.
The to-array package converts an array-like object or a single value to an array. It is more versatile in handling array-like objects such as NodeList or arguments objects, making it a good alternative to array-ify for more complex use cases.
The ensure-array package ensures that the input is always returned as an array. It is similar to array-ify but also provides additional options for handling different types of inputs, making it a more flexible alternative.
FAQs
Turn anything into an array
The npm package array-ify receives a total of 8,351,148 weekly downloads. As such, array-ify popularity was classified as popular.
We found that array-ify 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.