# as

> as/array and as/object. Convert easily, back and forth.

Latest version **0.4.1** (published 2015-02-12) · MIT license · 0 weekly downloads

## Install

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

## 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.4.1 |
| Published | 2015-02-12 |
| First published | 2015-01-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Tomek Wiszniewski |
| Maintainers | tomekwi |
| Keywords | object, array, convert, functional, programming, functions, map, forEach, filter, every, some, sort, pop |

## Links

- npm: https://www.npmjs.com/package/as
- Repository: https://github.com/tomekwi/as.js
- Issues: https://github.com/tomekwi/as.js/issues
- npm.io page: https://npm.io/package/as

## Alternatives

- [react-native-root-siblings](https://npm.io/package/react-native-root-siblings.md) — 102.9K weekly downloads
- [@praxisui/dialog](https://npm.io/package/@praxisui/dialog.md) — 2.0K weekly downloads
- [easy-toggle-state](https://npm.io/package/easy-toggle-state.md) — 350 weekly downloads
- [ngx-lightbox-evp](https://npm.io/package/ngx-lightbox-evp.md) — 19 weekly downloads
- [react-native-modal-translucent-axton](https://npm.io/package/react-native-modal-translucent-axton.md) — 4 weekly downloads

## Recent versions

- 0.4.1 (latest) — 2015-02-12
- 0.4.0 — 2015-02-11
- 0.3.1 — 2015-02-10
- 0.2.2 — 2015-01-09
- 0.2.1 — 2015-01-09
- 0.2.0 — 2015-01-07
- 0.2.0-alpha.2 — 2015-01-06
- 0.2.0-alpha-01 — 2015-01-06
- 0.1.0 — 2015-01-05
- 0.0.5 — 2015-01-05
- 0.0.4 — 2015-01-03
- 0.0.0-new — 2015-01-03

## README

[![Build status
](https://img.shields.io/travis/tomekwi/as/master.svg?style=flat-square)
](https://travis-ci.org/tomekwi/as)
 [![Coveralls
](https://img.shields.io/coveralls/tomekwi/as.svg?style=flat-square)
](https://coveralls.io/r/tomekwi/as)
 [![David DM
](https://img.shields.io/david/tomekwi/as.svg?style=flat-square)
](http://david-dm.org/tomekwi/as)

as
===

**`as/array` and `as/object`. Convert easily, back and forth.**

- Brings all functional goodness of arrays to objects.
- Brings the flexibility of objects to arrays.
- Works great with [1-liners][], [101][] and other functional programming libraries.


[101]: https://github.com/tjmehta/101 "tjmehta/101"
[1-liners]: https://github.com/stoeffel/1-liners "stoeffel/1-liners"




Installation
------------

```sh
$ npm install as
```




Usage
-----

```js
var asArray = require("as/array");
var asObject = require("as/object");
```


### as/array

```js
asArray(
  {a: 1, b: 2}
  );
// [ {key: "a", value: 1}
// , {key: "b", value: 2}
// ]
```


### as/object

```js
asObject(
  [ {key: "a", value: 1}
  , {key: "b", value: 2}
  ]);
// {a: 1, b: 2}
```




License
-------

[MIT][] © [Tomek Wiszniewski][].


[MIT]: ./License.md
[Tomek Wiszniewski]: https://github.com/tomekwi

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