New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

just-clamp

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

just-clamp - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

12

index.js

@@ -9,3 +9,3 @@ module.exports = clamp;

clamp(0, n, 0); // 0
var n = -2;

@@ -16,8 +16,8 @@ clamp(1, n, 12); // 1

clamp(NaN, n, 8); // NaN
clamp(3, n, NaN); // NaN
clamp(3, NaN, 8); // NaN
clamp(3, n, NaN); // NaN
clamp(3, NaN, 8); // NaN
clamp(undefined, n, 8); // throws
clamp(3, n, 'h'); // throws
clamp(12, false, 8); // throws
clamp(3, n, 'h'); // throws
clamp(12, false, 8); // throws
*/

@@ -29,3 +29,3 @@

}
if (Number.isNaN(b1) || Number.isNaN(n) || Number.isNaN(b2)) {
if (isNaN(b1) || isNaN(n) || isNaN(b2)) {
return NaN;

@@ -32,0 +32,0 @@ }

{
"name": "just-clamp",
"version": "3.0.0",
"version": "3.0.1",
"description": "restrict a number within a range",

@@ -10,11 +10,3 @@ "main": "index.js",

"repository": "https://github.com/angus-c/just",
"keywords": [
"clamp",
"restrict",
"greater",
"less",
"range",
"number",
"just"
],
"keywords": ["clamp", "restrict", "greater", "less", "range", "number", "just"],
"author": "Angus Croll",

@@ -21,0 +13,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc