Skip to content

Latest commit

 

History

History
107 lines (78 loc) · 1.86 KB

.verb.md

File metadata and controls

107 lines (78 loc) · 1.86 KB

{%= name %} {%= badge("fury") %} {%= badge("travis") %}

{%= description %}

Breaking changes in 5.0!

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: use Object.keys(config.cache)
  • omit: use .del()
  • exists: use config.cache.hasOwnProperty() or [has-value]
  • has: use config.cache.hasownProperty() or [has-value]
  • hasOwn: use config.cache.hasOwnProperty() or [has-value]

The following data methods were also removed, use [plasma-cache] if you need these methods:

  • data
  • process
  • plasma
  • extendData

Install

{%= include("install-npm", {save: true}) %}

Usage

var Config = require('{%= name %}');
var config = new Config();

API

{%= apidocs("index.js") %}

Usage Examples

.set

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

{%= 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}) %}

Contributing

{%= include("contributing") %}

Running tests

{%= include("tests") %}

Author

{%= include("author") %}

License

{%= copyright() %} {%= license() %}


{%= include("footer") %}

{%= reflinks('') %} {%= reflinks([ 'clone-deep', 'get-value', 'set-value', 'has-value', 'plasma-cache' ]) %}