@salesforce/plugin-trust
Version:
validate a digital signature for a npm package
15 lines (14 loc) • 511 B
TypeScript
export type NpmName = {
tag: string;
scope?: string;
name: string;
};
/**
* Parse an NPM package name into {scope, name, tag}. The tag is 'latest' by default and can be any semver string.
*
* @param {string} npmName - The npm name to parse.
* @return {NpmName} - An object with the parsed components.
*/
export declare const parseNpmName: (npmName: string) => NpmName;
/** Produces a formatted string version of the object */
export declare const npmNameToString: (npmName: NpmName) => string;