{"name":"options-cache","description":"Get and set options. Easy to use options cache for node.js projects.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/options-cache","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/options-cache.git"},"bugs":{"url":"https://github.com/jonschlinkert/options-cache/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/options-cache/blob/master/LICENSE-MIT"}],"keywords":["node.js","javascript","obj","object","opt","opts","cache","options","option","config","set","get","extend"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"verb-tag-jscomments":">= 0.1.4","verb":">= 0.2.6","mocha":"*"},"_id":"options-cache@0.1.0","_shasum":"6397462af6d3774c610588e6c0e4cf1b3197050d","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"6397462af6d3774c610588e6c0e4cf1b3197050d","tarball":"http://registry-npm.ywwl.com/options-cache/download/options-cache-0.1.0.tgz","integrity":"sha512-5AKnA8E/9DQDt80AfRpgWUYhSzFyPkOWSbmiwdbwacxvlTFPdI2DbRpLRiE4pZA4bMxUsv0Bg4ZED72PyhX/tQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1GSpZmXuHahh8POMMj362eSP5VvX9Q33aT3IRXak5eQIhAKalL29t0J9KEQfSnQ5q/QiwaO1EtTUBJ4J8B2oxS7x4"}],"size":3319,"noattachment":false,"key":"/options-cache/-/options-cache-0.1.0.tgz"},"directories":{},"readme":"# options-cache [![NPM version](https://badge.fury.io/js/options-cache.svg)](http://badge.fury.io/js/options-cache)\n\n> Simple API for managing options in JavaScript applications.\n\n## Install\n#### Install with [npm](npmjs.org)\n\n```bash\nnpm i options-cache --save\n```\n\n## API\n### [Options](index.js#L42)\n\nCreate a new instance of `Options`.\n\n* `options` **{Object}**: Initialize with default options.    \n\n**Example:**\n\n```js\nvar util = require('util');\nvar Options = require('options-cache');\n\nfunction App(options) {\n  Options.call(this, options);\n}\nutil.inherits(App, Options);\n\nApp.prototype.a = function(value) {\n  this.enable(value);\n};\n\nApp.prototype.b = function(value) {\n  if (this.enabled(value)) {\n    // do something\n  }\n};\n```\n\n### [.option](index.js#L62)\n\nSet or get an option.\n\n* `key` **{String}**: The option name.    \n* `value` **{*}**: The value to set.    \n* `returns` **{*}**: Returns a `value` when only `key` is defined.  \n\n```js\napp.option('a', true);\napp.option('a');\n//=> true\n```\n\n### [.enabled](index.js#L96)\n\nCheck if `key` is enabled (truthy).\n\n* `key` **{String}**    \n* `returns`: {Boolean}  \n\n```js\napp.enabled('a');\n//=> false\n\napp.enable('a');\napp.enabled('a');\n//=> true\n```\n\n### [.disabled](index.js#L118)\n\nCheck if `key` is disabled (falsey).\n\n* `key` **{String}**    \n* `returns` **{Boolean}**: Returns true if `key` is disabled.  \n\n```js\napp.disabled('a');\n//=> true\n\napp.enable('a');\napp.disabled('a');\n//=> false\n```\n\n### [.enable](index.js#L137)\n\nEnable `key`.\n\n* `key` **{String}**    \n* `returns` **{Object}** `Options`: to enable chaining  \n\n**Example**\n\n```js\napp.enable('a');\n```\n\n### [.disable](index.js#L156)\n\nDisable `key`.\n\n* `key` **{String}**: The option to disable.    \n* `returns` **{Object}** `Options`: to enable chaining  \n\n**Example**\n\n```js\napp.disable('a');\n```\n\n## Author\n\n**Jon Schlinkert**\n \n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) \n\n## License\nCopyright (c) 2014 Jon Schlinkert, contributors.  \nReleased under the MIT license\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 11, 2014._","publish_time":1407584306004,"_cnpm_publish_time":1407584306004,"dist-tags":{"latest":"0.3.1"}}