utils

API / publicodes / utils

Experimental

Contains utilities to manipulate publicodes rules by name.

Index

Functions

FunctionDescription
contextNameToDottedNameReturn dottedName from contextName
cyclicDependenciesThis function is useful so as to print the dependencies at each node of the cycle. ⚠️ Indeed, the findCycles function returns the cycle found using the Tarjan method, which is not necessarily the smallest cycle. However, the smallest cycle is more readable.
decodeRuleNameDecodes an encoded dottedName.
disambiguateReference-
disambiguateReferenceNode-
encodeRuleNameEncodes a dottedName for the URL to be secure.
findCommonAncestorFinds the common ancestor of two dottedName
getChildrenRulesReturns an array of all child rules of a dottedName
isAccessibleCheck wether a rule is accessible from a namespace.
isExperimentalCheck wether a rule is tagged as experimental.
nameLeafReturns the last part of a dottedName (the leaf).
ruleParentReturns the parent dottedName
ruleParentsReturns an array of dottedName from near parent to far parent.
ruleWithDedicatedDocumentationPage-
updateReferencesMapsFromReferenceNode-