| bin/getRefId.js | ●●●●● patch | view | raw | blame | history |
bin/getRefId.js
New file @@ -0,0 +1,21 @@ const db = require("../lib/db") const yargs = require("yargs") ///////////////////////////////////////////////////////////////////////// const argv = yargs .usage("$0 <obj_id>", "get ref_id using <obj_id>",) .strict() .parse() console.log(`argv.obj_id=${argv.obj_id}`) run(argv) .then(console.log) .catch(console.error) .finally(process.exit) async function run({obj_id}) { return await db.getRefIdFromObjId(obj_id) }