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

cc1-js

v1.0.11

Published

我来助你-JavaScript工具库

Readme

cc1-js

对js封装的一系列工具,简介如下,详细实现方法可在文件dist/index.d.ts中查看

Base64Util

base64加解密工具

IFrameUtil

iframe简单通讯工具

JSONUtil

JSON序列化工具

MathUtil

数学工具

MsgUtil

消息提示工具

StrUtil

字符串工具

ArrayUtil

数组操作工具

DomUtil

dom工具

Timer

定时器

CEvent

全局事件管理

CEventBean

事件管理对象

其他实现

对原生Date、Array、DomRect、Function、Map一系列扩展

Timer / CEvent 资源管理(1.0.11)

继续通过全局 Timer、CEvent、TimerBean、CEventBean 使用,不增加模块导出。 浏览器入口调用一次 ResourceRuntime.activity.connect();原生容器可自行桥接 ResourceRuntime.activity.update(isActive, online),同一宿主只选择一种桥接。

  • Timer.on/once/un/clear/delay 和 CEvent.on/once/off/emit/clear 保留原有调用方式。
  • 定时器在后台暂停,恢复时每个过期任务最多执行一次;返回 Promise 的循环任务等待上一轮结束。
  • once 完成后从所属 Bean 和全局任务表中立即移除。清理 delay 时以 AbortError 结束等待。
  • 事件按同一管理器、key、callback 去重;once 在回调前移除,递归触发与异常不会重复执行。
  • 回调异常被隔离;一个无效订阅不会删除同一 Bean 的其他订阅。清空后没有空 Bean 留在全局表。
  • TimerBean 支持 background: 'continue'、clock: 'remaining'、immediateOnResume 等选项。 CEventBean 支持 listen/unlisten 管理 DOM 监听。clear 可复用,dispose 彻底释放。
  • 配合 cc1-vue3 1.1.3,在 setup、生命周期钩子和 Minxins 同步工厂中调用全局 Timer/CEvent, 自动关联 Vue 所有者;组件释放时清理,共享服务在最后一个使用方释放时清理。 异步任务或用户回调中首次注册时没有 Vue 上下文,应提前创建 Scope.Timer/Scope.Event 并复用。
  • 不再改写 window.setTimeout/setInterval。Timer.clearAll() 仅清理本库管理的任务, 不清理原生和第三方 SDK 定时器。原生定时器、DOM 监听仍由调用方清理。
  • 倒计时仍须用截止时间减去当前时间,调度器不能自动修正业务里的 seconds--。

ResourceRuntime 仅提供框架无关的可见状态与所有者接口,JS 库本身不依赖 Vue。