refactor: Drop.prototype.value => valueOf

This commit is contained in:
harttle
2019-02-28 00:05:08 +08:00
parent d0118402e4
commit d5b9916b2f
5 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -74,7 +74,7 @@ export function parseExp (exp: string, scope: Scope): any {
export function evalExp (str: string, scope: Scope): any {
const value = parseExp(str, scope)
return isDrop(value) ? value.value() : value
return isDrop(value) ? value.valueOf() : value
}
function parseValue (str: string, scope: Scope): any {
@@ -93,7 +93,7 @@ function parseValue (str: string, scope: Scope): any {
export function evalValue (str: string, scope: Scope): any {
const value = parseValue(str, scope)
return isDrop(value) ? value.value() : value
return isDrop(value) ? value.valueOf() : value
}
export function isTruthy (val: any): boolean {