UNPKG

@thepassle/app-tools

Version:

Collection of tools I regularly use to build apps. Maybe they're useful to somebody else. Maybe not. Most of these are thin wrappers around native API's, like the native `<dialog>` element, `fetch` API, and `URLPattern`.

12 lines (11 loc) 252 B
/** * @param {number} ms * @returns {import('../index.js').Plugin} */ export const delayPlugin = (ms) => ({ name: 'delay', afterFetch: async () => { await new Promise(r => setTimeout(r,ms)) } }); export const delay = delayPlugin(1000);