@verdaccio/readme
Advanced tools
Comparing version 10.4.1 to 10.4.2
@@ -7,18 +7,11 @@ "use strict"; | ||
exports.default = parseReadme; | ||
var _dompurify = _interopRequireDefault(require("dompurify")); | ||
var _jsdom = require("jsdom"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
const DOMPurify = (0, _dompurify.default)(new _jsdom.JSDOM('').window); | ||
const { | ||
marked | ||
} = require('marked'); | ||
function parseReadme(readme, options = {}) { | ||
let result; | ||
if (readme) { | ||
@@ -28,3 +21,2 @@ result = DOMPurify.sanitize(marked(readme, { | ||
}).trim()); | ||
if ('string' === typeof options.pathname) { | ||
@@ -34,5 +26,4 @@ result = result.replace(/href="#/gi, `href="${options.pathname}#`); | ||
} | ||
return result; | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@verdaccio/readme", | ||
"version": "10.4.1", | ||
"version": "10.4.2", | ||
"description": "Readme markdown parser", | ||
@@ -33,8 +33,8 @@ "keywords": [ | ||
"dependencies": { | ||
"dompurify": "2.3.9", | ||
"dompurify": "2.4.0", | ||
"jsdom": "16.7.0", | ||
"marked": "4.0.18" | ||
"marked": "4.2.2" | ||
}, | ||
"devDependencies": { | ||
"@verdaccio/types": "10.5.1" | ||
"@verdaccio/types": "10.7.0" | ||
}, | ||
@@ -41,0 +41,0 @@ "funding": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7152
+ Addeddompurify@2.4.0(transitive)
+ Addedmarked@4.2.2(transitive)
- Removeddompurify@2.3.9(transitive)
- Removedmarked@4.0.18(transitive)
Updateddompurify@2.4.0
Updatedmarked@4.2.2