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

html-to-text

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-to-text - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

8

example/html-to-text.js

@@ -5,2 +5,10 @@ var path = require('path');

console.log('fromString:')
var text = htmlToText.fromString('<h1>Hello World</h1>', {
wordwrap: 130
});
console.log(text);
console.log();
console.log('fromFile:');
htmlToText.fromFile(path.join(__dirname, 'test.html'), {

@@ -7,0 +15,0 @@ tables: ['invoice', 'address']

8

lib/html-to-text.js

@@ -34,3 +34,3 @@ var fs = require('fs');

walk(dom);
return result;
return result || dom;
}

@@ -213,7 +213,3 @@

exports.fromString = function(str, options) {
if (!callback) {
callback = options;
options = {};
}
return htmlToText(str, options);
return htmlToText(str, options || {});
};
{
"name": "html-to-text",
"version": "0.0.2",
"version": "0.0.3",
"description": "Simple html to text converter",

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

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