yizhi-html-escape
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

yizhi-html-escape

A HTML escape character util. (>_<)

Usage

import {escape, unescape} from 'yizhi-html-escape'

escape('<div>Tom&Jerry</div>')
//Output:
// &lt;div&gt;Tom&amp;Jerry&lt;/div&gt;


unescape('&pi;=3.14, &yen;&cent;&pound;&copy;&reg;')
//Output:
// π=3.14, ¥¢£©®

Package Sidebar

Install

npm i yizhi-html-escape

Weekly Downloads

2

Version

1.0.3

License

ISC

Unpacked Size

6.46 kB

Total Files

6

Last publish

Collaborators

  • yizhi