{"_id":"toggle-array","_rev":"5-8b5122e9c7e9cb2ab66629b42ef594ec","name":"toggle-array","description":"In an array of objects, this enables a property on the object at the specified index, while disabling the property on all other objects.","dist-tags":{"latest":"1.0.1"},"versions":{"0.1.0":{"name":"toggle-array","description":"In an array of objects, this enables a property on the object at the specified index, while disabling the property on all other objects.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/toggle-array","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/toggle-array.git"},"bugs":{"url":"https://github.com/jonschlinkert/toggle-array/issues"},"license":"Released under the MIT license.","files":["index.js","LICENSE"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"keywords":["array","toggle"],"devDependencies":{"gulp-format-md":"^0.1.10","mocha":"^3.0.2"},"dependencies":{"isobject":"^2.1.0"},"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"lint":{"reflinks":true},"related":{"list":[]},"reflinks":["verb","verb-generate-readme"]},"gitHead":"4e64860ce3b6cd0d4e2e84c965d98512c8dabebb","_id":"toggle-array@0.1.0","_shasum":"305c046b1b7b1b8d1d0398d0beb4fe9a19f134fb","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"305c046b1b7b1b8d1d0398d0beb4fe9a19f134fb","tarball":"https://registry.npmjs.org/toggle-array/-/toggle-array-0.1.0.tgz","integrity":"sha512-wLQWgKl287HqUuDrv8hiyP8HjT3YOrSrugM9tLQBb+KmQ/O12ckAosarvPVmh3GO51PfzFn37blG7zkl35ABHQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhEV01mRXuegRASBmiByKNwBVCqNkd6TF415fjqV7lCQIgFDm/5hejzVn1cOcijlWzpMNXckOT9tUWcfAL1+SLfmU="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/toggle-array-0.1.0.tgz_1472515763681_0.9451782100368291"}},"1.0.0":{"name":"toggle-array","description":"In an array of objects, this enables a property on the object at the specified index, while disabling the property on all other objects.","version":"1.0.0","homepage":"https://github.com/jonschlinkert/toggle-array","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/toggle-array.git"},"bugs":{"url":"https://github.com/jonschlinkert/toggle-array/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"isobject":"^3.0.0"},"devDependencies":{"gulp-format-md":"^0.1.12","mocha":"^3.3.0"},"keywords":["array","toggle"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["prompt-choices","arr-flatten","array-unique"]},"lint":{"reflinks":true}},"gitHead":"be9f732037c320057a39b3587722ef7f4b24a6f1","_id":"toggle-array@1.0.0","_shasum":"9ab040efbff341e23742d96c1adff12cc5270fd2","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"9ab040efbff341e23742d96c1adff12cc5270fd2","tarball":"https://registry.npmjs.org/toggle-array/-/toggle-array-1.0.0.tgz","integrity":"sha512-InXg3wcvYreP/iTkD40cbwMPckFXd2VAim8S3ZXl/RudehlKJQ6H0R0ZlFzvM50XZyVo5oeFHnOm+nJRIq1ATA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDRK6BqUC5iWjHqvPTpxuYWWfRrefDS6RXmJOqspBm1NAiEAove5ujtm83Koeb9tTruKBvNF9tkfXOfGiRmzW9G/ZGg="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/toggle-array-1.0.0.tgz_1494186618385_0.2927160856779665"}},"1.0.1":{"name":"toggle-array","description":"In an array of objects, this enables a property on the object at the specified index, while disabling the property on all other objects.","version":"1.0.1","homepage":"https://github.com/jonschlinkert/toggle-array","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/toggle-array.git"},"bugs":{"url":"https://github.com/jonschlinkert/toggle-array/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"isobject":"^3.0.0"},"devDependencies":{"gulp-format-md":"^0.1.12","mocha":"^3.3.0"},"keywords":["array","toggle"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["prompt-choices","arr-flatten","array-unique"]},"lint":{"reflinks":true}},"gitHead":"d8b2ebbd7bc1dd7f885c33f05573e2b60fc5cc5c","_id":"toggle-array@1.0.1","_shasum":"cbf5840792bd5097f33117ae824c932affe87d58","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"cbf5840792bd5097f33117ae824c932affe87d58","tarball":"https://registry.npmjs.org/toggle-array/-/toggle-array-1.0.1.tgz","integrity":"sha512-TZXgboKpD5Iu0Goi8hRXuJpE06Pbo+bies4I4jnTBhlRRgyen9c37nMylnquK/ZPKXXOeh1mJ14p9QdKp+9v7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPGY+D2f4gOJG1iMlfc9CRWq2Kzvlas/QIFZt9PfGf/QIgGjPdM2kqymQydPeC/+ZLr+EDXQg8sWfC9B8OVzv+h7g="}]},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/toggle-array-1.0.1.tgz_1494186770035_0.1892693880945444"}}},"readme":"# toggle-array [![NPM version](https://img.shields.io/npm/v/toggle-array.svg?style=flat)](https://www.npmjs.com/package/toggle-array) [![NPM monthly downloads](https://img.shields.io/npm/dm/toggle-array.svg?style=flat)](https://npmjs.org/package/toggle-array) [![NPM total downloads](https://img.shields.io/npm/dt/toggle-array.svg?style=flat)](https://npmjs.org/package/toggle-array) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/toggle-array.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/toggle-array)\n\n> In an array of objects, this enables a property on the object at the specified index, while disabling the property on all other objects.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save toggle-array\n```\n\n## Usage\n\n```js\nvar toggle = require('toggle-array');\nvar arr = [\n  {foo: true},\n  {foo: true},\n  {foo: true},\n  {foo: true},\n  {foo: true}\n];\n\nconsole.log(toggle(arr, 'foo', 2));\n// [ { foo: true },\n//   { foo: false },\n//   { foo: true },\n//   { foo: true },\n//   { foo: true } ]\n\nconsole.log(toggle(arr, 'foo', 2));\n// [ { foo: false },\n//   { foo: true },\n//   { foo: false },\n//   { foo: false },\n//   { foo: false } ]\n```\n\n## .enable\n\nEnables the element at the given index, and disables all other items:\n\n```js\nvar toggle = require('toggle-array');\nvar arr = [\n  {foo: true},\n  {foo: true},\n  {foo: true},\n  {foo: true},\n  {foo: true}\n];\n\nconsole.log(toggle.enable(arr, 'foo', 2));\n// [ { foo: false },\n//   { foo: false },\n//   { foo: true },\n//   { foo: false },\n//   { foo: false } ]\n```\n\n## .disable\n\nDisabled the element at the given index, and enables all other items:\n\n```js\nvar toggle = require('toggle-array');\nvar arr = [\n  {foo: false},\n  {foo: false},\n  {foo: false},\n  {foo: false},\n  {foo: false}\n];\n\nconsole.log(toggle.disable(arr, 'foo', 2));\n// [ { foo: true },\n//   { foo: true },\n//   { foo: false },\n//   { foo: true },\n//   { foo: true } ]\n```\n\n## About\n\n### Related projects\n\n* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. | [homepage](https://github.com/jonschlinkert/arr-flatten \"Recursively flatten an array or arrays.\")\n* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique \"Remove duplicate values from an array. Fastest ES5 implementation.\")\n* [prompt-choices](https://www.npmjs.com/package/prompt-choices): Create an array of multiple choice objects for use in prompts. | [homepage](https://github.com/enquirer/prompt-choices \"Create an array of multiple choice objects for use in prompts.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 07, 2017._","maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2022-06-27T07:31:28.805Z","created":"2016-08-30T00:09:24.994Z","0.1.0":"2016-08-30T00:09:24.994Z","1.0.0":"2017-05-07T19:50:20.269Z","1.0.1":"2017-05-07T19:52:51.240Z"},"homepage":"https://github.com/jonschlinkert/toggle-array","keywords":["array","toggle"],"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/toggle-array.git"},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"bugs":{"url":"https://github.com/jonschlinkert/toggle-array/issues"},"license":"MIT","readmeFilename":"README.md"}