# arrayify-compact

> Casts the given value to a flatten array, and removes falsey items (similar to lodash compact).

Latest version **0.2.0** (published 2015-06-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install arrayify-compact
pnpm add arrayify-compact
yarn add arrayify-compact
bun add arrayify-compact
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2015-06-20 |
| First published | 2014-07-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | array, arrayify, boolean, compact, falsey, flat, flatten, flattened, to-array, toArray, values |

## Links

- npm: https://www.npmjs.com/package/arrayify-compact
- Repository: https://github.com/jonschlinkert/arrayify-compact
- Issues: https://github.com/jonschlinkert/arrayify-compact/issues
- npm.io page: https://npm.io/package/arrayify-compact

## Dependencies (1)

- [arr-flatten](https://npm.io/package/arr-flatten.md) ^1.0.1

## Recent versions

- 0.2.0 (latest) — 2015-06-20
- 0.1.1 (patch) — 2019-12-04
- 0.1.0 — 2014-07-07

## README

# arrayify-compact [![NPM version](https://badge.fury.io/js/arrayify-compact.svg)](http://badge.fury.io/js/arrayify-compact)

> Casts the given value to a flatten array, and removes falsey items (similar to lodash compact).

## Install

Install with [npm](https://www.npmjs.com/)

```sh
$ npm i arrayify-compact --save
```

Install with [bower](http://bower.io/)

```sh
$ bower install arrayify-compact --save
```

## Usage

```js
var arrayify = require('arrayify-compact');
arrayify('a');
//=> ['a']

arrayify(['a', 'b', ['c', ['d']]]);
//=> ['a', 'b', 'c', 'd']

arrayify(['a', 'b', ['c', ['d'], null, false, 0, NaN, '', [], undefined]]);
//=> ['a', 'b', 'c', 'd']
```

## Related

Other utils for working with arrays.

* [arr-flatten](https://github.com/jonschlinkert/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten.
* [arr-reduce](https://github.com/jonschlinkert/arr-reduce): Fast array reduce that also loops over sparse elements.
* [arr-pluck](https://github.com/jonschlinkert/arr-pluck): Retrieves the value of a specified property from all elements in the collection.
* [arr-map](https://github.com/jonschlinkert/arr-map): Faster, node.js focused alternative to JavaScript's native array map.
* [arr-union](https://github.com/jonschlinkert/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union)
* [array-unique](https://github.com/jonschlinkert/array-unique): Return an array free of duplicate values. Fastest ES5 implementation.
* [utils](https://github.com/jonschlinkert/utils): Fast, generic JavaScript/node.js utility functions.

## Running tests

Install dev dependencies:

```sh
$ npm i -d && npm test
```

## Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arrayify-compact/issues/new)

## Author

**Jon Schlinkert**

+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

## License

Copyright © 2015 Jon Schlinkert
Released under the MIT license.

***

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 19, 2015._

---
_Source: https://npm.io/package/arrayify-compact · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
