UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

18 lines (13 loc) 412 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const trimEnd$1 = require('../../string/trimEnd.js'); function trimEnd(str, chars, guard) { if (str == null) { return ''; } if (guard != null || chars == null) { return str.toString().trimEnd(); } return trimEnd$1.trimEnd(str, chars.toString().split('')); } exports.trimEnd = trimEnd;