UNPKG

kukudebai-tools

Version:

Learn to use tools.

40 lines (26 loc) 603 B
# 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 : `&lt;h1 id=&quot;dfdf&quot;&gt;Hello&lt;/h1&gt;` htmlUnEscape Result : `<h1 id="dfdf">Hello</h1>` # open source protocol : ` ISC `