Commit 6893eb57 6893eb57116d7ec5e239f73bb10933f0cc827e38 by Nicolas Perriault

fixed utils.isTruthy() and utils.isFalsy()

1 parent 940b862f
......@@ -295,7 +295,7 @@ exports.isClipRect = isClipRect;
function isFalsy(subject) {
"use strict";
/*jshint eqeqeq:false*/
return subject == new Function('return false;')();
return !subject;
}
exports.isFalsy = isFalsy;
/**
......@@ -392,7 +392,7 @@ exports.isString = isString;
function isTruthy(subject) {
"use strict";
/*jshint eqeqeq:false*/
return subject == new Function('return true;')();
return !!subject;
}
exports.isTruthy = isTruthy;
......