Giter Site home page Giter Site logo

nano-id-cc's People

Contributors

ai avatar anshulsahni avatar mathiasbynens avatar mexx avatar notpushkin avatar orlandok7 avatar zelark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nano-id-cc's Issues

Compress CSS

We can minify CSS by csso and remove .hljs-* classes which we don’t use

view-source:https://zelark.github.io/nano-id-cc/

Feature Request: Matches/Exceeds UUID randomness

I love using nanoid and the website (this repo, https://zelark.github.io/nano-id-cc/) helps me introduce nano ID to colleagues.

I would like the website to show "matches/exceeds UUID randomness" (we can iterate on copy text) in addition to the existing "~460 billion years needed, in order to have a 1% probability of at least one collision."

Example use case:

I want to change the default alphabet (no special characters, only lowercase for case insensitivity, etc), but I want to keep at least as much entropy as UUIDs.

Right now: I have to "do the math" and "show my work" to colleagues.

With this feature request: I/My colleagues edit the alphabet and adjust the slider until it shows "matches/exceeds UUID entropy."

The results are different between `zelark` version and `alex7kom` version

Input:

  • Alphatbet: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
  • Length: 20
  • Rate: 10000 Ids per Second

alex7kom version -> ~376 thousands of years of work are needed in order to have a 1% probability of at least one collision.

image

zelark version: ~1 billion years needed, in order to have a 1% probability of at least one collision.
image

Why is the difference ? Which is the correct one ?

Change "boom" graphic

Yeah it is a bit funny and I might be seen as a party pooper but it is somewhat inappropriate for the sort of tool it is and makes it dangerous to use at work or in public, especially since you might need to clear the alphabet to change it to something else.

Calculator for absolute number of IDs?

I'd like to answer the question "how many rows there would need to be in our database for nanoid to have a 1% probability of producing an already existing ID". Just maybe an idea for this awesome calculator (I like the current approach, just think that maybe there could be an additional "view" on the probability).

difference in 60 ids/hr vs 1 id/sec

hey, I am trying to understand why the demo gives a different number for mathematically, the same input
ie. 60 ids/hr = 1 id/sec

60 ids/hr = ~26 days

image

1 id/s = ~10 hrs

image

[Feature request] Export as JS library

For example, the following function :

getCollisionProbability({
    alphabet: String,
    length: Integer,
    speed: Integer,
    speedUnit: String // 'hour' or 'second'
})

Could return the following value :

{
    duration: Integer,
    durationUnit: String, // 'second', 'minute', 'hour', 'day', 'year'
    count: Integer
}

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.