Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

otps

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

otps - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

2

index.d.ts

@@ -14,3 +14,3 @@ declare type ID = string | number | symbol;

};
export declare const cmds: <TParams extends Config>(params: TParams, args: string[]) => (cmds: Cmds<TParams>, noMatch?: (() => void) | undefined) => void | Promise<void>;
export declare const cmds: <TParams extends Config>(params: TParams, args: string[]) => (cmds: Cmds<TParams>, noMatch?: ((params: TParams, args: string[]) => void) | undefined) => void | Promise<void>;
export declare const Value: ParamFn<string, []>;

@@ -17,0 +17,0 @@ export declare const Flag: ParamFn<true | number, []>;

@@ -14,3 +14,3 @@ "use strict";

}
noMatch === null || noMatch === void 0 ? void 0 : noMatch();
noMatch === null || noMatch === void 0 ? void 0 : noMatch(params, args);
};

@@ -17,0 +17,0 @@ exports.cmds = cmds;

{
"name": "otps",
"version": "0.3.0",
"version": "0.3.1",
"packageManager": "pnpm@8.6.2",

@@ -5,0 +5,0 @@ "type": "commonjs",

@@ -89,4 +89,6 @@ # otps

For easier managment of sub-commands, use `cmds`:
For easier managment of sub-commands, use `cmds`.
Create a `cmdsapp.js` file:
```js

@@ -96,3 +98,3 @@ import { parse, Value, cmds } from 'otps'

const [params, args] = parse(process.argv.slice(2), {
build: {
build: {
format: Value(),

@@ -111,4 +113,8 @@ production: {

const version = params.version
// ...
console.log(`production build: ${format}, name: app@${version}`)
console.log(args)
}
}, (params, args) => {
console.log(`development build: ${format}, name: app@dev`, args)
console.log(args)
})

@@ -119,2 +125,15 @@ }

Then run the program:
```sh
node cmdsapp.js build --format esm production --version 1.0 src/index.ts
# => production build: esm, name: app@1.0
# ['src/index.ts']
node cmdsapp.js build --format esm src/index.ts
# => production build: esm, name: app@dev
# ['src/index.ts']
```
## Parameters

@@ -121,0 +140,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc