{"_id":"options-cache","_rev":"81862","name":"options-cache","description":"Simple API for managing options in JavaScript applications.","dist-tags":{"latest":"0.3.1"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:26:07.000Z","created":"2014-08-09T11:38:26.004Z","0.3.1":"2014-10-11T23:27:37.092Z","0.3.0":"2014-10-11T23:21:46.409Z","0.2.1":"2014-08-14T19:58:20.256Z","0.2.0":"2014-08-10T21:06:17.704Z","0.1.2":"2014-08-09T20:33:41.386Z","0.1.1":"2014-08-09T11:39:23.612Z","0.1.0":"2014-08-09T11:38:26.004Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/options-cache.git"},"versions":{"0.3.1":{"name":"options-cache","description":"Simple API for managing options in JavaScript applications.","version":"0.3.1","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":["cache","config","define","disable","disabled","enable","enabled","extend","get","javascript","node.js","obj","object","opt","option","options","opts","set"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"mocha":"*","should":"^4.0.4","verb":">= 0.2.6","verb-tag-jscomments":"^0.2.0"},"dependencies":{"kind-of":"^0.1.0"},"_id":"options-cache@0.3.1","_shasum":"bff4632cff603ff4377c86021e64aa690b625b44","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"bff4632cff603ff4377c86021e64aa690b625b44","size":4695,"noattachment":false,"key":"/options-cache/-/options-cache-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/options-cache/download/options-cache-0.3.1.tgz"},"directories":{},"publish_time":1413070057092,"_cnpm_publish_time":1413070057092,"_hasShrinkwrap":false},"0.3.0":{"name":"options-cache","description":"Simple API for managing options in JavaScript applications.","version":"0.3.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":["cache","config","define","disable","disabled","enable","enabled","extend","get","javascript","node.js","obj","object","opt","option","options","opts","set"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"mocha":"*","should":"^4.0.4","verb":">= 0.2.6","verb-tag-jscomments":"^0.2.0"},"dependencies":{"kind-of":"^0.1.0","object.omit":"^0.2.0"},"_id":"options-cache@0.3.0","_shasum":"fbee9d373aab07ece5fe5619cadc7f0f0c8fbd75","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"fbee9d373aab07ece5fe5619cadc7f0f0c8fbd75","size":4703,"noattachment":false,"key":"/options-cache/-/options-cache-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/options-cache/download/options-cache-0.3.0.tgz"},"directories":{},"publish_time":1413069706409,"_cnpm_publish_time":1413069706409,"_hasShrinkwrap":false},"0.2.1":{"name":"options-cache","description":"Get and set options easily, for node.js projects.","version":"0.2.1","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":{"mocha":"*","should":"^4.0.4","verb":">= 0.2.6"},"dependencies":{"lodash":"^2.4.1","verb-tag-jscomments":"^0.2.0"},"_id":"options-cache@0.2.1","_shasum":"c2199c590b71875a7a8611a9ac5ff7a57eedea89","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"c2199c590b71875a7a8611a9ac5ff7a57eedea89","size":4757,"noattachment":false,"key":"/options-cache/-/options-cache-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/options-cache/download/options-cache-0.2.1.tgz"},"directories":{},"publish_time":1408046300256,"_cnpm_publish_time":1408046300256,"_hasShrinkwrap":false},"0.2.0":{"name":"options-cache","description":"Get and set options easily, for node.js projects.","version":"0.2.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":{"mocha":"*","should":"^4.0.4","verb":">= 0.2.6"},"dependencies":{"lodash":"^2.4.1","verb-tag-jscomments":"^0.2.0"},"_id":"options-cache@0.2.0","_shasum":"60d7a43b797cb9829974ec94e7a1d6d8908c2fcb","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"60d7a43b797cb9829974ec94e7a1d6d8908c2fcb","size":4727,"noattachment":false,"key":"/options-cache/-/options-cache-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/options-cache/download/options-cache-0.2.0.tgz"},"directories":{},"publish_time":1407704777704,"_cnpm_publish_time":1407704777704,"_hasShrinkwrap":false},"0.1.2":{"name":"options-cache","description":"Get and set options easily, for node.js projects.","version":"0.1.2","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":{"mocha":"*","should":"^4.0.4","verb":">= 0.2.6"},"dependencies":{"lodash":"^2.4.1","verb-tag-jscomments":"^0.2.0"},"_id":"options-cache@0.1.2","_shasum":"63b87b96fad503775c36b07a2103baf096a7ec3d","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"63b87b96fad503775c36b07a2103baf096a7ec3d","size":4722,"noattachment":false,"key":"/options-cache/-/options-cache-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/options-cache/download/options-cache-0.1.2.tgz"},"directories":{},"publish_time":1407616421386,"_cnpm_publish_time":1407616421386,"_hasShrinkwrap":false},"0.1.1":{"name":"options-cache","description":"Get and set options. Easy to use options cache for node.js projects.","version":"0.1.1","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":"*"},"dependencies":{"lodash":"^2.4.1"},"_id":"options-cache@0.1.1","_shasum":"b6abfaad3b199fb26d378dde033f4620c96c0fdc","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"b6abfaad3b199fb26d378dde033f4620c96c0fdc","size":3331,"noattachment":false,"key":"/options-cache/-/options-cache-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/options-cache/download/options-cache-0.1.1.tgz"},"directories":{},"publish_time":1407584363612,"_cnpm_publish_time":1407584363612,"_hasShrinkwrap":false},"0.1.0":{"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":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"6397462af6d3774c610588e6c0e4cf1b3197050d","size":3319,"noattachment":false,"key":"/options-cache/-/options-cache-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/options-cache/download/options-cache-0.1.0.tgz"},"directories":{},"publish_time":1407584306004,"_cnpm_publish_time":1407584306004,"_hasShrinkwrap":false}},"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._","_attachments":{},"homepage":"https://github.com/jonschlinkert/options-cache","bugs":{"url":"https://github.com/jonschlinkert/options-cache/issues"}}