Coder Social home page Coder Social logo

Comments (4)

ullmark avatar ullmark commented on May 31, 2024

Yes, hashids doesn't support negative values. As stated in documentation. :)

On 9 maj 2016, at 09:13, Sven [email protected] wrote:

the issue seems to be in a lot of hashid implementations


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

from hashids.net.

sheitmann avatar sheitmann commented on May 31, 2024

oh ok, seems I did not see it.
maybe the method should check for negative long values and throw a meaningful exception and also the method documentation should note this. what you think about?

from hashids.net.

ullmark avatar ullmark commented on May 31, 2024

Yes, to give a slightly longer answer. Some of the others implementations doesn't have all the features C# has. When building the port I thought about using uint instead of int since that would have made a truer APi. The problem is that not a lot of people use uint or even know that it exist so I decided against it. Didn't want ppl to do type casting all the time just to use hashids.

Yes, exceptions in hashids have also been a bit of a "should we follow the other libraries or throw exceptions".

I'll make the documentation more clear! I am currently working (when I have some time over) with converting the entire library to a "Portable Library" to support more platforms.

from hashids.net.

Van-Dame avatar Van-Dame commented on May 31, 2024

Negative values are still a PITA when using this library. Can you consider extending the usage to uint and ulong parameters as well? Thanks!

from hashids.net.

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.