Dynamic module optimist

Index

Functions

Functions

optimist(args: Array<string>): Optimist

Parameters

  • args: Array<string>

Returns

Optimist

Argv: Argv

public _: Array<string>

public constructor: Function

The initial value of Object.prototype.constructor is the standard built-in Object constructor.

public hasOwnProperty(v: string): boolean

Determines whether an object has a property with the specified name.

Parameters

  • v: string

    A property name.

Returns

boolean

public isPrototypeOf(v: Object): boolean

Determines whether an object exists in another object's prototype chain.

Parameters

  • v: Object

    Another object whose prototype chain is to be checked.

Returns

boolean

public propertyIsEnumerable(v: string): boolean

Determines whether a specified property is enumerable.

Parameters

  • v: string

    A property name.

Returns

boolean

public toLocaleString(): string

Returns a date converted to a string using the current locale.

Returns

string

public toString(): string

Returns a string representation of an object.

Returns

string

public valueOf(): Object

Returns the primitive value of the specified object.

Returns

Object

Optimist: Optimist

public argv: Argv

public alias(key: string, alias: string): Optimist

Parameters

  • key: string
  • alias: string

Returns

Optimist

public boolean(name: string): Optimist

Parameters

  • name: string

Returns

Optimist

public boolean(names: Array<string>): Optimist

Parameters

  • names: Array<string>

Returns

Optimist

public check(fn: Function)

Parameters

  • fn: Function

public default(name: string, value: any): Optimist

Parameters

  • name: string
  • value: any

Returns

Optimist

public default(args: Object): Optimist

Parameters

  • args: Object

Returns

Optimist

public demand(key: string): Optimist

Parameters

  • key: string

Returns

Optimist

public demand(key: number): Optimist

Parameters

  • key: number

Returns

Optimist

public demand(key: Array<string>): Optimist

Parameters

  • key: Array<string>

Returns

Optimist

public describe(key: string, desc: string): Optimist

Parameters

  • key: string
  • desc: string

Returns

Optimist

public help()

public options(key: string, opt: Object): Optimist

Parameters

  • key: string
  • opt: Object

Returns

Optimist

public parse(args: Array<string>): Optimist

Parameters

  • args: Array<string>

Returns

Optimist

public showHelp(fn: Function)

Parameters

  • fn: Function

public string(name: string): Optimist

Parameters

  • name: string

Returns

Optimist

public string(names: Array<string>): Optimist

Parameters

  • names: Array<string>

Returns

Optimist

public usage(message: string): Optimist

Parameters

  • message: string

Returns

Optimist

public wrap(columns: number): Optimist

Parameters

  • columns: number

Returns

Optimist