- Complete React app with 7 developer tools - JSON Tool with visual structured editor - Serialize Tool with visual structured editor - URL, Base64, CSV/JSON, Beautifier, Diff tools - Responsive navigation with dropdown menu - Dark/light mode toggle - Mobile-responsive design with sticky header - All tools working with copy/paste functionality
27 lines
540 B
JavaScript
27 lines
540 B
JavaScript
'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
|