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

hyao-js-hooks

v2.0.0

Published

Hyao-Js-Hooks

Downloads

3

Readme

hyao-js-hooks

在JavaScript开发中,打造集成方法是一种提高代码复用性和简化操作的有效策略。这种方法通过将多个功能封装成一个单一的函数,使得代码更加简洁,易于理解和维护。例如,我们可以创建一个集成方法来处理兄弟通信,这样开发者就不需要手动自己编写代码。集成方法可以进一步扩展,包括数据处理等,从而形成一个功能丰富的工具库。这样的工具库不仅能够减少代码冗余,还能提高开发效率,使得开发者能够专注于业务逻辑的实现,而不是被繁琐的基础操作所困扰。简而言之,集成方法是简化JavaScript编程的强大工具,它通过封装复杂性,提供了一个简单、便捷的接口,让开发者能够以更少的代码做更多的事情。

In JavaScript development, creating an integrated approach is an effective strategy to improve code reusability and simplify operations. This approach makes the code more concise, easier to understand and maintain by encapsulating multiple functions into a single function. For example, we can create an integrated approach to handle brother communication so that developers do not need to write the code manually. The integrated approach can be further extended to include data processing, etc., to form a feature-rich tool library. Such a tool library can not only reduce code redundancy, but also improve development efficiency, allowing developers to focus on the implementation of business logic instead of being bothered by tedious basic operations. In short, the integrated approach is a powerful tool to simplify JavaScript programming. It provides a simple and convenient interface by encapsulating complexity, allowing developers to do more with less code.

使用(Use)

  • BorComEvent

    import { BroComEvent } from "hyao-js-hooks";
    
    BroComEvent.$emit("Event", "String" || "Object" || "Array" || "Fun");
    BroComEvent.$on("Event", () => {});
    BroComEvent.$off("Event");
  • HtmlEscape

    import { HtmlEscape, HtmlUnEscape } from "hyao-js-hooks";
    
    HtmlEscape("<div>你好 Hyao</div>");
    HtmlUnEscape("叽里呱啦-要还原的字符");
  • LocalStorage

    import { GetLocalStorage, SetLocalStorage, DelLocalStorage, ... } from "hyao-js-hooks";
    
    GetLocalStorage("键");
    SetLocalStorage("键", value);
    DelLocalStorage("键");

更多:https://github.com/Hyao-J/hyao-js-hooks/blob/main/USE.md