0.0.1 • Published 1 year ago

w2xi-utils v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

w2xi-utils

安装

npm i w2xi-utils

使用

const utils = require('w2xi-utils');

const data = [ { id: 1 }, { id: 2 }, { id: 3 } ];
const html = '<div class="box">content</div>';

console.log(utils.column(data, 'id'));

console.log(utils.htmlEscape(html));; 
console.log(utils.htmlUnEscape(utils.htmlEscape(html)));

// 输出:
// [ 1, 2, 3 ]
// &lt;div class=&quot;box&quot;&gt;content&lt;/div&gt;
// <div class="box">content</div>

开源协议

ISC