@greatenemy/html-prettifier

0.1.0 • Public • Published

html-cleaner

A small utility library providing utility methods to 'escape' and 'unescape' HTML entities

Installation

npm install @greatenemy/html-prettifier --save
yarn add @greatenemy/html-prettifier

Usage

const htmlPrettify = require('@greatenemy/html-prettifier'),
const str_output = htmlPrettify(str_input)

Example Input:

			<template lang="pug">
<p>
  <div class="is-something" :bells="true">Nice
    <template
 v-if="ducks"><span class="text-muted">Dogs</span></template>
  </div>
</p></template>

Example Output:

<template lang="pug">
  <p>
    <div class="is-something" :bells="true">
      Nice
      <template v-if="ducks">
        <span class="text-muted">Dogs</span>
      </template>
    </div>
  </p>
</template>

Tests

npm test

Release history

* 0.1.0 Initial release

Readme

Keywords

Package Sidebar

Install

npm i @greatenemy/html-prettifier

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

11.5 kB

Total Files

9

Last publish

Collaborators

  • iomge