flight-tools

格式化时间,HTMLEscape 功能

Usage no npm install needed!

<script type="module">
  import flightTools from 'https://cdn.skypack.dev/flight-tools';
</script>

README

安装

npm i flight-tools 

导入

 const flight = require('./src/deteFormat')

格式化日期

//格式化日期
const str = itheima.deteFormat(new Date())
console.log(str);

转译

//测试
const htmlStr = '<h1 title="abc">这是h1标签<sapn>123&nbsp;</span></h1>'
const Str = itheima.htmlEscpae(htmlStr)
console.log(Str);

还原

//测试
const htmlStr = '<h1 title="abc">这是h1标签<sapn>123&nbsp;</span></h1>'
const str2 = itheima.htmlUnEscpae(htmlStr)
console.log(str2);

开源协议

ISC