Last active
November 14, 2019 15:32
-
-
Save osedoe/e96e179d776aec2c96ca29f974beca3b to your computer and use it in GitHub Desktop.
Useful typescript functions
This file contains hidden or 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 getRandomObjectProperty = (object: object) => Object.keys(object)[Math.floor(Math.random() * Object.keys(object).length)]; | |
| const generateRandomHexColor = () => '#'+Math.floor(Math.random()*16777215).toString(16); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment