Last active
December 10, 2015 16:36
-
-
Save nikgraf/37f3ec9288357c0e0e80 to your computer and use it in GitHub Desktop.
I'm a big fan of the destructuring assignment syntax in combination with setting default values in JavaScript ❤️
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
export default ({options = {}}) => { | |
const { | |
min = Number.MAX_SAFE_INTEGER, | |
max = Number.MIN_SAFE_INTEGER, | |
step = 1, | |
} = options; | |
return `Range between ${min} and ${max} with a step of ${step}`; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment