https://github.com/binarybirds/plural-kit
https://github.com/binarybirds/plural-kit
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/binarybirds/plural-kit
- Owner: BinaryBirds
- License: mit
- Created: 2021-02-12T10:04:38.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-12T10:40:12.000Z (over 5 years ago)
- Last Synced: 2025-03-19T13:17:13.314Z (about 1 year ago)
- Language: Swift
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PluralKit
This package is an Swift 5, SPM compatible version on the [Pluralize.swift](https://github.com/joshualat/Pluralize.swift) library.
## Install
Add the repository as a dependency:
```
.package(url: "https://github.com/binarybirds/plural-kit.git", from: "1.0.0"),
```
Add ViperKit to the target dependencies:
```
.product(name: "PluralKit", package: "plural-kit"),
```
Update the packages and you are ready.
## Usage
PluralKit uses a string extension method.
```swift
import PluralKit
/// categories
print("category".pluralized())
/// add water to the shared library
PluralKit.shared.uncountable(word: "water")
print("water".pluralized())
```
Please refer to the [original repository](https://github.com/joshualat/Pluralize.swift) for more info.