Have ideas to improve npm?Join in the discussion! »

clean-array

1.0.0 • Public • Published

clean-array

NPM version License Build status

Safely remove empty values from an array.

Installation

npm install clean-array

Usage

var cleanArray = require('clean-array')
 
var arr = [null, undefined, [], {}, '', true, false, 1, 0, 'string']
 
cleanArray(arr)
// => [true, false, 1, 0, 'string']

Install

npm i clean-array

DownloadsWeekly Downloads

166

Version

1.0.0

License

MIT

Last publish

Collaborators

  • avatar