New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

hbmu-tools

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hbmu-tools

提供了格式化时间、HTMLEscape相关的功能

latest
npmnpm
Version
1.1.0
Version published
Weekly downloads
6
500%
Maintainers
1
Weekly downloads
 
Created
Source

##安装

npm install 

##导入

const hbmu=require('hbmu-tools')

##格式化时间

//调用dateFormate 对时间进行格式化
let dtStr = hbmu.dateFormat(new Date())
//结果  2022-0721 21:14:26
console.log(dtStr);

##转译HTML中的特殊字符

//待转换的HTML字符串
let htmlStr = '<h1>hello<h1>'
//调用htmlEscape 方法进行转换
let newStr = hbmu.htmlEscape(htmlStr)
//转换的结果  &lt;h1&gt;hello&lt;h1&gt;
console.log(newStr);

##还原HTML中的特殊字符

##开源协议 ISC

Keywords

hbmu

FAQs

Package last updated on 21 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts