# @coolgk/array

> array utilities

Latest version **2.0.5** (published 2019-08-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @coolgk/array
pnpm add @coolgk/array
yarn add @coolgk/array
bun add @coolgk/array
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.5 |
| Published | 2019-08-08 |
| First published | 2018-01-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Daniel Gong |
| Maintainers | coolgk |
| Keywords | toArray, typescript |

## Links

- npm: https://www.npmjs.com/package/@coolgk/array
- Repository: https://github.com/coolgk/node-utils
- Issues: https://github.com/coolgk/node-utils/issues
- npm.io page: https://npm.io/package/@coolgk/array

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 2.0.5 (latest) — 2019-08-08
- 2.0.4 — 2018-02-21
- 2.0.3 — 2018-01-25
- 2.0.2 — 2018-01-25
- 2.0.1 — 2018-01-24
- 2.0.0 — 2018-01-20
- 1.1.4 — 2018-01-17
- 1.1.3 — 2018-01-17
- 1.1.2 — 2018-01-16
- 1.1.1 — 2018-01-16
- 1.1.0 — 2018-01-16
- 1.0.9 — 2018-01-14
- 1.0.8 — 2018-01-13
- 1.0.6 — 2018-01-12
- 1.0.5 — 2018-01-10
- … 3 more at https://npm.io/package/@coolgk/array/versions

## README

## @coolgk/array
a javascript / typescript module

`npm install @coolgk/array`

array utilities

Report bugs here: [https://github.com/coolgk/node-utils/issues](https://github.com/coolgk/node-utils/issues)
## Examples
```javascript
import { toArray } from '@coolgk/array';
// OR
// const { toArray } = require('@coolgk/array');

const a = undefined;
const b = false;
const c = '';
const d = [1,2,3];
const e = {a:1};

console.log(toArray(a)); // []
console.log(toArray(b)); // [ false ]
console.log(toArray(c)); // [ '' ]
console.log(toArray(d)); // [ 1, 2, 3 ]
console.log(toArray(e)); // [ { a: 1 } ]

```
<a name="toArray"></a>

## toArray(data) ⇒ <code>array</code>
**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| data | <code>\*</code> | any data to be type cast to array |

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