getsetmixin

1.0.0 • Public • Published

getsetmixin

Simple map like mixin for objects. This was designed to emulate the behaviour of express configuration methods (.get, .set).

Usage

var object = { xxx: true };

require('getsetmixin')(object);

// no conflicts
object.get('xxx'); // => undefined

// chainable
object.set('xxx', 1).
       set('yyy', 2);

object.get('xxx'); // => 1
object.get('yyy'); // => 2

Readme

Keywords

none

Package Sidebar

Install

npm i getsetmixin

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • lights-of-apollo