mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-27 01:56:15 -04:00
feat: added MarkdownEditor.vue
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
This commit is contained in:
parent
84763e1d5f
commit
7944fd9f17
6 changed files with 116 additions and 9 deletions
|
@ -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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue