Developer Documentation
Professional text transformation tools trusted by 50,000+ developers
50K+ Downloads
MIT Licensed
Regular Updates
4.8/5 Rating
npm Package
Yarn Package
🚀 Quick Start
Get started in 30 seconds. Choose your package manager:
npm
// Install
npm install fancy-text-generator
// Usage
const fancyText = require('fancy-text-generator');
console.log(fancyText.bold("Hello World"));
Yarn
// Install
yarn add fancy-text-generator
// Usage
import fancyText from 'fancy-text-generator';
console.log(fancyText.bold("Hello World"));
📚 API Reference
| Method | Description | Example Input | Example Output |
|---|---|---|---|
bold(text) |
Converts text to mathematical bold | Hello | 𝐇𝐞𝐥𝐥𝐨 |
italic(text) |
Converts to mathematical italic | Hello | 𝐻𝑒𝑙𝑙𝑜 |
script(text) |
Script style text transformation | Hello | ℋ𝑒𝓁𝓁𝑜 |
fraktur(text) |
Gothic fraktur style | Hello | 𝔊𝔲𝔱𝔢𝔫 𝔗𝔞𝔤 |
doubleStruck(text) |
Mathematical double-struck | Hello | ℍ𝕖𝕝𝕝𝕠 |
sansSerif(text) |
Clean sans-serif style | Hello | 𝖧𝖾𝗅𝗅𝗈 |
🛠️ Advanced Usage
const fancyText = require('fancy-text-generator');
// Chain multiple styles
const styledText = fancyText.bold(
fancyText.italic("Nested Styles")
);
// Get all available styles
const allStyles = fancyText.getAvailableStyles();
// Custom text transformation
const customStyled = fancyText.transform("Hello", {
style: 'bold',
reverse: true
});
⚡ Performance
- ✅ Zero dependencies
- ✅ Lightweight: 15KB minified
- ✅ Fast: Processes 10K chars in <10ms
- ✅ Memory efficient: No memory leaks
- ✅ Browser & Node.js support
- ✅ TypeScript definitions included
🌐 Web Tool Integration
Our npm package powers the same reliable text transformation as our web tool at thefancytext.com
Web Tool Features:
- 150+ font styles instantly
- Real-time preview
- Copy-paste ready output
- Mobile-optimized interface
npm Package Advantages:
- Programmatic access
- Integration into your apps
- Automation capabilities
- Custom implementations