
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
@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'); }, /** * 获取用户信息 */
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
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated “elf-*” npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Security News
TypeScript 6.0 will be the last JavaScript-based major release, as the project shifts to the TypeScript 7 native toolchain with major build speedups.