# array-to-hash

> Copy array values as hash keys

Latest version **1.0.1** (published 2016-11-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install array-to-hash
pnpm add array-to-hash
yarn add array-to-hash
bun add array-to-hash
```

## 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.0.1 |
| Published | 2016-11-30 |
| First published | 2015-09-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ben Drucker |
| Maintainers | bendrucker |
| Keywords | array, hash |

## Links

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

## Dependencies (2)

- [assert-ok](https://npm.io/package/assert-ok.md) ~1.0.0
- [assert-array](https://npm.io/package/assert-array.md) ~1.0.0

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-11-30
- 1.0.0 — 2015-09-06

## README

# array-to-hash [![Build Status](https://travis-ci.org/bendrucker/array-to-hash.svg?branch=master)](https://travis-ci.org/bendrucker/array-to-hash)

> Copy array values as hash keys


## Install

```
$ npm install --save array-to-hash
```


## Usage

```js
var arrayToHash = require('array-to-hash')

arrayToHash(['foo', 'bar'])
//=> {foo: undefined, bar: undefined}
```

## API

#### `arrayToHash(array)` -> `object`

Returns an object. The object has no prototype, so inherited object methods like `hasOwnProperty` will be unavailable.

##### array

*Required*  
Type: `array[strings]`

An array of strings to use as hash keys.


## License

MIT © [Ben Drucker](http://bendrucker.me)

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