MCPcopy Create free account
hub / github.com/tree-sitter/tree-sitter-javascript / setPositiveNumber

Function setPositiveNumber

examples/jquery.js:5734–5740  ·  view source on GitHub ↗
( elem, value, subtract )

Source from the content-addressed store, hash-verified

5732}
5733
5734function setPositiveNumber( elem, value, subtract ) {
5735 var matches = rnumsplit.exec( value );
5736 return matches ?
5737 // Guard against undefined "subtract", e.g., when used as in cssHooks
5738 Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
5739 value;
5740}
5741
5742function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
5743 var i = extra === ( isBorderBox ? "border" : "content" ) ?

Callers 1

jquery.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…