feat: added MarkdownEditor.vue

Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
This commit is contained in:
Corentin Thomasset 2020-06-14 19:33:29 +02:00
parent 84763e1d5f
commit 7944fd9f17
6 changed files with 116 additions and 9 deletions

View file

@ -28,9 +28,19 @@ const isInt = (value) => {
return Number.isInteger(value);
}
const debounce = (callback, delay = 300) => {
let timer;
return function(...args) {
clearTimeout(timer);
timer = setTimeout(() => callback(...args), delay);
}
}
export {
copyToClipboard,
fileIsImage,
formatBytes,
isInt
isInt,
debounce
}