📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 21:30:27
📂
/ (Root)
/
opt
/
alt
/
alt-nodejs22
/
root
/
usr
/
lib
/
node_modules
/
npm
/
node_modules.bundled
/
@pkgjs
/
parseargs
/
examples
📍 /opt/alt/alt-nodejs22/root/usr/lib/node_modules/npm/node_modules.bundled/@pkgjs/parseargs/examples
🔄 Refresh
✏️
Editing: simple-hard-coded.js
Read Only
'use strict'; // This example is used in the documentation. // 1. const { parseArgs } = require('node:util'); // from node // 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package const { parseArgs } = require('..'); // in repo const args = ['-f', '--bar', 'b']; const options = { foo: { type: 'boolean', short: 'f' }, bar: { type: 'string' } }; const { values, positionals } = parseArgs({ args, options }); console.log(values, positionals); // Try the following: // node simple-hard-coded.js
💾 Save Changes
❌ Cancel