Time slots app prototype
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
483 B

const { promise, callback } = require("../api/async.js");
const sync = require("../api/sync");
function APIBuilder(path, options) {
this.dir = path;
this.options = options;
}
APIBuilder.prototype.withPromise = function() {
return promise(this.dir, this.options);
};
APIBuilder.prototype.withCallback = function(cb) {
callback(this.dir, this.options, cb);
};
APIBuilder.prototype.sync = function() {
return sync(this.dir, this.options);
};
module.exports = APIBuilder;