Socket
Socket
Sign inDemoInstall

gulp-html2txt

Package Overview
Dependencies
77
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.2.0

test.js

12

index.js
'use strict';
var map = require('map-stream');
var es = require('event-stream');;
var es = require('event-stream');
var gutil = require('gulp-util');
var html2txt = require('html-to-text');
module.exports = function(wrap) {
wrap = wrap || 130
module.exports = function(options) {
options = options || {}
return es.map(function (file, cb) {
file.contents = new Buffer( html2txt.fromString( file.contents.toString(), {
wordwrap: wrap
}) );
file.contents = new Buffer( html2txt.fromString( file.contents.toString(), options) );
file.path = gutil.replaceExtension(file.path, '.txt');

@@ -14,0 +12,0 @@ cb(null,file);

{
"name": "gulp-html2txt",
"version": "1.1.0",
"version": "1.2.0",
"description": "gulp plugin to convert html to text",

@@ -27,9 +27,8 @@ "main": "index.js",

"gulp-util": "*",
"event-stream": "*",
"html-to-text": "*",
"map-stream": "*"
"event-stream": "^3.3.2",
"html-to-text": "*"
},
"devDependencies": {
"mocha": "*"
"mocha": "^2.3.4"
}
}

@@ -1,2 +0,2 @@

# gulp-html2txt [![NPM version][npm-image]][npm-url] [![Build status][travis-image]][travis-url]
# gulp-html2txt [![NPM version][npm-image]][npm-url] [![Build Status](https://travis-ci.org/hemanth/gulp-html2txt.svg?branch=master)](https://travis-ci.org/hemanth/gulp-html2txt)
> Converts HTML to txt using [html-to-text](https://npmjs.org/package/html-to-text)

@@ -19,3 +19,3 @@

gulp.src('index.html')
.pipe(html2txt(150)) // optional wordwrap value.
.pipe(html2txt(options)) // options as in `html-to-text`
.pipe(gulp.dest('dist'));

@@ -26,6 +26,4 @@ });

[travis-url]: http://travis-ci.org/hemanth/gulp-html2txt
[travis-image]: https://secure.travis-ci.org/lazd/gulp-html2txt.png?branch=master
[npm-url]: https://npmjs.org/package/gulp-html2txt
[npm-image]: https://badge.fury.io/js/gulp-repl.png
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc