cast-array

    1.0.1 • Public • Published

    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

    Install

    npm i cast-array

    DownloadsWeekly Downloads

    15,611

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • bendrucker