Remix.run Logo
goranmoomin 11 hours ago

> So are you saying the author updated the implementation and added deprecation warning?

As far as I understand, the author wrote the clamp function by themselves. There is no clamp library that the author is arguing against.

In fact, it seems the library ‘clamp’ in npm is a library that does exactly what the author wants – no validation, assuming that the value is a number, and just returning a number.[0]

[0]: https://github.com/hughsk/clamp/blob/master/index.js

throwaway290 11 hours ago | parent [-]

I mean isnumber, isarray, that sort of stuff you were talking about. Maybe clamp is the exception if there is no builtin way to do it in js