Why? Because is simple, reusability of code. Code reusability gives you the ability to reuse code multiple times so you can develop applications faster and with more consistency. I needed this functionality two times for 2 different projects in a single month and I decided to create something simple and import it into both projects. Then I said, wait, but why don’t make it public.
And here we are, talking about this library boobo94/random-color
npm i github:boobo94/random-color
import RandomColor from 'random-color' const newColor = RandomColor.getColor(); console.log(newColor) // #44ad3c
The MIT License. Check it here