1.0.1 • Published 3 years ago

convert-to-plain v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Convert html to plain text

Install

$ npm install convert-to-plain

Usage

const {convertToPlain} = require("convert-to-plain");

const htmlContent = "<div>Merhaba <strong>Dünya</strong></div>";

let htmlToPlain = convertToPlain(htmlContent);

console.log("Girdi: ", htmlContent + "\n"+"Sonuç: ", htmlToPlain);
//=> Girdi: <div>Merhaba <strong>Dünya</strong></div>
//=> Sonuç: Merhaba Dünya