From 912d0ec12a1f465106a4ecce9a5a9b6ca3a274d3 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Wed, 10 Jul 2024 17:07:37 -0300 Subject: [PATCH] Rename 'fetch' as 'deliver' --- README.md | 2 +- src/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1aa969f..2c17e4f 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ document.addEventListener("DOMContentLoaded", () => { progressBar.value = percent; span.innerText = `${percent}%`; }) - ).fetch() + ).deliver() .then((package) => { /* Add page assets */ package.fonts.forEach((font) => documents.fonts.add(font)); diff --git a/src/index.ts b/src/index.ts index 6373840..20160ef 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,7 @@ import type { Item, FontItem } from './postman/item'; import item from './postman/item'; import request from './postman/request'; -type Postman = { fetch: () => Promise }; +type Postman = { deliver: () => Promise }; type Args = Array type Items = Array; type Package = { @@ -65,7 +65,7 @@ export default function (...args: Args) { return reqs as Array>; }; - self.fetch = async () => { + self.deliver = async () => { await Promise.all(spawnRequests()); return result; };