diginext-utils
Version:
README.md
14 lines • 342 B
JavaScript
import trim from "lodash/trim.js";
export function trimNull(str) {
if (!str)
return "";
str = str.toString();
str = str.replace(/\0/g, "");
while (str.indexOf(" ") >= 0) {
str = str.replace(/ /g, " ");
}
str = trim(str);
return str;
}
export default trimNull;
//# sourceMappingURL=trimNull.js.map