Open sindresorhus opened 8 years ago
There could easily be a conflict as your random generation isn't very high resolution.
https://github.com/beatfreaker/text-meme/blob/1e513e8ceda8c8af3e280a9aaca6759ef1c0ba7d/index.js#L56
I would use randomInt(100, 99999) and also check if the image exists before writing and generate a new number if it does. You never want to accidentally overwrite an existing image.
randomInt(100, 99999)
:+1:
There could easily be a conflict as your random generation isn't very high resolution.
https://github.com/beatfreaker/text-meme/blob/1e513e8ceda8c8af3e280a9aaca6759ef1c0ba7d/index.js#L56
I would use
randomInt(100, 99999)
and also check if the image exists before writing and generate a new number if it does. You never want to accidentally overwrite an existing image.