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