Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Number clamp

Restrict a numeric value to a specific inclusive range. If you are coming from Python, think of it like a max(min(val, high), low) one-liner, but with explicit type safety and clear bounds checking.

This implementation relies strictly on the TypeScript standard library. You get zero external dependencies and no backend services to configure.

clamp.ts

Check out the test suite located right next to the source file. It provides concrete usage patterns and edge cases to get you started.

About

Clamp a number to an inclusive range with clear bounds checking.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages