feat(facade): add isMap method

This commit is contained in:
Brian Ford 2015-05-29 14:19:10 -07:00
parent d5195d4097
commit 548f3dd5cc
2 changed files with 5 additions and 0 deletions

View File

@ -26,6 +26,7 @@ bool isBlank(obj) => obj == null;
bool isString(obj) => obj is String;
bool isFunction(obj) => obj is Function;
bool isType(obj) => obj is Type;
bool isMap(obj) => obj is Map;
String stringify(obj) => obj.toString();

View File

@ -75,6 +75,10 @@ export function isType(obj): boolean {
return isFunction(obj);
}
export function isMap(obj): boolean {
return typeof obj === 'object' && obj !== null;
}
export function stringify(token): string {
if (typeof token === 'string') {
return token;