summaryrefslogtreecommitdiff
path: root/bin/wiki/ImportarDesdeURL/node_modules/lodash/_createRelationalOperation.js
diff options
context:
space:
mode:
Diffstat (limited to 'bin/wiki/ImportarDesdeURL/node_modules/lodash/_createRelationalOperation.js')
-rw-r--r--bin/wiki/ImportarDesdeURL/node_modules/lodash/_createRelationalOperation.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/wiki/ImportarDesdeURL/node_modules/lodash/_createRelationalOperation.js b/bin/wiki/ImportarDesdeURL/node_modules/lodash/_createRelationalOperation.js
new file mode 100644
index 00000000..a17c6b5e
--- /dev/null
+++ b/bin/wiki/ImportarDesdeURL/node_modules/lodash/_createRelationalOperation.js
@@ -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;