Insert CSS styles into an HTML document
$ npm install --save insert-styles
var insertStyles = require('insert-styles')
insertStyles('h1 { font-size: 14px }')
//=> <head><style> h1 { ... }</style></head>
Required. The string of styles to insert into the DOM.
Calling insertStyles
with the same options.id
multiple times will re-use the same <style>
element each time.
MIT © Ben Drucker