# toggle-array [![NPM version](https://img.shields.io/npm/v/toggle-array.svg?style=flat)](https://www.npmjs.com/package/toggle-array) [![NPM downloads](https://img.shields.io/npm/dm/toggle-array.svg?style=flat)](https://npmjs.org/package/toggle-array) [![Build Status](https://img.shields.io/travis/jonschlinkert/toggle-array.svg?style=flat)](https://travis-ci.org/jonschlinkert/toggle-array)

> In an array of objects, this enables a property on the object at the specified index, while disabling the property on all other objects.

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install --save toggle-array
```

## Usage

```js
var toggleArray = require('toggle-array');
var arr = [
  {},
  {},
  {},
  {},
  {}
];

console.log(toggleArray(arr, 'foo', 2));
// [ { foo: false },
//   { foo: false },
//   { foo: true },
//   { foo: false },
//   { foo: false } ]
```

## About

### Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).

### Building docs

_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_

To generate the readme and API documentation with [verb](https://github.com/verbose/verb):

```sh
$ npm install -g verb verb-generate-readme && verb
```

### Running tests

Install dev dependencies:

```sh
$ npm install -d && npm test
```

### Author

**Jon Schlinkert**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

### License

Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](https://github.com/jonschlinkert/toggle-array/blob/master/LICENSE).

***

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on August 29, 2016._