An open API service indexing awesome lists of open source software.

https://github.com/lightsofapollo/getsetmixin

Express like get/set mixins
https://github.com/lightsofapollo/getsetmixin

Last synced: 5 months ago
JSON representation

Express like get/set mixins

Awesome Lists containing this project

README

          

getsetmixin
===========

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

## Usage

```js
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
```