feat: added qr-code generator

Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
This commit is contained in:
Corentin Thomasset 2020-06-23 00:01:14 +02:00
parent b75603f311
commit a20858dfb8
No known key found for this signature in database
GPG key ID: DBD997E935996158
8 changed files with 226 additions and 3 deletions

View file

@ -41,6 +41,13 @@ const randFromArray = (array) => array[Math.floor(Math.random() * array.length)]
const randIntFromInterval = (min, max) => Math.floor(Math.random() * (max - min) + min)
const downloadBase64File = (dataUrl, name = 'file') => {
const a = document.createElement("a");
a.href = dataUrl;
a.download = name;
a.click();
}
export {
copyToClipboard,
fileIsImage,
@ -48,5 +55,6 @@ export {
isInt,
debounce,
randFromArray,
randIntFromInterval
randIntFromInterval,
downloadBase64File
}