dns-witch.net.eu.org/node_modules/evaluate-value
2025-07-05 18:19:59 +02:00
..
index-es5.js 11ty + RIP DNS Witch EU.ORG service 2025-07-05 18:19:59 +02:00
index-es5.js.map 11ty + RIP DNS Witch EU.ORG service 2025-07-05 18:19:59 +02:00
index.js 11ty + RIP DNS Witch EU.ORG service 2025-07-05 18:19:59 +02:00
LICENSE 11ty + RIP DNS Witch EU.ORG service 2025-07-05 18:19:59 +02:00
package.json 11ty + RIP DNS Witch EU.ORG service 2025-07-05 18:19:59 +02:00
README.md 11ty + RIP DNS Witch EU.ORG service 2025-07-05 18:19:59 +02:00

evaluate-value NPM Version Build Status

Return a value or an evaluated function (with arguments).

  • When the first input argument is a function, it is executed with the remaining arguments, and the result is returned.
  • When the first input argument is not a function, it is simply returned.

Installation

Node.js >= 8 is required. To install, type this at the command line:

npm install evaluate-value

Usage

const evaluateValue = require('evaluate-value');

evaluateValue(true);
//-> true

evaluateValue(() => true);
//-> true

evaluateValue(
  (arg1, arg2) => arg1 === arg2,
  true,
  false
);
//-> false