Skip to content

Commit

Permalink
Add JSR docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Feb 22, 2025
1 parent 1e24963 commit 6ed8f57
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT"
- [Install](#install)
- [ESM](#esm)
- [CommonJS](#commonjs)
- [JSR](#jsr)
- [CDN](#cdn)
- [API](#api)
- [Blocking](#blocking)
Expand Down Expand Up @@ -163,6 +164,27 @@ Nano ID can be used with CommonJS in one of the following ways:
npm install nanoid@3
```

### JSR

[JSR](https://jsr.io) is a replacement for npm with open governance
and active development (in contrast to npm).

```bash
npx jsr add @sitnik/nanoid
# For Deno: deno add jsr:@sitnik/nanoid
```

You can use it in Node.js, Deno, Bun, etc.

```js
// Replace `nanoid` to `@sitnik/nanoid` in all imports
import { nanoid } from '@sitnik/nanoid'
```

For Deno install it by `deno add jsr:@sitnik/nanoid` or import
from `jsr:@sitnik/nanoid`.


### CDN

For quick hacks, you can load Nano ID from CDN. Though, it is not recommended
Expand Down
22 changes: 22 additions & 0 deletions README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT"
- [Подключение](#подключение)
- [ESM](#esm)
- [CommonJS](#commonjs)
- [JSR](#jsr)
- [CDN](#cdn)
- [API](#api)
- [Блокирующий](#блокирующий)
Expand Down Expand Up @@ -169,6 +170,27 @@ npm install nanoid
npm install nanoid@3
```

### JSR

[JSR](https://jsr.io) это замена npm с открытым управлением
и активной разработкой (в отличие от npm).

```bash
npx jsr add @sitnik/nanoid
# For Deno: deno add jsr:@sitnik/nanoid
```

Вы можете использовать пакет с JSR в Node.js, Deno, Bun.

```js
// Replace `nanoid` to `@sitnik/nanoid` in all imports
import { nanoid } from '@sitnik/nanoid'
```

Для Deno установите через `deno add jsr:@sitnik/nanoid`
или импортируйте `jsr:@sitnik/nanoid`.


### CDN

Для быстрого прототипирования вы можете подключить Nano ID с CDN без установки.
Expand Down

0 comments on commit 6ed8f57

Please sign in to comment.