Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cityssm/is-sault-ste-marie
Standardizes the spelling of our beloved city, Sault Ste. Marie.
https://github.com/cityssm/is-sault-ste-marie
sault-ste-marie
Last synced: 27 days ago
JSON representation
Standardizes the spelling of our beloved city, Sault Ste. Marie.
- Host: GitHub
- URL: https://github.com/cityssm/is-sault-ste-marie
- Owner: cityssm
- License: mit
- Created: 2024-03-07T15:53:27.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-11-18T14:51:13.000Z (about 2 months ago)
- Last Synced: 2024-11-24T18:35:26.550Z (about 1 month ago)
- Topics: sault-ste-marie
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@cityssm/is-sault-ste-marie
- Size: 313 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Is Sault Ste. Marie
[![npm (scoped)](https://img.shields.io/npm/v/%40cityssm/is-sault-ste-marie)](https://www.npmjs.com/package/@cityssm/is-sault-ste-marie)
[![DeepSource](https://app.deepsource.com/gh/cityssm/is-sault-ste-marie.svg/?label=active+issues&show_trend=true&token=4oKKC7nU8DJt6p8_gbYnL4im)](https://app.deepsource.com/gh/cityssm/is-sault-ste-marie/)
[![Maintainability](https://api.codeclimate.com/v1/badges/839fac32847d10185de3/maintainability)](https://codeclimate.com/github/cityssm/is-sault-ste-marie/maintainability)
[![codecov](https://codecov.io/gh/cityssm/is-sault-ste-marie/graph/badge.svg?token=PO44KQTK9D)](https://codecov.io/gh/cityssm/is-sault-ste-marie)
[![Coverage Testing](https://github.com/cityssm/is-sault-ste-marie/actions/workflows/coverage.yml/badge.svg)](https://github.com/cityssm/is-sault-ste-marie/actions/workflows/coverage.yml)You know your city name is challenging when it requires
[clarification from the Government of Canada](https://www.noslangues-ourlanguages.gc.ca/en/writing-tips-plus/sault-ste.-marie-soo-saultite.html)
to spell it properly.**This package helps standardize the spelling of our beloved city, Sault Ste. Marie.**
Includes the full spelling, the preferred abbreviated spelling,
common misspellings, and unique spellings from other sources,
like Canada Post and the Ontario Ministry of Transportation.## Installation
```sh
npm install @cityssm/is-sault-ste-marie
```## Usage
```javascript
import { isSaultSteMarie, fixSaultSteMarie } from '@cityssm/is-sault-ste-marie'// Tests whether a string is a spelling of Sault Ste. Marie.
console.log(isSaultSteMarie('Sault Ste. Marie')) // => true
console.log(isSaultSteMarie('Sault-Sainte-Marie')) // => true
console.log(isSaultSteMarie('Toronto')) // => false// Returns a preferred spelling of Sault Ste. Marie, or the original string.
console.log(fixSaultSteMarie('Sault Ste Marie')) // => "Sault Ste. Marie"
console.log(fixSaultSteMarie('Sault-Sainte-Marie')) // => "Sault Ste. Marie"
console.log(fixSaultSteMarie('Sault Ste. Marie', 'The Sault')) // => "The Sault"
console.log(fixSaultSteMarie('Toronto')) // => "Toronto"
```