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

zinc-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

zinc-tools

时间系魔法格式化分支、转义构造图

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

安装

npm instal zn-tools

导入

const zntools = require("zn-tools");

格式化时间

//调用dateFormat格式化时间
const dtStr = zntools.dateFormat(new Date());
// 结果是: 年-月-日 时:分:秒

转义 html 特殊字符

//待转换的html字符串
const htmlStr = "<h1>这是一个h1<span>1234&nbsp;</span></h1>";
//调用转换 结果略
const str = zntools.htmlEscape(htmlStr);
//调用还原 结果略
const newStr = zntools.htmlUnEscape(str);

Keywords

Zn

FAQs

Package last updated on 25 Mar 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