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

itheima-tools-bestone

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

itheima-tools-bestone

提供了格式化时间,HTMLescape功能

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

安装方式

npm i itheima-tools-bestone

导入方式

const itheima = require('./itheima-tools-bestone');

功能1:格式化时间

const dataStr = itheima.dataFormat(new Date());
console.log(dataStr);

功能2:转义html特殊字符

const htmlStr = '<h1 style="height: 100px; width: 100px;">11112222&nbsp</h1>'
const str = itheima.htmlEscape(htmlStr);
console.log(str);

功能3:还原html特殊字符

const htmlStr1 = itheima.htmlUnEscape(str);
console.log(htmlStr1);

开源协议

ISC

FAQs

Package last updated on 07 Sep 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