This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function uid() { | |
return Date.now().toString(36) + Math.random().toString(36).substr(2); | |
} | |
// Fetch tasks from localStorage | |
function fetchTasks() { | |
return new Promise((resolve, reject) => { | |
try { | |
window.setTimeout(() => { | |
resolve(JSON.parse(localStorage.getItem("tasks")) || []); |
OlderNewer