# @remypar5/array-to-db

> A simple utility to create a database table out of a given array of objects

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

## Install

```sh
npm install @remypar5/array-to-db
pnpm add @remypar5/array-to-db
yarn add @remypar5/array-to-db
bun add @remypar5/array-to-db
```

## 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 | 1.1.0 |
| Published | 2019-04-08 |
| First published | 2018-12-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 206.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Remy Parzinski |
| Maintainers | remypar5 |

## Links

- npm: https://www.npmjs.com/package/@remypar5/array-to-db
- Repository: https://github.com/remypar5/array-to-db
- Issues: https://github.com/remypar5/array-to-db/issues
- npm.io page: https://npm.io/package/@remypar5/array-to-db

## Recent versions

- 1.1.0 (latest) — 2019-04-08
- 1.0.1 — 2018-12-28

## README

# arrayToDb()
A simple utility to create a DB table out of a given array of objects. Use it to create a simple object out of an array of objects, accessible by each object's respective unique identifier. This provides easier and faster access.

## Installation
NPM
```
npm i --save @remypar5/array-to-db
```
Yarn
```
yarn add @remypar5/array-to-db
```

## Usage:
```javascript
import arrayToDb from '@remypar5/array-to-db';

const heroesArray = [
    { id: 'luke', name: 'Luke Skywalker' },
    { id: 'tony', name: 'Iron Man' },
    { id: 'bruce', name: 'Batman' },
];
const heroes = arrayToDb(heroesArray);
console.log(heroes);
/* {
    luke: { id: 'luke', name: 'Luke Skywalker' },
    tony: { id: 'tony', name: 'Iron Man' },
    bruce: { id: 'bruce', name: 'Batman' },
}; */

```

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