require('module-alias/register') const { hashPassword } = require('@libs/tools') let args = process.argv let pass = args[2] || '' if (typeof pass !== 'string' || pass.trim().length === 0) { console.log('command: node hashPass ') process.exit(1) } hashPassword(pass).then(r => { console.log(`Password: ${r}`) }).catch(err => { console.log(err) })