1234567891011121314151617181920 |
- var toNumber = require('./toNumber');
- 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;
|