Miss any of our Open RFC calls?Watch the recordings here! »

capitalise-post-town

2.0.3 • Public • Published

CircleCI Coverage Status Dependencies Size

Capitalise UK Post Towns

Try capitalise-post-town on RunKit

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

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

License

MIT

Install

npm i capitalise-post-town

DownloadsWeekly Downloads

130

Version

2.0.3

License

MIT

Unpacked Size

7.1 kB

Total Files

7

Last publish

Collaborators

  • avatar