UNPKG

india-state-district

Version:

A lightweight TypeScript library for handling Indian states and districts data with type safety, geolocation support, and easy integration

33 lines (32 loc) 1.4 kB
/** * Main entry point for the india-state-district package * Exports all public functionality */ import { createIndiaStateDistrict } from "./services/india-state-district.factory"; import { IndiaStateDistrict } from "./services/india-state-district.service"; import { State, StateData, GeolocationResult, GeolocationOptions, GeolocationError } from "./types"; import { INDIA_FLAG_SVG, INDIA_FLAG_COLORS, getIndiaFlagSVG, getIndiaFlagDataUrl } from "./assets/india-flag"; declare const india: IndiaStateDistrict; export declare const getDistricts: (stateCode: string) => string[]; export declare const getAllStates: () => { code: string; name: string; }[]; export declare const getAllStateCodes: () => string[]; export declare const getCurrentState: () => { code: string; name: string; districts: string[]; } | null; export declare const getAllStatesWithDistricts: () => { code: string; name: string; districts: string[]; }[]; export declare const detectStateFromLocation: (options?: GeolocationOptions) => Promise<GeolocationResult>; export declare const isGeolocationSupported: () => boolean; export { createIndiaStateDistrict }; export { IndiaStateDistrict }; export type { State, StateData, GeolocationResult, GeolocationOptions, GeolocationError }; export { INDIA_FLAG_SVG, INDIA_FLAG_COLORS, getIndiaFlagSVG, getIndiaFlagDataUrl, }; export default india;