Saxonberg Server API
    Preparing search index...

    Class ArrayApi

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Element-wise equality. true when both arrays have the same length and every paired element matches under ===.

      Cheap reference-identity short-circuit at the top — equal(a, a) skips the per-element walk.

      Type Parameters

      • T

      Parameters

      • a: readonly T[]
      • b: readonly T[]

      Returns boolean

    • Prefix membership. true when prefix is element-wise equal to the leading slice of full (including the empty-prefix and equal-arrays cases). Element comparison is ===.

      isPrefix([], anything) is true (empty prefix matches everything); isPrefix(x, x) is true (a sequence is a prefix of itself).

      Type Parameters

      • T

      Parameters

      • prefix: readonly T[]
      • full: readonly T[]

      Returns boolean