hebrides

1.0.0 • Public • Published

Hebrides
npm version build status

Helper for creating pluggable module APIs

var use = require('hebrides');
var api = {
  foo() {
    return 'hello';
  },
  use
};
 
var api2 = api.use({
  bar(obj, a) {
    return obj.foo() + ' world' + a;
  }
});
 
typeof api.bar //⇒ "undefined"
api2.bar('!') //⇒ "hello world!"

Licence

MIT

Package Sidebar

Install

npm i hebrides

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • quarterto