@zerodep/string-upperfirst
v2.0.5
Published
A utility to convert the first letter of a string to uppercase
Downloads
13
Readme
@zerodep/string-upperfirst
A utility to convert the first letter of a provided string to a lowercase value. Non-string values will cause a ZeroDepError
to be thrown.
Full documentation is available at the zerodep.app page.
Examples
All @zerodep packages support both ESM and CJS.
import { stringUpperFirst } from '@zerodep/string-upperfirst';
// or
const { stringUpperFirst } = require('@zerodep/string-upperfirst');
Successful Response
stringUpperFirst('california'); // "California"
stringUpperFirst('new york'); // "New york"
stringUpperFirst('Vermont'); // "Vermont"
Unsuccessful Response
stringUpperFirst({ not: 'a string' }); // throws ZeroDepError: Value is not a string