norwegian-postalcodes-mapper
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

norwegian-postalcodes-mapper

Mapping from Norwegian postalcodes to city and municipality. The package code is generated automatically with data fetched from https://www.bring.no/postnummerregister-ansi.txt (11.04.2024)

getPostalCodeInfo('XXXX') will return an object with keys 'city' and 'municipality'. If postal code is unknown it will return undefined

Usage:

import { getPostalCodeInfo } from 'norwegian-postalcodes-mapper';

getPostalCodeInfo('2007')?.city // 'KJELLER'
getPostalCodeInfo('2007')?.municipality // 'LILLESTRØM'

getPostalCodeInfo('asdfhdf') // 'undefined'

Package Sidebar

Install

npm i norwegian-postalcodes-mapper

Weekly Downloads

9

Version

1.0.5

License

ISC

Unpacked Size

642 kB

Total Files

11

Last publish

Collaborators

  • mattiasxu