Fast, efficient, and easy-to-use string extensions for TypeScript.
npm install @ariesclark/extensions
# Or directly, if you only need the string extension.
npm install @ariesclark/string
Parameters:
- value (
T
)
returns: Lowercase
Converts the string to uppercase, alias for value.toUpperCase()
.
Parameters:
- value (
T
)
returns: Uppercase
Converts the first character of a string to uppercase.
Parameters:
- value (
T
)
returns: Capitalize
Converts the first character of a string to lowercase.
Parameters:
- value (
T
)
returns: Uncapitalize
Parameters:
- value (
T
)
returns: string
Parameters:
- value (
T
)
returns: string
Parameters:
- words (
number
) - The number of words to generate.
returns: string
loremIpsum(5); // "Lorem ipsum dolor sit amet"
Parameters:
- value (
T
)
returns: string
Parameters:
- value (
T
)
returns: string
Remove leading & trailing characters from string, default is any whitespace.
Parameters:
- value (
string
) - character (
string
)
returns: string