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

@zhchjiang95/jutils

v1.9.6

Published

JavaScript 便利工具集

Readme

jutils

📄 文档

详细使用请在使用中关注 JSDoc。

🍭 在线 Docs

📦 Install

npm i @zhchjiang95/jutils

🔗 CDN

<script src="https://unpkg.com/@zhchjiang95/jutils"></script>

🦄 Usage

// module
import { boxAnchor } from '@zhchjiang95/jutils';
boxAnchor({source: 'div#source-box', target: '#target-box'}, (res) => {});

// CDN
jutils.boxAnchor({source: 'div#source-box', target: '#target-box'}, (res) => {});

⛄️ Features

| 功能 | 描述 | | ---- | ---- | | 滑动方向(slideDirection)                                         | 判断在屏幕上滑动的方向,允许在任意盒子中滑动,移动过程中实时返回当前X/Y坐标,接收回调函数,返回起始位置和结束位置的X/Y坐标值对象,支持 PC 和移动端。 | | 日期格式化(formatDate) | 格式化当前或自定义时间日期,自定义年月日分隔符和时分秒显示。 | | 格式化查询参数(formatUrlSearch) | 格式化URL查询参数,返回所有参数的对象集合,传入参数获取指定的某个参数值。 | | 页面锚点(pageAnchor) | 指定页面滑动到某个位置,自定义滑动速度,自定义滑动方向。须整个页面可滑动。 | | 盒子锚点(boxAnchor) | 盒子锚点,在任意可滑动盒子中跳转;监听事件元素需指定 data-jt-id 值为目标元素唯一标识 id。 | | 无限滚动(infiniteScroll) | 滚动至底部时,加载更多数据,或执行一些自定义的事件。可清除绑定事件。 | | 自适应缩放(adaptiveScaling) | 自适应等比缩放。适用大屏可视化自动适配屏幕。 | | 匹配字符串(matchString) | 字符串中匹配字符,匹配出的字符可用于高亮显示等。 | | 过滤树数据(filterTree) | 搜索过滤树。按树层级返回过滤后树数据,支持模糊匹配。 | | 节流函数(throttleFn) | 在连续的函数触发过程中限制执行次数。 | | 防抖函数(debounceFn) | 在连续的函数触发过程执行最后一次,支持最大等待时间。 | | canvasPath2D事件(canvasPathEvent) | 给Canvas Path2D路径绑定事件。 | | 创建 Canvas 元素(createCanvas) | 快速创建 Canvas 元素。 | | 转换为驼峰(transHump) | 字符串转换为大/小驼峰。 | | 分割字符串(freelySplit) | 自由分割字符串。 | | 文字滚动显示(marquee) | 文字滚动显示。 |