Skip to content

withTrailingSlash

Usage

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

withTrailingSlash('string'); // "string/"
withTrailingSlash('string/'); // "string/"

Parameters

  • string (string): The string to modify.

Return value

  • string: The modified string.

MIT Licensed