notes.dt.in.th

util.parseArgs is a new utility function that is used to parse command line arguments, available in newer versions of Node.js (v16.17+, v18.3+).

import { parseArgs } from 'util'
const { positionals } = parseArgs({ allowPositionals: true })