Created
October 6, 2015 22:13
-
-
Save mwisnicki/ec0a9329fc1e17a05540 to your computer and use it in GitHub Desktop.
Pipe-forward operator for js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.__proto__.__proto__.do = function(fn) { return fn(this) } | |
$0.style.width | |
.do(parseFloat) | |
.do(w=>w*5) | |
.do(Math.round) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment