source:
node_modules/es-toolkit/dist/string/trim.mjs
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 249 bytes | |
| Rev | Line | |
|---|---|---|
| [a762898] | 1 | import { trimEnd } from './trimEnd.mjs'; |
| 2 | import { trimStart } from './trimStart.mjs'; | |
| 3 | ||
| 4 | function trim(str, chars) { | |
| 5 | if (chars === undefined) { | |
| 6 | return str.trim(); | |
| 7 | } | |
| 8 | return trimStart(trimEnd(str, chars), chars); | |
| 9 | } | |
| 10 | ||
| 11 | export { trim }; |
Note:
See TracBrowser
for help on using the repository browser.
