UNPKG

util-array-object-or-both

Version:

Validate and normalise user choice: array, object or both?

13 lines (11 loc) 275 B
declare const version: string; interface Opts { msg: string; optsVarName: string; } declare const defaults: Opts; declare function arrObjOrBoth( str: string, opts?: Partial<Opts>, ): "array" | "object" | "any"; export { type Opts, arrObjOrBoth, defaults, version };