1.0.0 • Published 3 years ago
@chzip/lookup v1.0.0
@chzip/lookup
Fast zip code and locality lookups for Switzerland with minimal footprint.
Demo
A demo page for browsers can be found here.
Project repository with detailed instructions here.
Usage
import { Lookup } from "@chzip/lookup";
const baseurl = 'https://znerol.github.io/chzip-js/data'
const chzip = new Lookup(baseurl);
// Lookup zip code (string prefix search)
console.log(await chzip.lookup('zip', 42));
// Lookup city (string prefix search)
console.log(await chzip.lookup('cty', 'bad'));
License
All source code of chzip.js is free software subject to the GPL-3 or later.
1.0.0
3 years ago