UNPKG

@promptbook/utils

Version:

Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action

13 lines (12 loc) • 601 B
/** * Extracts an npm package version from raw command output. * * Both npm and CLI commands may emit unrelated warnings before the version. CLI commands use the first matching token; * npm registry commands can opt into the last matching token because npm warnings commonly precede their output. * * @returns The parsed version or `null` when the output contains no version * @private internal utility of `promptbookCli` */ export declare function extractNpmPackageVersionFromOutput(output: string, { isLastMatchPreferred }?: { readonly isLastMatchPreferred?: boolean; }): string | null;