2.0.5 • Published 2 months ago

@zerodep/string-trimright v2.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

@zerodep/string-trimright

version language types license

CodeFactor Known Vulnerabilities

A utility to remove a specific character from the start and end 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 { stringTrimRight } from '@zerodep/string-trimright';
// or
const { stringTrimRight } = require('@zerodep/string-trimright');

Using Default Space Separator

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

Using Custom Separator

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

Unsuccessful Response

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

2 months ago

2.0.4

2 months ago

2.0.3

7 months ago

2.0.1

10 months ago