@liuhlightning/wx-pay
Version:
communicate to wx pay
13 lines • 403 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeUrl = normalizeUrl;
/**
* 删除 url 中的 hash
*/
function normalizeUrl(url) {
const temp = new URL(url);
const hashIndex = !temp.hash ? -1 : url.indexOf(temp.hash);
//remove hash from url
return hashIndex > 0 ? url.substring(0, hashIndex) : url;
}
//# sourceMappingURL=normalizeUrl.js.map