add SettingMapper.not() and fix is() invalid
This commit is contained in:
@ -46,7 +46,11 @@ export default class SettingMapper {
|
|||||||
|
|
||||||
public static is(key: SettingKey | string, args?: { [key: string]: any }): boolean {
|
public static is(key: SettingKey | string, args?: { [key: string]: any }): boolean {
|
||||||
const value = this.getValueRef(key, args).value;
|
const value = this.getValueRef(key, args).value;
|
||||||
return !value && value === 'true';
|
return !!value && value === 'true';
|
||||||
|
}
|
||||||
|
|
||||||
|
public static not(key: SettingKey | string, args?: { [key: string]: any }): boolean {
|
||||||
|
return !this.is(key, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getValue(key: SettingKey | string, args?: { [key: string]: any }): string | undefined {
|
public static getValue(key: SettingKey | string, args?: { [key: string]: any }): string | undefined {
|
||||||
|
|||||||
Reference in New Issue
Block a user