# as-array

> Make any value an array. No dependencies.

Latest version **2.0.0** (published 2015-08-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install as-array
pnpm add as-array
yarn add as-array
bun add as-array
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2015-08-26 |
| First published | 2014-01-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Scott Corgan |
| Maintainers | scottcorgan |
| Keywords | array, convert, argument |

## Links

- npm: https://www.npmjs.com/package/as-array
- Repository: https://github.com/scottcorgan/as-array
- Homepage: https://github.com/scottcorgan/as-array#readme
- Issues: https://github.com/scottcorgan/as-array/issues
- npm.io page: https://npm.io/package/as-array

## Recent versions

- 2.0.0 (latest) — 2015-08-26
- 1.0.0 — 2014-10-03
- 0.1.2 — 2014-03-10
- 0.1.1 — 2014-01-27
- 0.1.0 — 2014-01-27

## README

# as-array

Make any value an array. No dependencies.

## Install

```
npm install as-array --save
```

## Usage

```js
var asArray = require('as-array');

asArray() === [];
asArray('my string') === ['my string'];
asArray([1,2,3]) === [1,2,3];

function tester () {
  asArray(arguments) === ['arg1', 'arg2'];
}
tester('arg1', 'arg2');
```

### asArray(data[, convertObject])

* `data` - any data type to convert to an array
* `convertObject` - OPTIONAL `boolean` - pull values from object as array content

## Run Tests

```
npm install
npm test
```

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