@n3okill/utils
Version:
Many javascript helpers
12 lines • 431 B
JavaScript
import { trimLeft } from "./trimLeft";
import { trimRight } from "./trimRight";
/**
* Remove given characters from left and right side of the string
* @param str Buffer to remove characters from
* @param chars The characters to remove, if not defined removes empty spaces
* @returns Trimmed Buffer
*/
export function trim(str, chars = []) {
return trimLeft(trimRight(str, chars), chars);
}
//# sourceMappingURL=trim.js.map