capitalise-post-town
v3.0.1
Published
Capitalise UK post towns correctly
Downloads
18,170
Maintainers
Readme
Capitalise UK Post Towns
Small JavaScript library and test suite that will properly capitalise post town names
Takes into account odd peculiar naming rules and exceptions
Input needs to be correctly spaced and/or hyphenated
Links
Install
npm install capitalise-post-town
Usage
const { capitalisePostTown } = require("capitalise-post-town");
// Simple Case
capitalisePostTown("DRYBROOK") // => Drybrook
// Hypenated
capitalisePostTown("HENLEY-IN-ARDEN") // => Henley-in-Arden
// Minor uncapitalised words
capitalisePostTown("WALTON on THE naze") // => Walton on the Naze
// Exception
capitalisePostTown("BO'NESS") // => Bo'Ness
capitalisePostTown("BFPO") // => BFPO
Licence
MIT