cleanup: remove toBool

Since we decided to use the semantics of the host language, toBool is no longer needed.
This commit is contained in:
vsavkin 2015-01-07 18:38:20 -08:00
parent 77aa3ed61b
commit 6bb3b81465
3 changed files with 1 additions and 10 deletions

View File

@ -11,7 +11,7 @@ import {
RECORD_TYPE_PROPERTY
} from './record';
import {FIELD, IMPLEMENTS, isBlank, isPresent, int, toBool, autoConvertAdd, BaseException,
import {FIELD, IMPLEMENTS, isBlank, isPresent, int, autoConvertAdd, BaseException,
NumberWrapper} from 'facade/lang';
import {List, Map, ListWrapper, MapWrapper, StringMapWrapper} from 'facade/collection';
import {ContextWithVariableBindings} from './parser/context_with_variable_bindings';

View File

@ -27,11 +27,6 @@ class IMPLEMENTS {
bool isPresent(obj) => obj != null;
bool isBlank(obj) => obj == null;
bool toBool(x) {
if (x is bool) return x;
if (x is num) return x != 0;
return false;
}
String stringify(obj) => obj.toString();

View File

@ -27,10 +27,6 @@ export function isBlank(obj):boolean {
return obj === undefined || obj === null;
}
export function toBool(obj) {
return !!obj;
}
export function stringify(token):string {
if (typeof token === 'string') {
return token;