String Extensions
v0.1.0
The String Extension methods extend the global String Object´s Prototype.
Usage
Import the extensions part as early as possible to make sure the global Object Prototypes are extended.
Your IDE might offer the typing without importing this init function as they are declared globally.
import { initStringExtensions } from '@oardi/ts-utils';
initStringExtensions();
capitalize
const myText = 'my text';
myText.capitalize(); // 'My text'
isNumber
const myText = 'my text';
myText.isNumber(); // false
isEmpty
const myText = 'my text';
myText.isEmpty(); // false
stripTags
const myText = '<b>my text</b>';
myText.stripTags(); // my text Previous: Extensions
← Date ExtensionNext: Helpers
BreakPoint Helper →