Bump to v4.11.2.

This commit is contained in:
John-David Dalton
2016-04-19 22:00:04 -07:00
parent e93cb815c3
commit ddde027fd9
89 changed files with 1020 additions and 726 deletions

View File

@@ -0,0 +1,20 @@
var toNumber = require('./toNumber');
/**
* Creates a function that performs a relational operation on two values.
*
* @private
* @param {Function} operator The function to perform the operation.
* @returns {Function} Returns the new relational operation function.
*/
function createRelationalOperation(operator) {
return function(value, other) {
if (!(typeof value == 'string' && typeof other == 'string')) {
value = toNumber(value);
other = toNumber(other);
}
return operator(value, other);
};
}
module.exports = createRelationalOperation;