Skip to content

Commit

Permalink
feat(container): add unregister method
Browse files Browse the repository at this point in the history
Fixes #19
  • Loading branch information
EisenbergEffect committed Mar 19, 2015
1 parent a71d24b commit 2755688
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/container.js
Expand Up @@ -138,6 +138,16 @@ export class Container {
this.getOrCreateEntry(key).push(handler);
}

/**
* Unregisters based on key.
*
* @method unregister
* @param {Object} key The key that identifies the dependency at resolution time; usually a constructor function.
*/
unregister(key) {
this.entries.delete(key);
}

/**
* Resolves a single instance based on the provided key.
*
Expand Down

0 comments on commit 2755688

Please sign in to comment.