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

xpots

v0.2.3

Published

基于ts开发的前端js工具库

Downloads

4

Readme

logo预留

xpots - 文档

Build Status Coverage Status

源自

xpots 是一个基于ts编写的js工具库。最开始来自于公司多个线上项目中公共js方法的大集合,为了不再繁琐的Ctrl+C/V,所以我们把所有公共的js方法集合到xpots里,并以npm包的形式安装到各个项目中。

同时集成了文档自动生成,方便后续别的小伙伴使用,学习。 同时,xpots还兼具学习ts的目的,整个项目基于ts编写,在编写方法的同时达到熟悉ts语法的目的。

安装

这个项目使用 nodenpm。请确保你本地安装了它们。

$ npm install xpots

使用说明

对于vue项目,可直接在main.js入口文件内引入,赋值到vue实例下,作为全局方法引用:

import xpots from 'xpots'
Vue.prototype.utils = xpots

其他优秀工具库

维护者

@NOcooker

如何贡献

非常欢迎你的加入!提一个 Issue 或者提交一个 Pull Request。 也可以fork项目,开发自己的工具库。

项目结构说明

所有方法单独一个文件,写在src/下,为了生成的doc页面内容美观,注释里都ignore掉,只在types/对应文件下复制一份备注 所有内部不对外开发的方法写在internal/里 所有类型声明、接口等写在types/里,一类的方法,如lodash的math 可以做合并

开发参考

通过 npm run start 开启ts watch 实时编译;
通过 npm run doc 基于 gulp 根据代码变更自动生成对应文档;
针对单文件测试,可以使用 npm run test:single 然后输入文件名,开始对本次编写的文件进行单元测试。如果直接测试全体文件,请使用 npm run test;

每个方法需写明:作者,功能描述,参数,返回值 具体注释的写法可参考tsdoc文档,如:

  @hidden 和 @ignore :用于隐藏代码内容,不在文档展示

贡献者

感谢以下参与项目的人:hzxdffe

使用许可

MIT