Rename 'fetch' as 'deliver'

This commit is contained in:
0x1eef 2024-07-10 17:07:37 -03:00
parent 74eddcea52
commit 912d0ec12a
2 changed files with 3 additions and 3 deletions

View file

@ -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));

View file

@ -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<Package> };
type Postman = { deliver: () => Promise<Package> };
type Args = Array<Item | FontItem | Function>
type Items = Array<Item | FontItem>;
type Package = {
@ -65,7 +65,7 @@ export default function (...args: Args) {
return reqs as Array<Promise<Package>>;
};
self.fetch = async () => {
self.deliver = async () => {
await Promise.all<Package>(spawnRequests());
return result;
};