Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rss-tools

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rss-tools

时间格式化,HTMLEscape

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

安装

npm install rss-tools

导入

const r = require('rss-tools')

格式化时间

const dtStr = r.dateFormat(new Date())
// 2022-10-18 19:52:55

转义/还原 HTML 特殊字符

const htmlStr = '<h1 title="abc">zheshih1 <span>123&nbsp</span> </h1>'
const str = r.htmlEscape(htmlStr)
// &lt;h1 title=&quot;abc&quot;&gt;zheshih1 &lt;span&gt;123&amp;nbsp&lt;/span&gt; &lt;/h1&gt;
const str1 = r.htmlUnEscape(str)
// <h1 title="abc">zheshih1 <span>123&nbsp</span> </h1>

开源协议

ISC

Keywords

FAQs

Package last updated on 18 Oct 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc