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.
All @zerodep packages support both ESM and CJS.
import { stringUpperFirst } from '@zerodep/string-upperfirst';
// or
const { stringUpperFirst } = require('@zerodep/string-upperfirst');
stringUpperFirst('california'); // "California"
stringUpperFirst('new york'); // "New york"
stringUpperFirst('Vermont'); // "Vermont"
stringUpperFirst({ not: 'a string' }); // throws ZeroDepError: Value is not a string