digipinjs
Version:
A comprehensive TypeScript library for encoding and decoding Indian geographic coordinates into DIGIPIN format (Indian Postal Digital PIN system). Features CLI tools, caching, batch processing, and Express middleware for seamless integration.
15 lines • 938 B
TypeScript
import { type DecodeOptions } from './core';
import type { Coordinates } from './cache';
export type PinInput = string | Coordinates;
export declare function getDistance(start: PinInput, end: PinInput, accuracy?: number, decodeOptions?: DecodeOptions): number;
export declare function getPreciseDistance(start: PinInput, end: PinInput, accuracy?: number, decodeOptions?: DecodeOptions): number;
export interface DistanceOrderOptions {
accuracy?: number;
decodeOptions?: DecodeOptions;
distanceFn?: (start: Coordinates, end: Coordinates) => number;
}
export declare function orderByDistance<T extends PinInput>(reference: PinInput, pins: readonly T[], options?: DistanceOrderOptions): T[];
export interface NearestOptions extends DistanceOrderOptions {
}
export declare function findNearest<T extends PinInput>(reference: PinInput, pins: readonly T[], options?: NearestOptions): T | undefined;
//# sourceMappingURL=geo.d.ts.map