Socket
Socket
Sign inDemoInstall

cast-array

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cast-array

Ensure a value is an array and wrap it if it is not an array


Version published
Weekly downloads
19K
increased by2.16%
Maintainers
1
Install size
10.7 kB
Created
Weekly downloads
 

Readme

Source

cast-array Build Status

Ensure a value is an array and wrap it if it is not an array

Install

$ npm install --save cast-array

Usage

var castArray = require('cast-array')

castArray('input')
//=> ['input']

castArray(['input'])
//=> ['input']

API

castArray(value) -> array
value

Required
Type: array / any

A value to wrap in an array (unless it's already an array).

License

MIT © Ben Drucker

Keywords

FAQs

Last updated on 13 Nov 2015

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc