# @tarojs/shared

> Taro utils internal use.

Latest version **4.2.1** (published 2026-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tarojs/shared
pnpm add @tarojs/shared
yarn add @tarojs/shared
bun add @tarojs/shared
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.2.1 |
| Published | 2026-07-17 |
| First published | 2020-02-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 18 |
| Dependencies | 0 |
| Unpacked size | 587.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 37666 |
| Author | O2Team |
| Maintainers | yuche, xuanzebin, defaultlee, drchan, kyjo, qq592743779, advancedcat, baosiqing, zakary, liuzejia, vasily.cjj, hardenzheng2 |

## Links

- npm: https://www.npmjs.com/package/@tarojs/shared
- Repository: https://github.com/NervJS/taro
- Homepage: https://github.com/NervJS/taro#readme
- Issues: https://github.com/NervJS/taro/issues
- npm.io page: https://npm.io/package/@tarojs/shared

## Recent versions

- 4.2.1 (latest) — 2026-07-17
- 4.2.2-beta.4 (beta) — 2026-09-08
- 4.2.2-alpha.2 (alpha) — 2026-09-01
- 3.6.40 (v3-latest) — 2026-04-13
- 3.6.40-beta.1 (v3-beta) — 2026-03-25
- 4.0.9-alpha.8 (test) — 2025-05-14
- 4.0.7-canary.6 (canary) — 2024-11-12
- 4.0.2 (next) — 2024-07-16
- 3.6.15-theta.0 (theta) — 2024-05-06
- 3.6.24-nightly.10 (nightly) — 2024-02-28
- 3.0.29 (3.0) — 2021-03-09
- 0.0.0-experimental.2 (experimental) — 2020-04-27
- 4.2.2-beta.3 — 2026-09-08
- 4.2.2-beta.1 — 2026-09-02
- 4.2.2-alpha.1 — 2026-08-24
- … 886 more at https://npm.io/package/@tarojs/shared/versions

## README

# `@tarojs/shared`

Taro 内部使用的 utils。包含了常用的类型判断、错误断言、组件类型/声明/参数等。`@tarojs/shared` 会跨 node/浏览器/小程序/React Native 使用，不得使用平台特有特性。

引入此包的必须采用 ES6 引用单个模块语法，且打包配置 external 不得包括此包。

---
_Source: https://npm.io/package/@tarojs/shared · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
