weasel API - v0.8.0
    Preparing search index...

    Function describeRule

    • Render a Rule as a short human-readable string, for inspectors and diagnostics that need to say WHICH rule decided something.

      { capability: 'edits-page' }               → capability:edits-page
      { all: [{ mode: 'normal' }, { focused: true }] } → all(mode:normal, focused:true)
      { not: { selection: { empty: true } } } → not(selection:empty=true)
      { when: function hasPath() { … } } → when(hasPath)

      Never throws and always terminates — unlike JSON.stringify, which throws on a cyclic value and renders the when arm as a useless {}.

      Parameters

      Returns string