Skip to content

Commit

Permalink
Move docs to package description.
Browse files Browse the repository at this point in the history
  • Loading branch information
crabmusket committed Jun 19, 2015
1 parent cb5adac commit c958f29
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
22 changes: 21 additions & 1 deletion hscuid.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,27 @@ name: hscuid
version: 1.0.1
synopsis: Collision-resistant IDs
description: CUIDs are designed for horizontal scalability and collision
resistance. Read more about them at <https://usecuid.org>.
resistance.
Read more about them at <https://usecuid.org usecuid.org>.
Here's everything you need to know:
.
>>> import Web.Cuid (newCuid, newSlug)
>>> newCuid
"cib3c3tcu0000zwowx9ho2gh4"
>>> newSlug
"c900001wmf"
.
This module does not use crypto-strength sources of
randomness.
Use at your own peril!
.
For better or worse, this module uses semantic versioning
(see <http://semver.org/ semver.org>).
That is, if you want to depend upon, for example, version 1
of the API, you should add @hscuid ==1.*@ to your Cabal
file. No breaking changes will be (deliberately) introduced
under that version number.

homepage: https://github.com/eightyeight/hscuid
license: BSD3
license-file: LICENSE
Expand Down
17 changes: 2 additions & 15 deletions lib/Web/Cuid.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,8 @@
Stability: stable
Portability: portable
You can generate a new CUID inside any IO-enabled monad using @newCuid@:
>>> cuid <- newCuid
>>> print cuid
"ciaafthr00000qhpm0jp81gry"
There is also a function, @newSlug@, which generates shorter IDs without the c
prefix of regular CUIDs:
>>> slug <- newSlug
>>> print slug
"ym0001iw3f"
This module does not use crypto-strength sources of randomness. Use at your own
peril!
You can generate a new CUID or slug inside any IO-enabled monad using 'newCuid'
and 'newSlug'.
-}
module Web.Cuid (
Cuid, newCuid,
Expand Down

0 comments on commit c958f29

Please sign in to comment.