Popularity
6.3
Stable
Activity
0.0
Stable
10
5
4

Monthly Downloads: 17
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Web    
Latest version: v1.2.0.1

hscuid alternatives and similar packages

Based on the "Web" category.
Alternatively, view hscuid alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of hscuid or a related project?

Add another 'Web' Package

README

hscuid

Build Status Hackage

A Haskell port of the JavaScript library for collision-resistant identifiers. To install, cabal install hscuid.

What is a CUID?

CUIDs are short random strings designed so that you can generate a lot of them over many different machines and not get collisions. They are intended to be usable in situations from HTML element IDs to database keys. You can read more about them at usecuid.org.

How do I use this library?

>>> import Web.Cuid (newCuid, newSlug)
>>> newCuid
"cib3c3tcu0000zwowx9ho2gh4"
>>> newSlug
"y900001wmf"

Developing

I am currently developing with stack. To install dependencies and compile the library and test suites:

stack build

To run the collision test suite (which generates 1.2M IDs and makes sure they're all unique):

stack test

To test performance with criterion:

stack exec perf-test -- --regress allocated:iters +RTS -T