9de 中文文档教程
9de
一个小型库,提供 escape
和 unescape
HTML 实体的实用方法
Installation
npm install 9de --save
Usage
var nodeUtil = require('9de'); escape = nodeUtil.escape, unescape = nodeUtil.unescape;
变量 html = '
Hello World
', escaped = escape(html), unescaped = unescape(escaped);console.log('html', html, '转义', 转义, '未转义', 未转义);
Tests
npm 测试
9de
A small library providing utility methods to escape
and unescape
HTML entities
Installation
npm install 9de --save
Usage
var nodeUtil = require('9de'); escape = nodeUtil.escape, unescape = nodeUtil.unescape;
var html = '
Hello World
', escaped = escape(html), unescaped = unescape(escaped);console.log('html', html, 'escaped', escaped, 'unescaped', unescaped);
Tests
npm test