1
0
Fork 0
Code Issues Pull requests Projects Releases 2 Packages Wiki Activity Actions Pages

Add JavaScript and TypeScript reference adapter

This commit is contained in:
Andraxion 2026-07-29 14:39:53 -04:00
parent cb52bf8ae6
commit 58c0196be5
11 changed files with 1341 additions and 0 deletions

View file

@ -0,0 +1,11 @@
export const DEFAULT_LIMIT = 3;
export function clamp(value, limit = DEFAULT_LIMIT) {
if (value < 0) {
return 0;
}
if (value > limit) {
return limit;
}
return value;
}