Skip to content

quarterpast/Hebrides

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

pluggable module APIs

Resources

Stars

Watchers

Forks

Packages

No packages published