capitalise-post-town
TypeScript icon, indicating that this package has built-in type declarations

3.0.1 • Public • Published

CI codecov 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

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

Dependencies (0)

    Dev Dependencies (17)

    Package Sidebar

    Install

    npm i capitalise-post-town

    Weekly Downloads

    1,775

    Version

    3.0.1

    License

    MIT

    Unpacked Size

    7.15 kB

    Total Files

    6

    Last publish

    Collaborators

    • cablanchard