@zerodep/string-lowerfirst
v2.0.5
Published
A utility to convert the first letter of a string to lowercase
Downloads
12
Readme
@zerodep/string-lowerfirst
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 { stringLowerFirst } from '@zerodep/string-lowerfirst';
// or
const { stringLowerFirst } = require('@zerodep/string-lowerfirst');
Successful Response
stringLowerFirst('California'); // "california"
stringLowerFirst('New York'); // "new York"
stringLowerFirst('vermont'); // "vermont"
Unsuccessful Response
stringLowerFirst({ not: 'a string' }); // throws ZeroDepError: Value is not a string