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

nhanh-pure-function

v4.0.0

Published

纯函数工具

Readme

nhanh-pure-function

JavaScript/TypeScript 工具库,提供纯函数、画布、格式化、校验等常用能力,适用于前端项目的数据处理与可视化场景。

安装

npm install nhanh-pure-function

模块概览

| 模块 | 说明 | |------|------| | Constant | 常量:扩展名与 MIME 映射、单位标签、纸张尺寸、窗口目标等 | | Animate | 动画:进度调度、振荡器、数值过渡 | | Blob | 数据转图像 URL(Base64、ArrayBuffer、File 等) | | Browser | 浏览器:帧率、剪贴板、可打印区域、同源标签管理 | | Canvas/Axis | 数学坐标轴画布 _Canvas_Axis:图层、覆盖物(点/线/多边形/圆弧)、视图适配、覆盖物创建交互 | | Canvas/TimeAxis | 时间轴画布 _Canvas_TimeAxis:时间-像素换算、拖拽、缩放、时间范围绘制 | | Element | DOM:滚动结束监听、点击外部关闭、拖拽等 | | File | 文件:读取、下载(含进度)、创建并下载 | | Format | 格式化:首字母大写、百分比、千位分隔符、文件大小、时间戳、链接名等 | | Math | 数学:经纬度↔平面坐标、点到线段距离、圆弧点、中点、边界交点等 | | Types | 类型工具:RequiredByPartialByDeepPartialMutable | | Utility | 工具:空闲执行、等待条件、合并对象、防抖节流、UUID 等 | | Valid | 校验:数组校验、误差范围、点在多边形内、线段与矩形相交、数据类型、安全上下文、文件类型等 | | _Tip | 提示流:info/success/warning/error 链式注册与执行 |

许可证

MIT