🚀 Socket Launch Week Day 4:Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection.Learn more
Sign In

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

akai-tools

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

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
5
-16.67%
Maintainers
1
Weekly downloads
 
Created
Source

安装

  npm install akai-tools

导入

const akai = require('akai-tools')

格式化时间

// 调用 dateFormat 对时间进行格式化
const = akai.dateFormat(new Date())
// 结果 2021-12-26 20:45:49

转义 HTML 中的特殊字符

const htmlStr = '<h1>这是h1标签</h1>'

// 调用 akai.htmlEscape(htmlStr) 即可转换成功 还原字符串 反之亦然

开源协议

ISC

Keywords

akai

FAQs

Package last updated on 26 Dec 2021

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