feat(facade): add isType method

This commit is contained in:
Brian Ford 2015-04-15 17:56:14 -07:00
parent 15376a6d24
commit e617ca6323
3 changed files with 9 additions and 0 deletions

View File

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

View File

@ -42,6 +42,10 @@ export function isFunction(obj):boolean {
return typeof obj === "function";
}
export function isType(obj):boolean {
return isFunction(obj);
}
export function stringify(token):string {
if (typeof token === 'string') {
return token;

View File

@ -48,6 +48,10 @@ export function isFunction(obj): boolean {
return typeof obj === "function";
}
export function isType(obj): boolean {
return isFunction(obj);
}
export function stringify(token): string {
if (typeof token === 'string') {
return token;