I just randomly stumbled upon a #javascript library, the only job of which is returning the value of MAX_UINT8, being 255. It has tests, coverage tests, and browser support tests, all of which pull their own libraries. Jesus Christ.
https://github.com/const-io/max-uint8
It also appears to have a build error, which is just the cherry on top.
@Amikke someone probably had a homework assignment to make an npm module and forgot it was due and cranked that bad boy out 5 minutes before due date. I would imagine GitHub is 99% just that. But maybe I'll fork it later and give it the ability to return results in binary just to randomly blow someone's mind. 😂
@Amikke fair enough, but if somebodies biggest concern is testing this constant against every browser ever. It's possible to test them algorithmically without creating dependencies that might accidentally end up in production code. I haven't seen many people create projects that only QA gets a test version that verifies constants. I can see the concern though cause of the get() and set() methods in objects that create hells possible like (a == 1, a == 2, a == 3) // true. But I've been cranking JS algorithms for an eternity and unless you're crafting either some freaky new encryption that's unstandardized, which is actually good practice. I'm not sure where anybody would need this. There's the fringe possibility the application runs in a NodeMCU which isn't using a browser at all but still executing front end code as middleware, but again, the developer would know that's going to happen and just read the documentation for the environment.