MCPcopy Create free account
hub / github.com/davestewart/javascript-state-machine / has

Function has

src/core/maps/ValueMap.js:146–154  ·  view source on GitHub ↗
(obj, path, value)

Source from the content-addressed store, hash-verified

144}
145
146export function has(obj, path, value)
147{
148 let parent = get(obj, path);
149 return !! (isArray(parent) && isDefined(value)
150 ? parent.indexOf(value) !== -1
151 : isUndefined(value)
152 ? isDefined(parent)
153 : parent === value);
154}
155
156export function indexOf (obj, path, value)
157{

Callers 1

ValueMap.jsFile · 0.85

Calls 4

isArrayFunction · 0.90
isDefinedFunction · 0.90
isUndefinedFunction · 0.90
getFunction · 0.85

Tested by

no test coverage detected