MCPcopy
hub / github.com/KilledByAPixel/LittleJS / isColor

Function isColor

src/engineMath.js:871–871  ·  view source on GitHub ↗

* Check if object is a valid Color * @param {any} c * @return {boolean} * @memberof Math

(c)

Source from the content-addressed store, hash-verified

869 * @return {boolean}
870 * @memberof Math */
871function isColor(c) { return c instanceof Color && c.isValid(); }
872
873// color asserts
874function ASSERT_COLOR_VALID(c) { ASSERT(isColor(c), 'Color is invalid.', c); }

Callers 15

util.test.mjsFile · 0.90
debugRectFunction · 0.85
debugPolyFunction · 0.85
debugCircleFunction · 0.85
debugTextFunction · 0.85
drawTileFunction · 0.85
drawRectGradientFunction · 0.85
drawTextureWrappedFunction · 0.85
drawLineListFunction · 0.85
drawPolyFunction · 0.85
drawEllipseFunction · 0.85
drawEllipseGradientFunction · 0.85

Calls 1

isValidMethod · 0.45

Tested by

no test coverage detected