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

@dinofe/xt-core

v1.1.0

Published

<div align="center" style="margin: 16px auto;"> <img src="tsdoc/.vuepress/public/logo_full.jpg" style="width: 400px;"> <p>提取的一些常用工具方法,包括:Axios二次封装、基础方法等。</p>

Downloads

56

Readme

npm (scoped) npm GitHub contributors

🚀 特性

  • 🎪在线文档和 demo
  • 🌎无编译器场景:可直接使用 CDN 版本
  • 🦾类型支持良好:使用 TypeScriptTS Docs 编写
  • ⚡摇树优化:按功能模块定义导出可通过按需引入模块减少打包体积,支持 5 大模块:common http url web wechat

📦 安装

npm i @dinofe/xt-core

示例

CDN

<script src="https://unpkg.com/@dinofe/xt-core@next/dist/umd/xt-core.min.js"></script>

引入此脚本之后,所有 API 都会挂载到 widnow.XtCore 上。

🦄 使用

支持按需引入各模块自己的 API

wechat 模块引入 genOAuthUrl 方法:

import { genOAuthUrl } from '@dinofe/xt-core/wechat'

const wechatOptions = {
  wx_appid: '123456',
  wx_component_appid: '1123456',
  wx_scope: 'snsapi_base',
  redirect_url: 'https://www.github.com',
  state: '0'
}
const url = genOAuthUrl(wechatOptions)
console.log(url)

5 大模块导出的所有 API 都可以直接引入

直接导引入 genOAuthUrl 方法:

import { genOAuthUrl } from '@dinofe/xt-core'
// ... 用法和上面相同

支持的方法列表请查看 API 文档

🧱 参与贡献

本地开发环境要求 Node.js 版本 >= 18.x,推荐使用 v20.x。

  1. 启动项目
npm run vitest

或者

npm run vitest:ui
  1. 构建打包
npm run build
  1. 预览文档

编译项目,生成类型声明

npm run docs:build

启动文档本地预览

cd ./tsdoc
npm run docs:dev

说明:如果源码有变更需要手动重新执行 npm run docs:build

  1. 发布测试包(预发布)

需要先切换到npm官方源、并登录账号

npm run releaseit

或者

npx release-it -i patch --preRelease

预览版使用 next tag 发布,安装命令如下:

npm i @dinofe/xt-core@next

📄 开源协议

MIT License