MCPcopy
hub / github.com/bbc/peaks.js / isLinearGradientColor

Function isLinearGradientColor

src/utils.js:268–277  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

266 */
267
268export function isLinearGradientColor(value) {
269 return isObject(value) &&
270 objectHasProperty(value, 'linearGradientStart') &&
271 objectHasProperty(value, 'linearGradientEnd') &&
272 objectHasProperty(value, 'linearGradientColorStops') &&
273 isNumber(value.linearGradientStart) &&
274 isNumber(value.linearGradientEnd) &&
275 isArray(value.linearGradientColorStops) &&
276 value.linearGradientColorStops.length === 2;
277}
278
279export function getMarkerObject(obj) {
280 while (obj.parent !== null) {

Callers 5

utils-spec.jsFile · 0.90
validatePointOptionsFunction · 0.90
validateSegmentOptionsFunction · 0.90
WaveformShapeFunction · 0.90
waveform-shape.jsFile · 0.90

Calls 4

isObjectFunction · 0.85
objectHasPropertyFunction · 0.85
isNumberFunction · 0.85
isArrayFunction · 0.85

Tested by

no test coverage detected