Swiftpack.co - WouterWisse/text-to-emoji as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by WouterWisse.
WouterWisse/text-to-emoji 0.1.0
🤷‍♂️ Not sure why you'd need this.
⭐️ 1
🕓 5 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/WouterWisse/text-to-emoji.git", from: "0.1.0")

text-to-emoji

text-to-🤩
🤷‍♂️ Not sure why you'd need this.

Installation

Xcode → File → Add packages... → enter url → https://github.com/WouterWisse/text-to-emoji

How to use

Get an emoji

let emoji = await TextToEmoji.emoji(for: "tomato") // 🍅

This is an async method that will throw the error noMatchFound if no emoji has been matched with the given text.

Get an emoji for a preferred category

let shrimp = TextToEmoji.emoji(for: "shrimp", preferredCategory: .foodAndDrink) // 🍤
let shrimp = TextToEmoji.emoji(for: "shrimp", preferredCategory: .animalsAndNature) // 🦐

With preferredCategory a certain emoji category can be given a higher priority. This can be very useful if the context of the search is known. For example, when looking for the word shrimp, two matching emoji's could be: 🦐 and 🍤.
By passing .foodAndDrink as the preferredCategory, the first match will be 🍤. Passing .animalsAndNature would result in 🦐.

See EmojiCategory.swift for all categories.

Localization

Languages Supported
🇬🇧 English ✅
🇳🇱 Dutch ✅
🇩🇪 Deutsch ⏳
🇪🇸 Español ⏳
🇫🇷 Français ⏳
🇮🇹 Italiano ⏳
🇵🇹 Português ⏳

Contribution

Feel free to help me out here, especially with the localization.

Keep me caffeinated

Buy me a Coffee

GitHub

link
Stars: 1
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

🥳 0.1.0
6 weeks ago

First release of text-to-emoji. Still an early version with just en and nl localizations with a heavy focus on the food and drink category which is needed for an upcoming app.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics