{%= description %}
Major breaking changes were made in 5.0!
In an effort to simplify the library, the following methods were removed:
clone
: use [clone-deep], example:var obj = cloneDeep(config.cache)
keys
: useObject.keys(config.cache)
omit
: use.del()
exists
: useconfig.cache.hasOwnProperty()
or [has-value]has
: useconfig.cache.hasownProperty()
or [has-value]hasOwn
: useconfig.cache.hasOwnProperty()
or [has-value]
The following data methods were also removed, use [plasma-cache] if you need these methods:
data
process
plasma
extendData
{%= include("install-npm", {save: true}) %}
var Config = require('{%= name %}');
var config = new Config();
{%= apidocs("index.js") %}
If expand: true
is defined on the options, the value will be set using [expander].
Examples:
// as a key-value pair
config.set('a', {b: 'c'});
// or as an object
config.set({a: {b: 'c'}});
// chaining is possible
cache
.set({a: {b: 'c'}})
.set('d', 'e');
Expand template strings with expander:
config.set('a', {b: '${c}', c: 'd'}, true);
Visit the [expander] docs for more info.
{%= related([ 'config-cache', 'option-cache', 'map-cache', 'cache-base', 'engine-cache', 'loader-cache', 'parser-cache', 'plasma-cache', 'helper-cache', 'get-value', 'set-value', 'has-value' ], {remove: name}) %}
{%= include("contributing") %}
{%= include("tests") %}
{%= include("author") %}
{%= copyright() %} {%= license() %}
{%= include("footer") %}
{%= reflinks('') %} {%= reflinks([ 'clone-deep', 'get-value', 'set-value', 'has-value', 'plasma-cache' ]) %}