exiftool-vendored
    Preparing search index...

    Function isZone

    • Type guard to check if a value is a valid Luxon Zone instance.

      Note that this includes the UnsetZone sentinel value.

      Checks both instanceof Zone and constructor name to handle cross-module Zone instances that may not pass instanceof checks.

      Parameters

      • value: unknown

        Value to check

      Returns value is Zone<true>

      true if the value is a Zone instance (type guard)

      import { Info } from "luxon"

      const zone = Info.normalizeZone("UTC+8")
      if (isZone(zone)) {
      // TypeScript knows zone is Zone (not unknown)
      console.log(zone.offset(Date.now()))
      }

      isZone(Info.normalizeZone("UTC")) // true
      isZone("UTC") // false
      isZone(480) // false
      isZone(null) // false