Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clamp.js

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clamp.js - npm Package Compare versions

Comparing version 0.2.5 to 0.2.7

.codeclimate.yml

4

index.js

@@ -10,3 +10,3 @@ /**

*/
export default function clamp(min, max) {
export default function clamp (min, max) {
// Set min to 0 if only one value specified

@@ -26,5 +26,5 @@ if (typeof max === 'undefined') {

return function(value) {
return function (value) {
return Math.min(Math.max(value, min), max);
};
}
{
"name": "clamp.js",
"version": "0.2.5",
"version": "0.2.7",
"description": "Returns a function that clamps input values to range [min <= x <= max].",

@@ -8,7 +8,11 @@ "main": "lib/index.js",

"clean": "rimraf lib/*",
"lint": "eslint test index.js",
"test": "node test/test.main.js | tap-spec",
"coverage": "babel-node node_modules/.bin/isparta cover test/*.js",
"coveralls": "npm run coverage && coveralls < coverage/lcov.info",
"postcoveralls": "rimraf ./coverage",
"patch": "npm version patch && npm run build && npm publish",
"minor": "npm version minor && npm run build && npm publish",
"major": "npm version major && npm run build && npm publish",
"prebuild": "npm run clean",
"prebuild": "npm run clean && npm run lint & npm run test",
"build": "babel index.js --out-file lib/index.js",

@@ -37,2 +41,8 @@ "postpublish": "git push origin master --follow-tags"

"babel": "latest",
"coveralls": "latest",
"eslint": "latest",
"eslint-config-standard": "latest",
"eslint-plugin-standard": "latest",
"faucet": "latest",
"isparta": "latest",
"rimraf": "latest",

@@ -39,0 +49,0 @@ "tap-spec": "latest",

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