Comparing version 0.2.5 to 0.2.7
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6636
8
10