isAccessible

API / publicodes / utils / isAccessible

function isAccessible(
   rules, 
   contextName, 
   name): boolean

Experimental

Check wether a rule is accessible from a namespace.

Takes into account that some namespace can be private, i.e. that they can only be accessed by immediate parent, children or siblings.

Parameters

ParameterTypeDescription
rulesParsedRulesThe parsed rules
contextNamestringThe context of the call
namestringThe namespace checked for accessibility

Returns

boolean

Defined in

packages/core/src/ruleUtils.ts:100