Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@molejs/global-helper
Advanced tools
``` /** * 获取BSGlobal中值 */ getBSGlobal(key: string, defaultV?: any) { return BSGlobal[key] || defaultV; }, /** * 获取租户信息 */ getTenantInfo(key?: string) { return this.getBSGlobal(key || 'tenantInfo'); }, /** * 获取用户信息 */
/**
* 获取BSGlobal中值
*/
getBSGlobal(key: string, defaultV?: any) {
return BSGlobal[key] || defaultV;
},
/**
* 获取租户信息
*/
getTenantInfo(key?: string) {
return this.getBSGlobal(key || 'tenantInfo');
},
/**
* 获取用户信息
*/
getUserInfo(key?: string): any {
return this.getBSGlobal(key || 'loginUserInfo');
},
/**
* 获取用户Id
*/
getUserId() {
const user = this.getUserInfo()
return user.Id || user.UserId || user.id;
},
/**
* 用户租户Id
*/
getTenantId() {
const tenant = this.getTenantInfo();
return tenant.Id || tenant.tenant_id || tenant.tenantId;
},
/**
* 获取环境标识
*/
getEnv() {
const env = this.getBSGlobal('env');
return {
get isProduction() {
return /production/ig.test(env);
},
get isDevelopment() {
return /development/ig.test(env) || /develop/ig.test(env);
},
get isTesting() {
return /test/ig.test(env)
}
};
},
// 获取协议
getProtocol() {
return window.location.protocol;
},
FAQs
``` /** * 获取BSGlobal中值 */ getBSGlobal(key: string, defaultV?: any) { return BSGlobal[key] || defaultV; }, /** * 获取租户信息 */ getTenantInfo(key?: string) { return this.getBSGlobal(key || 'tenantInfo'); }, /** * 获取用户信息 */
The npm package @molejs/global-helper receives a total of 2 weekly downloads. As such, @molejs/global-helper popularity was classified as not popular.
We found that @molejs/global-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.