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.

10 lines (9 loc) 367 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const enforceScriptIntegrity_1 = require("./enforceScriptIntegrity"); // Initialize if configuration is available if (typeof window !== "undefined") { if (window.SRI?.config) { (0, enforceScriptIntegrity_1.enforceScriptIntegrity)(window.SRI.config, window.SRI?.prefix); } }