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
- Host: GitHub
- URL: https://github.com/lightsofapollo/getsetmixin
- Owner: lightsofapollo
- Created: 2013-12-02T20:58:39.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-12-02T21:35:51.000Z (over 12 years ago)
- Last Synced: 2025-01-27T18:10:15.532Z (over 1 year ago)
- Size: 102 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```