Sub-resource integrity in Handlebars
npm install handlebars-helper-sriInstall
-------
``shell`
npm install --save handlebars-helper-sri
Usage
-----
Attach the helper to handlebars:`js
var handlebars = require("handlebars");
handlebars = require("handlebars-helper-sri").register(handlebars);
`
Then, call the helper from your Handlebars template:
`html`
Caching
-------
You may wish to attach a custom subresource instance, for pre-load caching:
`js
var handlebars = require("handlebars");
var subresource = require("subresource");
[
"../public/script.js",
"../public/style.css"
].forEach(subresource);
handlebars = require("handlebars-helper-sri").register(handlebars, subresource);
``