@hylid/env
Advanced tools
Comparing version 4.0.26-alpha.1 to 4.0.26
@@ -30,2 +30,5 @@ import { CLIENT } from "../constants"; | ||
match: [/MPay/] | ||
}, { | ||
name: CLIENT.HIPAY, | ||
match: [/hipay/] | ||
}]; |
@@ -0,1 +1,11 @@ | ||
var __assign = this && this.__assign || function () { | ||
__assign = Object.assign || function (t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
export function isMP() { | ||
@@ -53,11 +63,7 @@ // @ts-ignore | ||
} | ||
var cached = localStorage.getItem('__hy_env__'); | ||
// 兼容 cross-bridge 和 hylid-bridge 共存的情况 | ||
if (!cached) { | ||
var crossBridgeStorage = localStorage.getItem('_CB__app__'); | ||
return crossBridgeStorage ? { | ||
client: crossBridgeStorage | ||
} : {}; | ||
} | ||
return cached ? JSON.parse(cached) : {}; | ||
var cached = JSON.parse(localStorage.getItem('__hy_env__') || '{}'); | ||
var crossBridgeStorage = localStorage.getItem('_CB__app__'); | ||
return crossBridgeStorage ? __assign(__assign({}, cached), { | ||
client: crossBridgeStorage | ||
}) : cached; | ||
} |
@@ -1,1 +0,1 @@ | ||
export default '4.0.26-alpha.0'; | ||
export default '4.0.26'; |
{ | ||
"name": "@hylid/env", | ||
"version": "4.0.26-alpha.1", | ||
"version": "4.0.26", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "files": [ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
12153
373
1