refactor(facade): refactor type check function - is*()

This commit is contained in:
Victor Berchet
2015-06-11 19:32:55 +02:00
parent 37fceda7e8
commit cdfb635737
17 changed files with 52 additions and 40 deletions

View File

@ -23,7 +23,7 @@ import {
} from 'angular2/src/change_detection/parser/ast';
import {StringWrapper, RegExpWrapper, isPresent} from 'angular2/src/facade/lang';
import {StringWrapper, RegExpWrapper, isPresent, isString} from 'angular2/src/facade/lang';
var quoteRegExp = RegExpWrapper.create('"');
@ -150,7 +150,7 @@ export class Unparser implements AstVisitor {
}
visitLiteralPrimitive(ast: LiteralPrimitive) {
if (StringWrapper.isString(ast.value)) {
if (isString(ast.value)) {
this._expression += `"${StringWrapper.replaceAll(ast.value, quoteRegExp, '\"')}"`;
} else {
this._expression += `${ast.value}`;