es-toolkit/docs/zh_hans/installation.md
BlackWhite e9ede74362
docs: Translate Simplified Chinese (#165)
* Translate Simplified Chinese

* Supplement the omitted

* Supplement the omitted

* Supplement the omitted

* Supplement the omitted

* Supplement the omitted

* Supplement the omitted

* Supplement the omitted

* Supplement the omitted

* Supplement the omitted

* Update docs/.vitepress/shared.mts

---------

Co-authored-by: Sojin Park <raon0211@gmail.com>
2024-07-12 10:08:55 +09:00

58 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
description: 如何安装 es-toolkit
prev:
text: es-toolkit 简介
link: ./intro.md
next:
text: 包体积对比
link: ./bundle-size
---
# 安装
es-toolkit 可通过 [npm](https://npmjs.com/package/es-toolkit) 安装,适用于 Node.js 和 Bun也可以通过 [JSR](https://jsr.io/@es-toolkit/es-toolkit) 安装到 Deno。
## Node.js
es-toolkit 支持 Node.js 18及更高版本。使用以下命令安装 es-toolkit
::: code-group
```sh [npm]
npm install es-toolkit
```
```sh [pnpm]
pnpm install es-toolkit
```
```sh [yarn]
yarn add es-toolkit
```
:::
## Deno
es-toolkit 也可以通过 [JSR](https://jsr.io/@es-toolkit/es-toolkit) 安装到 Deno。使用以下命令安装 es-toolkit
```sh
deno add @es-toolkit/es-toolkit
```
请注意,根据 JSR 的限制,包名包含额外的作用域,与 npm 不同。
```typescript
import { sum } from '@es-toolkit/es-toolkit';
sum([1, 2, 3]);
```
## Bun
es-toolkit 也支持 Bun。您可以使用以下命令安装它
```sh
bun add es-toolkit
```