UNPKG

@nithin93/sri-js

Version:

A lightweight library to enforce Subresource Integrity (SRI) for dynamically loaded scripts in the browser and to update script tags in HTML using Cheerio.

11 lines (10 loc) 405 B
import { SRIOptions, SRIResult, SRIMap } from "./types"; export declare class SRIGenerator { private options; constructor(options: SRIOptions); generateHash(content: Buffer): string; generateForFile(filePath: string): Promise<SRIResult>; generateForFiles(filePaths: string[]): Promise<SRIMap>; generateForDirectory(extensions?: string[]): Promise<SRIMap>; private findFiles; }