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

inline-css

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inline-css - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

21

index.js
'use strict';
var Promise = require('bluebird'),
extend = require('extend'),
inlineContent = require('./lib/inlineContent');
function extend(obj, src) {
var key,
own = {}.hasOwnProperty;
for (key in src) {
if (own.call(src, key)) {
obj[key] = src[key];
}
}
return obj;
}
module.exports = function (html, options) {

@@ -29,3 +18,9 @@ return new Promise(function (resolve, reject) {

applyWidthAttributes: false,
applyTableAttributes: false
applyTableAttributes: false,
xmlMode: false,
decodeEntities: false,
lowerCaseTags: true,
lowerCaseAttributeNames: false,
recognizeCDATA: false,
recognizeSelfClosing: false
}, options);

@@ -32,0 +27,0 @@

@@ -11,3 +11,4 @@ 'use strict';

removeClassId = require('./removeClassId'),
setTableAttrs = require('./setTableAttrs');
setTableAttrs = require('./setTableAttrs'),
pick = require('object.pick');

@@ -18,5 +19,10 @@ module.exports = function (html, css, options) {

editedElements = [],
$ = cheerio.load(html, {
decodeEntities: false
});
$ = cheerio.load(html, pick(opts, [
'xmlMode',
'decodeEntities',
'lowerCaseTags',
'lowerCaseAttributeNames',
'recognizeCDATA',
'recognizeSelfClosing'
]));

@@ -23,0 +29,0 @@ rules.forEach(function (rule) {

{
"name": "inline-css",
"version": "2.1.1",
"version": "2.2.0",
"description": "Inline css into an html file.",

@@ -14,4 +14,6 @@ "main": "index.js",

"css-rules": "^1.0.0",
"extend": "^3.0.0",
"extract-css": "^1.0.0",
"flatten": "0.0.1",
"object.pick": "^1.1.1",
"style-selector": "^1.0.0"

@@ -18,0 +20,0 @@ },

@@ -159,2 +159,6 @@ # inline-css [![npm](http://img.shields.io/npm/v/inline-css.svg?style=flat)](https://badge.fury.io/js/inline-css) [![Build Status](https://travis-ci.org/jonkemp/inline-css.svg?branch=master)](https://travis-ci.org/jonkemp/inline-css) [![Coverage Status](https://coveralls.io/repos/jonkemp/inline-css/badge.svg?branch=master&service=github)](https://coveralls.io/github/jonkemp/inline-css?branch=master)

### cheerio options
Options to passed to [cheerio](https://github.com/cheeriojs/cheerio).
## Contributing

@@ -161,0 +165,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