math-clamp

Clamper

A utility function to limit a value within a specified range

Clamp a number

GitHub

14 stars
7 watching
3 forks
Language: JavaScript
last commit: 12 months ago
Linked from 1 awesome list


Backlinks from these awesome lists:

Related projects:

Repository Description Stars
sindresorhus/cli-cursor Library for controlling the CLI cursor 105
sindresorhus/onetime Ensures a function is only called once by wrapping it in a wrapper function that throws an error if called again 162
sindresorhus/indent-string A utility function to insert consistent indentation into a string 112
sindresorhus/cli-truncate Library to truncate strings to fit terminal widths 86
sindresorhus/round-to A utility library for rounding numbers to specific decimal places 155
sindresorhus/matcher A utility for simple string matching with wildcard patterns 539
sindresorhus/hasha A utility module for computing and manipulating hashes of various types of input data 959
sindresorhus/p-throttle Controls function calls to limit their frequency within a specified time interval 447
sindresorhus/delay Allows delaying promises by a specified amount of time or a random range. 609
sindresorhus/clipboard-cli A tool to access and manipulate the system clipboard across different platforms. 496
sindresorhus/p-limit Limits concurrent execution of promise-returning and async functions. 2,083
sindresorhus/hasha-cli A command-line tool for calculating hashes of input text or files 73
sindresorhus/package-config A tool to get namespaced config from the closest package.json 120
sindresorhus/clipboardy A utility for accessing and manipulating the system clipboard across multiple platforms 1,801
sindresorhus/filled-array Creates an array of specified length filled with a given value or function returning values 43