@lazy-cjk/str-util-normalize
Version:
17 lines (16 loc) • 789 B
JavaScript
!function(e, o) {
"object" == typeof exports && "undefined" != typeof module ? o(exports) : "function" == typeof define && define.amd ? define([ "exports" ], o) : o((e = "undefined" != typeof globalThis ? globalThis : e || self).LazyCjkStrUtilNormalize = {});
}(this, (function(e) {
"use strict";
const o = [ /[\u2000-\u200F]/g, /[\u2028-\u202F]/g, /[\u205F-\u206F]/g, /\uFEFF/g ];
function normalize(e, n = {}) {
return n.allow_nbsp || (e = e.replace(/\xA0/g, " ")), n.allow_bom || (e = e.replace(/\uFEFF/g, "")),
o.forEach((function(o) {
e = e.replace(o, "");
})), e;
}
e.StripTable = o, e.default = normalize, e.normalize = normalize, Object.defineProperty(e, "__esModule", {
value: !0
});
}));
//# sourceMappingURL=index.umd.production.min.cjs.map