Apply template string transform.

This commit is contained in:
John-David Dalton
2017-01-06 18:02:01 -08:00
parent 41ad5e901f
commit 4c881b2726
24 changed files with 132 additions and 132 deletions

View File

@@ -51,7 +51,7 @@ function toNumber(value) {
}
if (isObject(value)) {
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
value = isObject(other) ? `${ other }` : other;
}
if (typeof value != 'string') {
return value === 0 ? value : +value;