See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| Object.defineProperty(Object.prototype, 'switchExpr', { | |
| value: function(selection, planB) { | |
| if (selection in this) | |
| return this[selection]; | |
| // (REMOVE?) if an array of booleans is passed, try to shortcircuit | |
| if (/^(true|false),((true|false),?)*$/.test(selection)) { | |
| let shrinkingStr = selection.join(','); | |
| while (shrinkingStr.includes(',')) { | |
| shrinkingStr = shrinkingStr.substr(0, shrinkingStr.lastIndexOf(',')); |