diff --git a/index.d.ts b/index.d.ts index e1f8c96..469c6d0 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,5 @@ export declare const preferredSaultSteMarieSpelling = "Sault Ste. Marie"; +export declare const canadaPostSaultSteMarieSpelling = "S-STE-MARIE"; /** * Determines whether a word is a spelling of Sault Ste. Marie. * @param {string} possibleSpelling - A possible spelling of Sault Ste. Marie. diff --git a/index.js b/index.js index f3612e7..1da440e 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,5 @@ export const preferredSaultSteMarieSpelling = 'Sault Ste. Marie'; +export const canadaPostSaultSteMarieSpelling = 'S-STE-MARIE'; const lowerCaseSaultSteMarieSpellings = new Set([ 's s marie', 's ste marie', diff --git a/index.ts b/index.ts index c4bbef3..7056afd 100644 --- a/index.ts +++ b/index.ts @@ -1,5 +1,7 @@ export const preferredSaultSteMarieSpelling = 'Sault Ste. Marie' +export const canadaPostSaultSteMarieSpelling = 'S-STE-MARIE' + const lowerCaseSaultSteMarieSpellings = new Set([ 's s marie', 's ste marie', diff --git a/test/test.js b/test/test.js index 817be8a..1c0a3b6 100644 --- a/test/test.js +++ b/test/test.js @@ -11,7 +11,7 @@ describe('isSaultSteMarie()', () => { }); describe('fixSaultSteMarie()', () => { it('Uses the preferred spelling of Sault Ste. Marie', () => { - assert.strictEqual(isSaultSteMarie.fixSaultSteMarie('sault ste marie'), isSaultSteMarie.preferredSaultSteMarieSpelling); + assert.strictEqual(isSaultSteMarie.fixSaultSteMarie(isSaultSteMarie.canadaPostSaultSteMarieSpelling), isSaultSteMarie.preferredSaultSteMarieSpelling); }); it('Uses a given spelling of Sault Ste. Marie', () => { const givenSpelling = 'the soo'; diff --git a/test/test.ts b/test/test.ts index f6a1d1b..30204a1 100644 --- a/test/test.ts +++ b/test/test.ts @@ -16,7 +16,9 @@ describe('isSaultSteMarie()', () => { describe('fixSaultSteMarie()', () => { it('Uses the preferred spelling of Sault Ste. Marie', () => { assert.strictEqual( - isSaultSteMarie.fixSaultSteMarie('sault ste marie'), + isSaultSteMarie.fixSaultSteMarie( + isSaultSteMarie.canadaPostSaultSteMarieSpelling + ), isSaultSteMarie.preferredSaultSteMarieSpelling ) })