mirror of
https://github.com/embarklabs/EmbarkJS.git
synced 2025-02-17 06:47:34 +00:00
add call backs
This commit is contained in:
parent
3264adf877
commit
7a6aa21596
@ -20,19 +20,19 @@ Names.setProvider = function (provider, options) {
|
||||
};
|
||||
|
||||
// resolve resolves a name into an identifier of some kind
|
||||
Names.resolve = function (name) {
|
||||
Names.resolve = function (name, callback) {
|
||||
if (!this.currentNameSystems) {
|
||||
throw new Error(this.noProviderError);
|
||||
}
|
||||
return this.currentNameSystems.resolve(name);
|
||||
return this.currentNameSystems.resolve(name, callback);
|
||||
};
|
||||
|
||||
// the reverse of resolve, resolves using an identifier to get to a name
|
||||
Names.lookup = function (identifier) {
|
||||
Names.lookup = function (identifier, callback) {
|
||||
if (!this.currentNameSystems) {
|
||||
throw new Error(this.noProviderError);
|
||||
}
|
||||
return this.currentNameSystems.lookup(identifier);
|
||||
return this.currentNameSystems.lookup(identifier, callback);
|
||||
};
|
||||
|
||||
Names.isAvailable = function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user