summaryrefslogtreecommitdiff
path: root/node_modules/evaluate-value/README.md
diff options
context:
space:
mode:
authorShipwreckt <me@shipwreckt.co.uk>2025-10-31 20:02:14 +0000
committerShipwreckt <me@shipwreckt.co.uk>2025-10-31 20:02:14 +0000
commit7a52ddeba2a68388b544f529d2d92104420f77b0 (patch)
tree15ddd47457a2cb4a96060747437d36474e4f6b4e /node_modules/evaluate-value/README.md
parent53d6ae2b5568437afa5e4995580a3fb679b7b91b (diff)
Changed from static to 11ty!
Diffstat (limited to 'node_modules/evaluate-value/README.md')
-rw-r--r--node_modules/evaluate-value/README.md41
1 files changed, 41 insertions, 0 deletions
diff --git a/node_modules/evaluate-value/README.md b/node_modules/evaluate-value/README.md
new file mode 100644
index 0000000..8f835bb
--- /dev/null
+++ b/node_modules/evaluate-value/README.md
@@ -0,0 +1,41 @@
+# evaluate-value [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
+
+> 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](http://nodejs.org/) `>= 8` is required. To install, type this at the command line:
+```shell
+npm install evaluate-value
+```
+
+
+## Usage
+
+```js
+const evaluateValue = require('evaluate-value');
+
+evaluateValue(true);
+//-> true
+
+evaluateValue(() => true);
+//-> true
+
+evaluateValue(
+ (arg1, arg2) => arg1 === arg2,
+ true,
+ false
+);
+//-> false
+```
+
+
+[npm-image]: https://img.shields.io/npm/v/evaluate-value.svg
+[npm-url]: https://npmjs.com/package/evaluate-value
+[travis-image]: https://img.shields.io/travis/stevenvachon/evaluate-value.svg
+[travis-url]: https://travis-ci.org/stevenvachon/evaluate-value