feat(facade): add isMap method
This commit is contained in:
parent
d5195d4097
commit
548f3dd5cc
@ -26,6 +26,7 @@ bool isBlank(obj) => obj == null;
|
|||||||
bool isString(obj) => obj is String;
|
bool isString(obj) => obj is String;
|
||||||
bool isFunction(obj) => obj is Function;
|
bool isFunction(obj) => obj is Function;
|
||||||
bool isType(obj) => obj is Type;
|
bool isType(obj) => obj is Type;
|
||||||
|
bool isMap(obj) => obj is Map;
|
||||||
|
|
||||||
String stringify(obj) => obj.toString();
|
String stringify(obj) => obj.toString();
|
||||||
|
|
||||||
|
@ -75,6 +75,10 @@ export function isType(obj): boolean {
|
|||||||
return isFunction(obj);
|
return isFunction(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function isMap(obj): boolean {
|
||||||
|
return typeof obj === 'object' && obj !== null;
|
||||||
|
}
|
||||||
|
|
||||||
export function stringify(token): string {
|
export function stringify(token): string {
|
||||||
if (typeof token === 'string') {
|
if (typeof token === 'string') {
|
||||||
return token;
|
return token;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user