Giter VIP home page Giter VIP logo

Comments (7)

jdanford avatar jdanford commented on July 17, 2024

The issue I see is that Crockford's base32 is intended to be written in uppercase, so a lowercase form of ULID (LULID?) would be better served by a different encoding such as z-base-32.

from javascript.

adius avatar adius commented on July 17, 2024

When decoding, upper and lower case letters are accepted

So an ulid decoder should support upper and lower case anyways ...

from javascript.

jdanford avatar jdanford commented on July 17, 2024

You're right – it turns out ULID is already specified as case-insensitive. Are you proposing changing the default or just making it configurable? Your original comment contradicts the issue title.

from javascript.

adius avatar adius commented on July 17, 2024

Sry for the unclear wording 😅. I just want it to be configurable. The default should probably remain upper case, as this also seems to be what crockford uses as default.

from javascript.

alizain avatar alizain commented on July 17, 2024

I'm open to outputting/formatting as lower-case, since the spec is case-insensitive. If you'd like to submit a PR, I'd be happy to accept it.

from javascript.

adius avatar adius commented on July 17, 2024

Created a PR: #34

from javascript.

alizain avatar alizain commented on July 17, 2024

@adius, on reflection, I have decided that I will not be accepting this PR. The alternative is incredibly simple, and what we would use internally to make a ULID lowercase, so I would recommend for you to it instead:

ulid().toLowerCase()

from javascript.

Related Issues (20)

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.