Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add shortid #137

Merged
merged 5 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ESLint plugin.
- [`qs`](./qs.md)
- [`readable-stream`](./readable-stream.md)
- [`rimraf`](./rimraf.md)
- [`shortid`](./shortid.md)
- [`sort-object`](./sort-object.md)
- [`tempy`](./tempy.md)
- [`uri-js`](./uri-js.md)
19 changes: 19 additions & 0 deletions docs/modules/shortid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# shortid

`shortid` is deprecated, because the architecture is unsafe.

# Alternatives

## nanoid

`nanoid` is a secure alternative to `shortid`. It is a tiny, secure, URL-friendly, unique string ID generator for JavaScript.

Also note that `nanoid` is faster than `shortid`.

```ts
import { nanoid } from 'nanoid'
model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT"
```

[Project Page](https://github.com/ai/nanoid/)
[npm](https://www.npmjs.com/package/nanoid)
6 changes: 6 additions & 0 deletions manifests/preferred.json
Original file line number Diff line number Diff line change
Expand Up @@ -2082,6 +2082,12 @@
"docPath": "rimraf",
"category": "preferred"
},
{
"type": "documented",
"moduleName": "shortid",
"docPath": "shortid",
"category": "preferred"
},
{
"type": "documented",
"moduleName": "sort-object",
Expand Down