Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 460 Bytes

shortid.md

File metadata and controls

19 lines (12 loc) · 460 Bytes

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.

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

Project Page npm