@anzaui/engine - v0.6.0
    Preparing search index...

    Function validName

    • Whether name is a well-formed template name.

      Parameters

      • name: string

        The name to check.

      Returns boolean

      true when name is well-formed.

      A template name is a relative, /-separated path under the template root: not empty, no leading /, no backslash or NUL, and no empty, . or .. segment. Names are only ever looked up in the in-memory cache, so request input never reaches the filesystem (see the Engine Contract).

      validName('feed/card.html');   // true
      validName('../secret.html'); // false
      validName('/abs.html'); // false