diff --git a/modules/angular2/src/facade/lang.dart b/modules/angular2/src/facade/lang.dart index 0978340ccc..9526fecaca 100644 --- a/modules/angular2/src/facade/lang.dart +++ b/modules/angular2/src/facade/lang.dart @@ -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(); diff --git a/modules/angular2/src/facade/lang.es6 b/modules/angular2/src/facade/lang.es6 index 258af0f3cd..73999c81ea 100644 --- a/modules/angular2/src/facade/lang.es6 +++ b/modules/angular2/src/facade/lang.es6 @@ -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; diff --git a/modules/angular2/src/facade/lang.ts b/modules/angular2/src/facade/lang.ts index dda14555ae..56b4448f54 100644 --- a/modules/angular2/src/facade/lang.ts +++ b/modules/angular2/src/facade/lang.ts @@ -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;