1.0.0 • Published 2 years ago

itheima-toolszzztest v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Install

npm install itheima-tools

Import

const itheima = require('itheima-tools')

Date Formation

// 调用dataFormat 进行格式化
const dtStr = itheima.dataFormat(new Date())

console.log(dtStr)

Escaping the Special sub symbol in HTML

const htmlStr = '<h1 title="abc">这是h1标签<span>123&nbsp;<span></h1>'

const str = itheima.htmlEscape(htmlStr)

console.log(str)

Open source protocol

ISC