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

xunay

v1.2.4

Published

内存最少、速度最快的前端框架

Readme

XuNay

npm version GitHub

内存最少、速度最快的前端框架。

安装

npm install xunay

快速开始

import { div, button, span, s, app, txt } from 'xunay'

const n = s(0)

app(() => div(null, button({ on: { click: () => n(v => v + 1) } }, '+1'), span(null, txtn = ${n}) ), '#app')

体积(gzip)

xunay.esm.js 4.86KB xunay.min.js 5.09KB xunay-devtools.min.js 13.14KB xunay-kit.min.js 14.43KB xunay-full.min.js 18.35KB

核心含 signal / computed / effect / batch / render / mount / list / show / frag / txt / SSR / 生命周期,不含 UI 组件和 devtools。

对比(gzip)

Preact 4KB XuNay(核心) 4.86KB Solid 7KB Vue 3 34KB React 18 + DOM 45KB

别名

主名和短名等价,共 8 个:

signal s 信号 computed c 派生 effect f 副作用 batch bat 批量 mount app / m 挂载 list l / each 列表

其余 API 无短名:

div span button input show frag F txt onMount onUnmount ref ctx err lazy trans renderToString hydrate

入口

import { signal } from 'xunay' 核心 import { Btn, Input } from 'xunay/kit' UI 组件 import { openDevtools } from 'xunay/devtools' 调试面板 import * as all from 'xunay/full' 全量

API 速览

信号 signal / s 派生 computed / c 副作用 effect / f 批量 batch / bat 挂载 mount / app / m 列表 list / l / each 标签 div / span / button / input / ... 条件 show(cond, render) Fragment frag / F 生命周期 onMount / onUnmount 响应式文本 txtn = ${n} SSR renderToString / hydrate

License

MIT

核心 API(xunay)

| API | 签名 | 说明 | |---|---|---| | signal | signal(init) | 响应式值,读/写 | | computed | computed(fn) | 派生值,lazy + dirty,返回函数带 .dispose() | | effect | effect(fn) | 副作用,返回 stop 函数 | | batch | batch(fn) | 合并多次写,只触发一次 | | untrack | untrack(fn) | effect 内读 signal 但不订阅 | | onCleanup | onCleanup(fn) | effect 重跑前清理 | | createElement | createElement(type, props, ...children) | 创建 vnode | | createFragment | createFragment(children) | Fragment | | tag | tag(name) | 动态标签工厂 | | tags | tags.div / tags.span / ... | 29 个标准标签 | | registerTags | registerTags(names) | 注册自定义标签 / Web Components | | render | render(vnode) | vnode → DOM | | mount | mount(comp, target) | 挂载,返回 dispose | | list | list(arr, keyFn, renderFn) | 列表渲染 | | show | show(cond, renderFn) | 条件渲染 | | frag | frag(...children) | Fragment 简写 | | txt | txt\...`| 文本模板 | |onMount|onMount(fn)| 挂载后执行 | |onUnmount|onUnmount(fn)| 卸载前执行 | |ref|ref(init)` | 可变引用 |

子路径

| 路径 | 内容 | |---|---| | xunay | 核心 20 个 API | | xunay/tags | 29 个标准标签 | | xunay/advanced | ctx / err / lazy / trans | | xunay/alias | s / c / f / m 等别名 | | xunay/kit | 60+ UI 组件 | | xunay/ssr | renderToString / hydrateMount / hydrate | | xunay/anim | 动画预设 + 动画组件 | | xunay/devtools | DevTools 面板 | | xunay/dev | 开发模式辅助 |

体积

  • xunay.esm.js gzip 约 5.27 KB
  • xunay.min.js gzip 约 5.48 KB