nodejsscript • Docs
nodejsscript / $ / error
error(
message
):Error
Throws user targeted error
const number= await $.read({ "-p". "Insert a number:" });
if(Number.isNaN(Number(number))) $.error(`Provided text '${number}' is not a number`);
• message: string
Error