Last active
July 29, 2022 14:08
-
-
Save nythrox/d96e838dcee8c61e2df104ec46fd5b47 to your computer and use it in GitHub Desktop.
Javascript pipeline operator using global mutable underline (_) variable
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
const envars = { secret: "hello world" } | |
const stringifyEnv = (env) => { | |
_= env | |
_= Object.keys(_) | |
_= _.map(envar => `${envar}=${envars[envar]}`) | |
_= _.join('&') | |
return _ | |
} | |
console.log(stringifyEnv(envars)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment