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

@caikengren/uni-hooks

v1.1.3

Published

hooks library in uni-app

Readme

@caikengren/uni-hooks

TypeScript Dependencies License

Vue Hooks for uni-app:轻量、类型友好、面向 uni-app 的常用 hooks 集合。封装常用 uni 能力,统一 API,支持 H5 与小程序,提供完整 TypeScript 类型与 d.ts 输出。

文档地址:https://fkcaikengren.github.io/uni-hooks/

Features

  • 面向 uni-app 封装常用composables/hooks,统一 API,兼容 H5/小程序
  • 全量 TypeScript 支持,类型健全,完善的 d.ts 输出
  • 依赖精简,与 vue@dcloudio/uni-app 解耦为 peerDependencies
  • 工程化齐备:打包、测试、文档与 CI 完整
  • @caikengren/uni-hooks-shared@caikengren/uni-use-request 协同使用

Install

  • pnpm:pnpm add @caikengren/uni-hooks
  • npm:npm i @caikengren/uni-hooks
  • yarn:yarn add @caikengren/uni-hooks

注意:本包声明以下 peer 依赖,请在项目中同时安装并保证版本匹配:

  • vue@^3.5.0
  • @dcloudio/uni-app@^3.0.0

Usage

  • 在任意 setup() 或组合式函数中使用;支持 H5 与小程序。
// src/pages/index.vue
<script setup lang="ts">
import { usePageScroll, useStorage } from '@caikengren/uni-hooks'
import { ref } from 'vue'

// 响应式持久化存储(自动读写 uni storage)
const count = useStorage('count', 0)
const inc = () => count.value++

// 滚动到选择器位置(H5 与小程序统一)
const { scrollToSelector } = usePageScroll({ duration: 300 })
</script>

更多示例与 API 请查阅文档:https://fkcaikengren.github.io/uni-hooks/

License

MIT © Gavin Tang