nepali-address - v1.0.5
    Preparing search index...

    Function getDistrictByPostcode

    • Retrieves a district by its 5-digit post code.

      Parameters

      • postcode: string

        The 5-digit postal code (e.g., "44600").

      Returns District | undefined

      The district object if found, otherwise undefined.

      import { getDistrictByPostcode } from 'nepali-address';

      const district = getDistrictByPostcode("44600");
      // → { id: 306, name: 'Kathmandu', ... }

      const missing = getDistrictByPostcode("00000");
      // → undefined