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

zyjtools

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

zyjtools

提供了格式化时间 HTMLEscape功能

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

安装

npm install zyjtools

导入

const gd = require('./zyjtools')

格式化时间

const date = new Date()

console.log(gd.dateFormat(date))

转义html

const htmlStr1 = '<h1 title="abc">这是一个h1<span>123&nbsp;</span></h1>'

const str1 = gd.htmlEscape(htmlStr1)

console.log(str1)

转义字符串

const Str = '&lt;h1 title=&quot;abc&quot;&gt;这是一个h1&lt;span&gt;123&amp;nbsp;&lt;/span&gt;&lt;/h1&gt;'

const htmlstr = gd.htmlUnEscape(Str)

console.log(htmlstr)

开源协议

ISC

Keywords

zyj

FAQs

Package last updated on 27 Feb 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