New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

array-to-hash

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-to-hash

Copy array values as hash keys

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

array-to-hash Build Status

Copy array values as hash keys

Install

$ npm install --save array-to-hash

Usage

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

Keywords

array

FAQs

Package last updated on 30 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts