str-capitalize
v1.0.4
Published
capitalize any character in a string
Downloads
2
Readme
Import in your project (no commonJs support currently - use es5 import)
const { capitalize } = require('str-capitalize');
Call capitalize(str)
and pass an optional index for the character you want to capitalize.
Example:
capitalize('mystring')
will output 'Mystring', since no index is passed, it defaults to 0 index character.
capitalize(''mystring'', 2)
will output 'myString' and so on.