BeechCMS / @beechcms/core / normalizeBranchDefinition
Function: normalizeBranchDefinition()
normalizeBranchDefinition(
branch):Record<string,unknown>
Comparable form of one branch definition. Two branches are the same definition iff their canonicalStringify bytes match.
idis dropped, recursively throughfields.requiredOnCreate/requiredOnUpdateomitted ≡false.multipleomitted ≡trueontags(single source of truth:isSingleChoiceTags), ≡falseon every other type.- Every other key, unknown ones included, is copied unchanged:
optionsis compared as declared (values, colors, order).
Parameters
branch
Returns
Record<string, unknown>