A utility to remove a specific character from the start of a string. 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 { stringTrimLeft } from '@zerodep/string-trimleft';
// or
const { stringTrimLeft } = require('@zerodep/string-trimleft');
stringTrimLeft(' some string '); // "some string "
stringTrimLeft('xx some string xx', 'x'); // " some string xx"
stringTrimLeft({ not: 'a string' }); // throws ZeroDepError: Value is not a string