0.0.1 • Published 10 years ago

plugs v0.0.1

Weekly downloads
1
License
-
Repository
-
Last release
10 years ago

plugs

a generic plugin system

Installation

npm install plugs

Example

var plugs = require('plugs');

var obj = plugs({});

obj.use({ foo: 'bar' });
obj.use(function(){
  this.baz = 'zoo';
});

console.log(obj); // => { foo: 'bar', baz: 'zoo' }

Usage

plugs(object)

Attach .use() method to object.

.use(plugin)

Use plugin. When a function, it is called with fn.call(object, object). When an object, its properties are copied over.

License

MIT