kukudebai-tools
Version:
Learn to use tools.
40 lines (26 loc) • 603 B
Markdown
# install
```js
npm isntall kukudebai-tools
```
# use
## import
```js
const tools = require('kukudebai-tools')
```
## date Format
```js
const dt = tools.dateFormat(new Date())
console.log(dt)
```
output format: `YYYY-MM-DD HH:mm:ss`
result : `2020-04-03 18:46:58`
## Html escape
```js
const str ='<h1 id="dfdf">Hello</h1>'
const test_txt = dtFormat.htmlEscape(str)
console.log(test_txt);
console.log(dtFormat.htmlUnEscape(test_txt));
```
htmlEscape Result : `<h1 id="dfdf">Hello</h1>`
htmlUnEscape Result : `<h1 id="dfdf">Hello</h1>`
# open source protocol : ` ISC `