
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
`argcom` is a straightforward CLI argument parser with no added complexity or opinions.
argcom
is a straightforward CLI argument parser with no added complexity or opinions.
To install the package, use npm:
pnpm add argcom
yarn install argcom
npm install argcom
argcom()
accepts one or two arguments:
{ permissive: false, argv: process.argv.slice(2), stopAtPositional: false }
.It returns an object containing the command-line values. Any parameters not used by options are placed in the result._
array, which is always returned (even if empty). argcom()
does not validate or enforce requirements—this is up to the application.
// index.ts
import { argcom } from 'argcom';
const args = arg({
// Types
'--help': Boolean,
'--version': Boolean,
'--verbose': arg.COUNT, // Counts the number of times --verbose is passed
'--port': Number, // --port <number> or --port=<number>
'--host': String, // --host <string> or --host=<string>
'--tag': [String], // --tag <string> or --tag=<string>
// Aliases
'-v': '--verbose',
'-h': '--host', // -h <string>; result is stored in --host
'--domain': '--host' // --domain <string> or --domain=<string>;
// result is stored in --host
});
console.log(args);
/*
{
_: ["foo", "bar", "--foobar"],
'--port': 3000,
'--verbose': 4,
'--host': "localhost",
'--tag': ["tag1", "tag2"]
}
*/
Bundle your TypeScript library with no config, powered by esbuild.
# pnpm
$ pnpm install
# yarn
$ yarn install
# npm
$ npm install
src
src/index.ts
src
.
Once the command works properly, you will see dist
folder.# pnpm
$ pnpm run build
# yarn
$ yarn run build
# npm
$ npm run build
$ npm publish
FAQs
`argcom` is a straightforward CLI argument parser with no added complexity or opinions.
The npm package argcom receives a total of 0 weekly downloads. As such, argcom popularity was classified as not popular.
We found that argcom demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.