## Usage ```js var toggle = require('{%= name %}'); var arr = [ {foo: true}, {foo: true}, {foo: true}, {foo: true}, {foo: true} ]; console.log(toggle(arr, 'foo', 2)); // [ { foo: true }, // { foo: false }, // { foo: true }, // { foo: true }, // { foo: true } ] console.log(toggle(arr, 'foo', 2)); // [ { foo: false }, // { foo: true }, // { foo: false }, // { foo: false }, // { foo: false } ] ``` ## .enable Enables the element at the given index, and disables all other items: ```js var toggle = require('{%= name %}'); var arr = [ {foo: true}, {foo: true}, {foo: true}, {foo: true}, {foo: true} ]; console.log(toggle.enable(arr, 'foo', 2)); // [ { foo: false }, // { foo: false }, // { foo: true }, // { foo: false }, // { foo: false } ] ``` ## .disable Disabled the element at the given index, and enables all other items: ```js var toggle = require('{%= name %}'); var arr = [ {foo: false}, {foo: false}, {foo: false}, {foo: false}, {foo: false} ]; console.log(toggle.disable(arr, 'foo', 2)); // [ { foo: true }, // { foo: true }, // { foo: false }, // { foo: true }, // { foo: true } ] ```