MCPcopy Create free account
hub / github.com/idank/explainshell / setPositiveNumber

Function setPositiveNumber

explainshell/web/static/js/jquery.js:7016–7022  ·  view source on GitHub ↗
( elem, value, subtract )

Source from the content-addressed store, hash-verified

7014}
7015
7016function setPositiveNumber( elem, value, subtract ) {
7017 var matches = rnumsplit.exec( value );
7018 return matches ?
7019 // Guard against undefined "subtract", e.g., when used as in cssHooks
7020 Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
7021 value;
7022}
7023
7024function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
7025 var i = extra === ( isBorderBox ? "border" : "content" ) ?

Callers 1

jquery.jsFile · 0.85

Calls 1

execMethod · 0.45

Tested by

no test coverage detected