Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

insert-css

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

insert-css - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

8

index.js
var containers = []; // will store container HTMLElement references
var styleElements = []; // will store {prepend: HTMLElement, append: HTMLElement}
module.exports = function (css, options) {
function insertCss(css, options) {
options = options || {};

@@ -32,2 +32,5 @@

// strip potential UTF-8 BOM if css was read from a file
if (css.charCodeAt(0) === 0xFEFF) { css = css.substr(1, css.length); }
// actually add the stylesheet

@@ -48,1 +51,4 @@ if (styleElement.styleSheet) {

}
module.exports = insertCss;
module.exports.insertCss = insertCss;

11

package.json
{
"name": "insert-css",
"version": "1.0.0",
"version": "1.1.0",
"description": "insert a string of css into the <head>",

@@ -23,5 +23,5 @@ "main": "index.js",

},
"testling" : {
"files" : "test.js",
"browsers" : [
"testling": {
"files": "test.js",
"browsers": [
"ie/6..latest",

@@ -32,3 +32,4 @@ "chrome/20..latest",

"opera/11.0..latest",
"iphone/6", "ipad/6"
"iphone/6",
"ipad/6"
]

@@ -35,0 +36,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc