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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@xaios/utils

v1.3.11

Published

可以从本工具集中导出以下方法,具体源码与使用方式,请到具体文件中查看:

Downloads

320

Readme

工具集

可以从本工具集中导出以下方法,具体源码与使用方式,请到具体文件中查看:

  • 工具样式: @xaios/utils/style.css: /src/style/index.styl

  • 通用流程管理器: Steps: /src/script/steps/README.md

  • 轻度 indexedDB: TinyDB: /src/script/tiny_db/README.md

  • 数据加载节流器: DataLoader: /src/script/loader/README.md

  • 预操作计数器: PreLoad: /src/script/preload.js

  • 数组切割: ArraySlice: /src/script/slice.js

  • 查询参数获取: GetPathQuery: /src/script/query.js

  • 查询参数清理: DelPathQuery: /src/script/query.js

  • 简单的事件总线: Emitter: /src/script/utils.js

  • 对 emittery 的扩展: ExtendEmittery: /src/script/utils.js

  • 脚本加载: LoadScript: /src/script/loader/script.js

  • 移动端调试: InitEruda: /src/script/loader/script.js

  • 移动端调试插件:InitErudaPlugin:/src/script/loader/script.js

文件操作

  • 文件保存: SaveFile: /src/script/file.js
  • 文件选择: ChooseFile: /src/script/file.js
  • 文件下载: DownloadFile: /src/script/file.js
  • 文件后缀判断: FindAccept: /src/script/utils.js
  • 文本文件导出:ExportTextFile:/src/script/file.js
  • 文本文件导入:ImportTextFile:/src/script/file.js

数据格式化

  • 格式化时间: FormatTime: /src/script/format/time.js
  • 格式化富文本: FormatText: /src/script/format/text.js
  • 数值单位格式化: FormatUnit: /src/script/format/unit.js
  • 常见数字单位格式化: FormatNumber: /src/script/format/unit.js
  • 存储计量单位格式化: FormatMemory: /src/script/format/unit.js
  • 字符串数组转标准选项组: FormatOption: /src/script/format/index.js
  • 简单深度复制: DeepCopy: /src/script/format/index.js
  • 移除对象字段首尾空格: TrimData: /src/script/format/index.js
  • 根据字典解析数据: ParseData: /src/script/format/parse.js
  • 选项转成字典: OptionToHash: /src/script/format/parse.js

单页元素尺寸计算

  • 初始化: InitSuit: /src/script/suit.js
  • 计算: Suit: /src/script/suit.js

微信相关,非微信环境理论上调用不会报错只会无效

  • 字体冻结: FrozenSize: /src/script/wechat.js
  • 事件监听: WechatEventListen: /src/script/wechat.js
  • 自动播放背景音乐: WechatAutoPlay: /src/script/wechat.js