Skip to content

Commit

Permalink
Merge pull request #64 from MarkHerhold/patch-1
Browse files Browse the repository at this point in the history
Adding note about slug length
  • Loading branch information
ericelliott committed Aug 1, 2016
2 parents ee39c6c + e240f5c commit c69ba7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ The algorithm is also easy to reproduce in other languages. You are encouraged t

# Short URLs

Need a smaller ID? `cuid.slug()` is for you. With fewer than 10 characters, `.slug()` is a great solution for short urls. They're good for things like URL slug disambiguation (i.e., `example.com/some-post-title-<slug>`) but **absolutely not recommended for database unique IDs**. Stick to the full cuid for database keys.
Need a smaller ID? `cuid.slug()` is for you. With fewer than 10 characters, `.slug()` is a great solution for short urls. Slugs may be 7 or more characters and grow as the internal counter increases. They're good for things like URL slug disambiguation (i.e., `example.com/some-post-title-<slug>`) but **absolutely not recommended for database unique IDs**. Stick to the full cuid for database keys.

Be aware, slugs:

Expand Down

0 comments on commit c69ba7d

Please sign in to comment.