cross-argv

Cross platform normalization of process.argv

MIT 2 个版本
安装
npm install cross-argv
yarn add cross-argv
pnpm add cross-argv
bun add cross-argv
README

cross-argv

Cross platform normalization of process.argv.

npm install cross-argv

Basically makes arguments with single quote strings work node app.js 'foo bar' everywhere, which otherwise can cause issues when used in cmd.exe.

Usage

const xargv = require('cross-argv')
console.log(xargs()) // returns a normalized process.argv

API

argv = xargv([argv])

Returns a normalized argv array that looks the same cross platform.

If no args are passed it normalizes process.argv. Otherwise you can pass your own array.

License

MIT

版本列表
2.0.0 2021-11-03
1.0.0 2018-07-05