Skip to content
Myr

Add JSR docs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Andrey Sitnik · committed by Andrey Sitnik · parent 1e24963 · Browse files · 2 files+44 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+44 added−0 removed

  • other:+44 added−0 removed

2 files+44 added−0 removed

modified:README.md+22 added
41 unmodified lines
42- [Security](#security)43- [Install](#install)44 - [ESM](#esm)45 - [CommonJS](#commonjs)46 - [JSR](#jsr)47 - [CDN](#cdn)48- [API](#api)49 - [Blocking](#blocking)50 - [Non-Secure](#non-secure)
112 unmodified lines
163 ```bash164 npm install nanoid@3165 ```166167### JSR168169[JSR](https://jsr.io) is a replacement for npm with open governance170and active development (in contrast to npm).171172```bash173npx jsr add @sitnik/nanoid174# For Deno: deno add jsr:@sitnik/nanoid175```176177You can use it in Node.js, Deno, Bun, etc.178179```js180// Replace `nanoid` to `@sitnik/nanoid` in all imports181import { nanoid } from '@sitnik/nanoid'182```183184For Deno install it by `deno add jsr:@sitnik/nanoid` or import185from `jsr:@sitnik/nanoid`.186187188### CDN189190For quick hacks, you can load Nano ID from CDN. Though, it is not recommended191to be used in production because of the lower loading performance.
311 unmodified lines
modified:README.ru.md+22 added
45 unmodified lines
46- [Безопасность](#безопасность)47- [Подключение](#подключение)48 - [ESM](#esm)49 - [CommonJS](#commonjs)50 - [JSR](#jsr)51 - [CDN](#cdn)52- [API](#api)53 - [Блокирующий](#блокирующий)54 - [Небезопасный](#небезопасный)
114 unmodified lines
169 ```bash170 npm install nanoid@3171 ```172173### JSR174175[JSR](https://jsr.io) это замена npm с открытым управлением176и активной разработкой (в отличие от npm).177178```bash179npx jsr add @sitnik/nanoid180# For Deno: deno add jsr:@sitnik/nanoid181```182183Вы можете использовать пакет с JSR в Node.js, Deno, Bun.184185```js186// Replace `nanoid` to `@sitnik/nanoid` in all imports187import { nanoid } from '@sitnik/nanoid'188```189190Для Deno установите через `deno add jsr:@sitnik/nanoid`191или импортируйте `jsr:@sitnik/nanoid`.192193194### CDN195196Для быстрого прототипирования вы можете подключить Nano ID с CDN без установки.197Не используйте этот способ на реальном сайте, так как он сильно бьёт
283 unmodified lines