UNPKG

es-toolkit

Version:

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

16 lines (11 loc) 360 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const trimEnd = require('./trimEnd.js'); const trimStart = require('./trimStart.js'); function trim(str, chars) { if (chars === undefined) { return str.trim(); } return trimStart.trimStart(trimEnd.trimEnd(str, chars), chars); } exports.trim = trim;