
Research
PyPI Package Impersonates SymPy to Deliver Cryptomining Malware
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.
options-cache
Advanced tools

Get and set options easily, for node.js projects.
npm i options-cache --save-dev
Initialize a new Options cache.
options {Object}: Initialize with default options.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
}
};
Set or get an option.
key {String}value {*}Options: to enable chainingapp.option('a', true)
app.option('a')
// => true
Assign value to key or return the value of key.
key {String}value {*}: The value to set.Options: to enable chainingapp.set('foo', true)
Return the stored value of key.
key {String}app.set('foo', true)
app.get('foo')
//=> true
Extend the options with the given object. This method is chainable.
Example
options
.extend({foo: 'bar'}, {baz: 'quux'});
.extend({fez: 'bang'});
Or define the property to extend:
options
.extend('a', {foo: 'bar'}, {baz: 'quux'})
.extend('b', {fez: 'bang'})
.extend('a.b.c', {fez: 'bang'});
Check if key is enabled (truthy).
key {String}app.enabled('foo')
// => false
app.enable('foo')
app.enabled('foo')
// => true
Check if key is disabled (falsey).
key {String}key is disabled.app.disabled('foo')
// => true
app.enable('foo')
app.disabled('foo')
// => false
Enable key.
key {String}Options: to enable chainingExample
app.enable('foo')
Disable key.
key {String}: The option to disable.Options: to enable chainingExample
app.disable('foo')
Remove key from the cache, or if no value is specified the entire options is reset.
Example:
options.clear();
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 10 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.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.

Security News
Node.js 25.4.0 makes require(esm) stable, formalizing CommonJS and ESM compatibility across supported Node versions.

Product
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.