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

https://github.com/distributedlife/plug-n-play

A plugin system based around the concept of roles.
https://github.com/distributedlife/plug-n-play

Last synced: 11 months ago
JSON representation

A plugin system based around the concept of roles.

Awesome Lists containing this project

README

          

# plug-n-play

# usage
```javascript
var plugins = require('plug-n-play').configure(['Set']);
plugins.load(require('/path/to/set/plugin'));
plugins.load({
type: 'MySweetPlugin'
deps: ['Set']
func: function(set) {
return {
count: function () {
return set().length;
}
}
};
});

var define = plugins.get('DefinePlugin');
define('Set', function() {
return 4;
});

var mySweetPlugin = plugins.get('MySweetPlugin');
mySweetPlugin.count();
```