domain-glossary-postcode
v1.0.1
Published
a glossary of intuitive, universally unambiguous postcode definitions and procedures
Downloads
151
Readme
domain-glossary-postcode
A glossary of intuitive, universally unambiguous postcode definitions and procedures.
purpose
enable static-type checks for postcodes
Postcode
=AsOfGlossary<string, 'Postcode'>
isPostcode
declare useful procedures to operate on postcodes
- e.g.,
getCentroidOfPostcode
install
npm install domain-glossary-postcode
use
Postcode
declare that a given variable is a postcode
const postcode: Postcode;
assure that a given string is a postcode
const postcode: Postcode = isPostcode.assure('33127');
get the geocode of a postcode
const centroid: Geocode = getCentroidOfPostcode('33127')