@zerodep/string-trimleft
TypeScript icon, indicating that this package has built-in type declarations

2.0.5 • Public • Published

@zerodep/string-trimleft

version language types license

CodeFactor Known Vulnerabilities

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.

Examples

All @zerodep packages support both ESM and CJS.

import { stringTrimLeft } from '@zerodep/string-trimleft';
// or
const { stringTrimLeft } = require('@zerodep/string-trimleft');

Using Default Space Separator

stringTrimLeft('   some string   '); // "some string   "

Using Custom Separator

stringTrimLeft('xx some string  xx', 'x'); // " some string  xx"

Unsuccessful Response

stringTrimLeft({ not: 'a string' }); // throws ZeroDepError: Value is not a string

Readme

Keywords

Package Sidebar

Install

npm i @zerodep/string-trimleft

Homepage

zerodep.app

Weekly Downloads

0

Version

2.0.5

License

MIT

Unpacked Size

6.43 kB

Total Files

7

Last publish

Collaborators

  • cdepage