tpmjs/packages/tools/emoji-magic
Ajax Davis 74811cc269 fix(emoji-magic): add defensive checks for missing required parameters
- Add validation in both textToEmoji and emojiMood to handle missing text parameter
- Return descriptive error instead of crashing with undefined error
- Bump to v0.2.1
2025-12-05 00:51:24 +10:00
..
src fix(emoji-magic): add defensive checks for missing required parameters 2025-12-05 00:51:24 +10:00
CHANGELOG.md chore: release emoji-magic v0.2.0 and create-basic-tools v1.0.4 2025-12-05 00:10:18 +10:00
package.json fix(emoji-magic): add defensive checks for missing required parameters 2025-12-05 00:51:24 +10:00
README.md chore: release emoji-magic v0.2.0 and create-basic-tools v1.0.4 2025-12-05 00:10:18 +10:00
tsconfig.json chore: release emoji-magic v0.2.0 and create-basic-tools v1.0.4 2025-12-05 00:10:18 +10:00

@tpmjs/emoji-magic

AI SDK tools for emoji conversion and mood detection. Make your text more expressive!

Tools

textToEmoji

Convert text into emoji representations - perfect for making messages more expressive!

import { textToEmoji } from '@tpmjs/emoji-magic';

const result = await textToEmoji.execute({
  text: "I love my cat and dog",
  style: 'creative'
});
// Result: "I ❤️ my 🐱 and 🐶"

emojiMood

Detect the mood/sentiment and suggest appropriate emojis for the text.

import { emojiMood } from '@tpmjs/emoji-magic';

const result = await emojiMood.execute({
  text: "This is amazing! I'm so excited!",
  count: 3
});
// Returns: { mood: 'excited', suggestions: ['🎉', '🎊', '🥳'] }

Installation

npm install @tpmjs/emoji-magic

License

MIT