
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
options-cache
Advanced tools

Get and set options. Easy to use options cache for node.js projects.
npm i options-cache --save-dev
Initialize a new Options cache.
Example:
In your application:
var util = require('util');
var Options = require('options-cache');
function App(options) {
Options.call(this, options);
}
util.inherits(App, Options);
App.prototype.foo = function(value) {
this.enable(value);
};
App.prototype.bar = function(value) {
if (this.enabled(value)) {
// do something
}
};
options: {Object}Set or get an option.
app.option('a', true)
app.option('a')
// => true
key: {String}
value: {*}
Assign value to key or return the value of key.
app.set('foo', true)
key: {String}
value: {*} The value to set.
Return the stored value of key.
app.set('foo', true)
app.get('foo')
//=> true
key: {String}Check if key is enabled (truthy).
app.enabled('foo')
// => false
app.enable('foo')
app.enabled('foo')
// => true
key: {String}Check if key is disabled (falsey).
app.disabled('foo')
// => true
app.enable('foo')
app.disabled('foo')
// => false
key: {String}Enable key.
Example
app.enable('foo')
key: {String}Disable key.
Example
app.disable('foo')
key: {String} The option to disable.Jon Schlinkert
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
This file was generated by verb-cli on August 09, 2014.
FAQs
Simple API for managing options in JavaScript applications.
The npm package options-cache receives a total of 13 weekly downloads. As such, options-cache popularity was classified as not popular.
We found that options-cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.