UNPKG

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.

12 lines (11 loc) 361 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.batchEncode = batchEncode; exports.batchDecode = batchDecode; const core_1 = require("./core"); function batchEncode(coords) { return coords.map(c => (0, core_1.getDigiPin)(c.lat, c.lng)); } function batchDecode(pins) { return pins.map(core_1.getLatLngFromDigiPin); }