node-select
Advanced tools
+1
-1
| { | ||
| "name": "node-select", | ||
| "version": "0.1.1", | ||
| "version": "0.1.2", | ||
| "description": "Select is syntactic sugar to help maintain a functional approach to assigning to variables.", | ||
@@ -5,0 +5,0 @@ "main": "select.js", |
+21
-2
@@ -1,4 +0,6 @@ | ||
| # select | ||
| Select is syntactic sugar to help maintain a functional approach to assigning to variables. It lets you avoid reassigning, so you can keep things const-y, if you're into that sort of thing. | ||
| # node-select | ||
| Select is syntactic sugar to help maintain a functional approach to assigning to variables. It lets you avoid reassigning, so you can keep things const-y, if you're into that sort of thing. 🤷🏽 | ||
| Please don't look at the source code, as it's embarassingly small. This is a grower, not a shower, ok? | ||
| ## Usage | ||
@@ -40,1 +42,18 @@ | ||
| ``` | ||
| ## Plans for world domination | ||
| In my future, ECMAScript will support this syntax: | ||
| ```js | ||
| const o = select (criteriaObject) { | ||
| if (this.someCondition) { | ||
| return someConstructorMaybe(); | ||
| } else if (this.someOtherCondition) { | ||
| return somethingElse; | ||
| } else { | ||
| return null; | ||
| } | ||
| } | ||
| ``` | ||
| One can always dream... |
2649
20.85%59
47.5%