0.1.2 • Published 7 years ago
text-transform v0.1.2
text-transform
Tiny library to transform text with CSS-like properties. Great for transforming text in environments whre the full CSS spec might not be available to you, such as Node.js or React Native.
Get Started
npm i text-transformimport { textTransform } from 'text-transform';Or if you're not using ES6 imports, you can require like so:
const { textTransform } = require('text-transform');Usage
// textTransform(text: string, type: string);
let a = textTransform('My String', 'uppercase');
// MY STRINGAvailable Types
uppercase- Converts all to uppercaselowercase- Converts all to lowercasetitle- Capitalizes first letter of each word in stringcapitalize- Capitalizes first letter of stringinitial- Returns original string