diff --git a/firegun.js b/firegun.js index c235650..549ea51 100644 --- a/firegun.js +++ b/firegun.js @@ -66,6 +66,17 @@ export default class Firegun { }); } + /** + * + * @param {string} path + * @param {number} wait + * @param {string} prefix + * @returns {Promise<*>} + */ + async get(path, wait = 1000, prefix = this.prefix) { + return this.Get(path, wait, prefix); + } + /** * * @param {string} path @@ -86,6 +97,16 @@ export default class Firegun { } g.put(data); } + + /** + * + * @param {string} path + * @param {*} data + * @param {string} prefix + */ + async put(path, data, prefix = this.prefix) { + return this.Put(path, data, prefix); + } /** * @@ -107,5 +128,15 @@ export default class Firegun { fn(s); }); } + + /** + * + * @param {string} path + * @param {string} prefix + * @param {(s:*)=>void} fn + */ + async on(path, prefix = this.prefix, fn) { + return this.On(path, prefix, fn); + } }