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

lyj-tools

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lyj-tools

提供格式化时间,HTMLEscape的功能

latest
npmnpm
Version
2.0.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

##安装

npm install lyj-tools

##导入方式

const lyjTools = require('lyj-tools')

##格式化时间

//调用dateFormat方法格式化时间 
const dateStr = lyjTools.dateFormat(new Date())
console.log(dateStr) // 2023-03-20 15:20:30

##HTML转义字符

//调用htmlEscape方法转义HTML字符 
const htmlStr = lyjTools.htmlEscape('<h1>标题</h1>')
console.log(htmlStr) // &lt;h1&gt;标题&lt;/h1&gt;

##HTML反转义字符

//调用htmlUnescape方法反转义HTML字符 
const unescapeStr = lyjTools.htmlUnescape('&lt;h1&gt;标题&lt;/h1&gt;')
console.log(unescapeStr) // <h1>标题</h1>

##开源协议 ISC

Keywords

lyj-tools

FAQs

Package last updated on 03 Dec 2025

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