aboutsummaryrefslogtreecommitdiff
path: root/node_modules/boolbase
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-03 15:35:00 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-03 15:35:00 +0200
commitde98e0b232509d5f40c135d540a70e415272ff85 (patch)
treea79222a5b58484ab3b80d18efcaaa7ccc4769b33 /node_modules/boolbase
parente0c9d480a73fa629c1e4a47d3e721f1d2d345406 (diff)
downloadwallet-core-de98e0b232509d5f40c135d540a70e415272ff85.tar.xz
node_modules
Diffstat (limited to 'node_modules/boolbase')
-rw-r--r--node_modules/boolbase/README.md10
-rw-r--r--node_modules/boolbase/index.js8
-rw-r--r--node_modules/boolbase/package.json23
3 files changed, 41 insertions, 0 deletions
diff --git a/node_modules/boolbase/README.md b/node_modules/boolbase/README.md
new file mode 100644
index 000000000..85eefa5e5
--- /dev/null
+++ b/node_modules/boolbase/README.md
@@ -0,0 +1,10 @@
+#boolbase
+This very simple module provides two basic functions, one that always returns true (`trueFunc`) and one that always returns false (`falseFunc`).
+
+###WTF?
+
+By having only a single instance of these functions around, it's possible to do some nice optimizations. Eg. [`CSSselect`](https://github.com/fb55/CSSselect) uses these functions to determine whether a selector won't match any elements. If that's the case, the DOM doesn't even have to be touched.
+
+###And why is this a separate module?
+
+I'm trying to modularize `CSSselect` and most modules depend on these functions. IMHO, having a separate module is the easiest solution to this problem. \ No newline at end of file
diff --git a/node_modules/boolbase/index.js b/node_modules/boolbase/index.js
new file mode 100644
index 000000000..8799fd95d
--- /dev/null
+++ b/node_modules/boolbase/index.js
@@ -0,0 +1,8 @@
+module.exports = {
+ trueFunc: function trueFunc(){
+ return true;
+ },
+ falseFunc: function falseFunc(){
+ return false;
+ }
+}; \ No newline at end of file
diff --git a/node_modules/boolbase/package.json b/node_modules/boolbase/package.json
new file mode 100644
index 000000000..78330a8f7
--- /dev/null
+++ b/node_modules/boolbase/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "boolbase",
+ "version": "1.0.0",
+ "description": "two functions: One that returns true, one that returns false",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/fb55/boolbase"
+ },
+ "keywords": [
+ "boolean",
+ "function"
+ ],
+ "author": "Felix Boehm <me@feedic.com>",
+ "license": "ISC",
+ "bugs": {
+ "url": "https://github.com/fb55/boolbase/issues"
+ },
+ "homepage": "https://github.com/fb55/boolbase"
+}