@nodesecure/mama
Version:
21 lines • 804 B
TypeScript
import type { PackumentVersion, PackageJSON, PackageJSONLicense, WorkspacesPackageJSON } from "@nodesecure/npm-types";
export interface PackageJSONIntegrityHashOptions {
/**
* Indicates whether the document originates from the NPM registry.
*
* @default false
*/
isFromRemoteRegistry?: boolean;
}
export interface PackageJSONIntegrityObject {
name: string;
version: string;
dependencies: Record<string, string>;
license: string | PackageJSONLicense;
scripts: Record<string, string>;
}
export declare function packageJSONIntegrityHash(document: PackumentVersion | PackageJSON | WorkspacesPackageJSON, options?: PackageJSONIntegrityHashOptions): {
integrity: string;
object: PackageJSONIntegrityObject;
};
//# sourceMappingURL=integrity-hash.d.ts.map