MCPcopy Index your code
hub / github.com/JsAaron/jQuery / setPositiveNumber

Function setPositiveNumber

2.0.3/Css.js:337–343  ·  view source on GitHub ↗
(elem, value, subtract)

Source from the content-addressed store, hash-verified

335
336
337 function setPositiveNumber(elem, value, subtract) {
338 var matches = rnumsplit.exec(value);
339 return matches ?
340 // Guard against undefined "subtract", e.g., when used as in cssHooks
341 Math.max(0, matches[1] - (subtract || 0)) + (matches[2] || "px") :
342 value;
343 }
344
345 function augmentWidthOrHeight(elem, name, extra, isBorderBox, styles) {
346 var i = extra === (isBorderBox ? "border" : "content") ?

Callers 1

Css.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected