MCPcopy Create free account
hub / github.com/ReactiveX/rxjs / boolFromValue

Function boolFromValue

apps/rxjs.dev/src/app/shared/attribute-utils.ts:42–44  ·  view source on GitHub ↗
(attrValue: string | undefined, def: boolean = false)

Source from the content-addressed store, hash-verified

40 * @param def Default boolean value when attribute is undefined.
41 */
42export function boolFromValue(attrValue: string | undefined, def: boolean = false) {
43 return attrValue === undefined ? def : attrValue.trim() !== 'false';
44}
45
46/**
47 * Return the boolean state of attribute from an element

Callers 4

getEnableDownloadMethod · 0.90
getModeMethod · 0.90
getBoolFromAttributeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected