npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

webfront-easy-builder

v1.0.1

Published

提供了格式化时间,转义HTML语句的功能

Readme

工具介绍

这个包有格式化时间、转义HTML语句和还原HTML语句的功能,可以帮助网站开发者更快地完成开发 这是我的练习项目 有三个方法,分别是dateFormat,htmlEscape和htmlUnEscape


使用方法

安装

npm i easy-tools

导入(后面的演示都是建立在导入的基础之上)

// 引入包
const tools = require('webfront-easy-builder');

格式化时间

// 调用 dateFormat 对时间格式化
const date = dateFormat(new Date()); // 这就已经格式化完成了

转义HTML字符(可以帮助开发者更好的预防xss攻击或误输入)

// 调用 htmlEscape 转义 html 字符
const htmlStr = "<h1>hello world</h1>"; // 需要转义的字符串
const str = htmlEscape(htmlStr); // 转义完成

还原HTML字符(就是把上面转义好的字符串再变成可以阅读的形式)

// 调用 htmlUnEscape,将转义完成的字符再转回来
const str = "&lt;1&gt;hello world&lt;/1&gt;";
const unEscapeStr = htmlUnEscape(str); // 转义完成

开源协议

ISC

BUG修复

  • 1.0.1:修复了文档示例不全面的问题

新增功能

  • 目前没有新增功能

版本更新

  • 基础版本,没有更新