Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

Commit

Permalink
Changed API registration to allow arbitrarily nested names.
Browse files Browse the repository at this point in the history
  • Loading branch information
skibblenybbles committed Sep 8, 2014
1 parent 0754e9b commit 6ee13a7
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ module.exports = function() {
//----------------------

// The api registry.
registry = {},

// Register an api.
register = function(name, api) {
return set(registry, name, api);
};
registry = {};

//------------------
// Public API
Expand All @@ -30,5 +25,7 @@ module.exports = function() {
return (
extend(
partial(get, registry),
{register: register}));
{
register: partial(set, registry)
}));
};

0 comments on commit 6ee13a7

Please sign in to comment.