Skip to content

withoutTrailingSlash

Usage

js
import { withoutTrailingSlash } from '@studiometa/js-toolkit/utils';

withoutTrailingSlash('string/'); // "string"
withoutTrailingSlash('string'); // "string"

Parameters

  • string (string): The string to modify.

Return value

  • string: The modified string.

MIT Licensed