@greatenemy/html-prettifier
Wrapper around clean-html that newlines all tags and returns value directly without callback.
Last updated a year ago by iomge .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @greatenemy/html-prettifier 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.1.0                                ...           latest (a year ago)

1 Versions

  • 0.1.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |