feat: added qr-code generator

Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
This commit is contained in:
Corentin Thomasset committed 2020-06-23 00:01:14 +02:00
1 parent b75603f311
commit a20858dfb8
8 files changed
+226 -3

No files matched your search

+9 -1
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
}