@hugoalh/exfetch

An ECMAScript (JavaScript & TypeScript) module to extend `fetch`.

https://github.com/hugoalh/exfetch-es

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.3%) to scientific vocabulary

Keywords

ecmascript ecmascript-module es es-module esm esmodule exfetch fetch javascript js ts typescript

Keywords from Contributors

optim mesh interpretability sequences generic projection interactive hacking gh-action ghaction
Last synced: 4 months ago · JSON representation ·

Repository

An ECMAScript (JavaScript & TypeScript) module to extend `fetch`.

Basic Info
  • Host: GitHub
  • Owner: hugoalh
  • License: other
  • Language: TypeScript
  • Default Branch: main
  • Homepage:
  • Size: 239 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 3
  • Releases: 14
Topics
ecmascript ecmascript-module es es-module esm esmodule exfetch fetch javascript js ts typescript
Created over 2 years ago · Last pushed 5 months ago
Metadata Files
Readme Contributing License Citation Codeowners Security

README.md

exFetch (ES)

⚖️ MIT

GitHub: hugoalh/exfetch-es JSR: @hugoalh/exfetch NPM: @hugoalh/exfetch

An ECMAScript (JavaScript & TypeScript) module to extend fetch.

🌟 Features

  • Ability to cache suitable Request-Responses to reduce network usage and response time.
  • Automatically retry on failure requests, preferentially obey the response header Retry-After.
  • Redirect fine control.
  • Simplify URL paginate requests.

🔰 Begin

🎯 Targets

| Targets | Remote | JSR | NPM | |:--|:-:|:-:|:-:| | Bun >= v1.1.0 | ❌ | ✔️ | ✔️ | | Deno >= v2.1.0 | ✔️ | ✔️ | ✔️ | | NodeJS >= v20.9.0 | ❌ | ✔️ | ✔️ |

[!NOTE] - It is possible to use this module in other methods/ways which not listed in here, however those methods/ways are not officially supported, and should beware maybe cause security issues.

#️⃣ Resources Identifier

  • Remote - GitHub Raw: https://raw.githubusercontent.com/hugoalh/exfetch-es/{Tag}/mod.ts
  • JSR: [jsr:]@hugoalh/exfetch[@{Tag}]
  • NPM: [npm:]@hugoalh/exfetch[@{Tag}]

[!NOTE] - For usage of remote resources, it is recommended to import the entire module with the main path mod.ts, however it is also able to import part of the module with sub path if available, but do not import if:

  • it's path has an underscore prefix (e.g.: _foo.ts, _util/bar.ts), or
  • it is a benchmark or test file (e.g.: foo.bench.ts, foo.test.ts), or
  • it's symbol has an underscore prefix (e.g.: _bar, _foo).

These elements are not considered part of the public API, thus no stability is guaranteed for them. - For usage of JSR or NPM resources, it is recommended to import the entire module with the main entrypoint, however it is also able to import part of the module with sub entrypoint if available, please visit the file jsr.jsonc property exports for available sub entrypoints. - It is recommended to use this module with tag for immutability.

🛡️ Runtime Permissions

  • Network (Deno: net):
    • Resources

🧩 APIs

  • ts class ExFetch { constructor(options?: ExFetchOptions); single(input: string | URL, init?: RequestInit): Promise<Response>; urlPaginate(input: string | URL, init?: RequestInit): Promise<Response[]>; }
  • ts function exFetch(input: string | URL, init?: RequestInit, options?: ExFetchOptions): Promise<Response>;
  • ts function exFetchURLPaginate(input: string | URL, init?: RequestInit, options?: ExFetchOptions): Promise<Response[]>;

[!NOTE] - For the full or prettier documentation, can visit via: - Deno CLI deno doc - JSR

✍️ Examples

  • ```ts const responses: Response[] = await exFetchURLPaginate("https://api.github.com/repos/microsoft/vscode/labels?per_page=100");

responses.map((response: Response) => { return response.ok; }).includes(false); //=> false (false when no broken page, otherwise true)

const result = []; for (const response of responses) { result.push(...(await response.json())); } result; /=> [ { "id": 2339554941, "nodeid": "MDU6TGFiZWwyMzM5NTU0OTQx", "url": "https://api.github.com/repos/microsoft/vscode/labels/:apple:%20si", "name": ":apple: si", "color": "e99695", "default": false, "description": "Issues related to apple silicon" }, { "id": 421131022, "nodeid": "MDU6TGFiZWw0MjExMzEwMjI=", "url": "https://api.github.com/repos/microsoft/vscode/labels/as-designed", "name": "as-designed", "color": "E2A1C2", "default": false, "description": "Described behavior is as designed" }, { "id": 409283388, "node_id": "MDU6TGFiZWw0MDkyODMzODg=", "url": "https://api.github.com/repos/microsoft/vscode/labels/caused-by-extension", "name": "caused-by-extension", "color": "E2A1C2", "default": false, "description": "Issue identified to be caused by an extension" }, { "id": 766755777, "node_id": "MDU6TGFiZWw3NjY3NTU3Nzc=", "url": "https://api.github.com/repos/microsoft/vscode/labels/dev-question", "name": "dev-question", "color": "E2A1C2", "default": false, "description": "VS Code Extension Development Question" }, { "id": 366106217, "node_id": "MDU6TGFiZWwzNjYxMDYyMTc=", "url": "https://api.github.com/repos/microsoft/vscode/labels/duplicate", "name": "*duplicate", "color": "E2A1C2", "default": false, "description": "Issue identified as a duplicate of another issue(s)" }, ... +467 ] */ ```

Owner

  • Name: hugoalh
  • Login: hugoalh
  • Kind: user
  • Location: Everywhere
  • Company: @hugoalh-studio

Lead of @hugoalh-studio; Full time software developer; Part time freelancer

Citation (CITATION.cff)

# yaml-language-server: $schema=https://citation-file-format.github.io/1.2.0/schema.json
cff-version: "1.2.0"
title: "exFetch (ES)"
message: "If you use this software, please cite it using the metadata from this file."
type: "software"
authors:
  - name: "hugoalh"
repository-code: "https://github.com/hugoalh/exfetch-es"
keywords:
  - "ecmascript"
  - "ecmascript-module"
  - "es"
  - "es-module"
  - "esm"
  - "esmodule"
  - "exfetch"
  - "fetch"
  - "javascript"
  - "js"
  - "ts"
  - "typescript"
license: "MIT"

GitHub Events

Total
  • Create event: 7
  • Issues event: 1
  • Release event: 1
  • Delete event: 7
  • Issue comment event: 7
  • Push event: 12
  • Pull request event: 13
Last Year
  • Create event: 7
  • Issues event: 1
  • Release event: 1
  • Delete event: 7
  • Issue comment event: 7
  • Push event: 12
  • Pull request event: 13

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 180
  • Total Committers: 3
  • Avg Commits per committer: 60.0
  • Development Distribution Score (DDS): 0.028
Past Year
  • Commits: 16
  • Committers: 2
  • Avg Commits per committer: 8.0
  • Development Distribution Score (DDS): 0.125
Top Committers
Name Email Commits
hugoalh 3****h 175
dependabot[bot] 4****] 4
codefactor-io[bot] 4****] 1

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 1
  • Total pull requests: 27
  • Average time to close issues: N/A
  • Average time to close pull requests: 10 days
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.81
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 27
Past Year
  • Issues: 1
  • Pull requests: 13
  • Average time to close issues: N/A
  • Average time to close pull requests: 11 days
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.92
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 13
Top Authors
Issue Authors
  • hugoalh (1)
Pull Request Authors
  • dependabot[bot] (33)
  • codefactor-io[bot] (1)
Top Labels
Issue Labels
Priority/Low 🟢 (1) Type/Documentation 📓 (1) Platform/DenoNetwork (1)
Pull Request Labels
Type/Dependency 📦 (33) Platform/NodeJS (28) Status/Pending 🔵 (27) Platform/GitHubActions (5) Priority/Low 🟢 (4) Status/Duplicated 🔁 (2)

Packages

  • Total packages: 1
  • Total downloads:
    • npm 2 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 8
  • Total maintainers: 1
npmjs.org: @hugoalh/exfetch

A module to extend `fetch`.

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 2 Last month
Rankings
Forks count: 15.8%
Stargazers count: 17.2%
Average: 30.7%
Dependent repos count: 37.1%
Dependent packages count: 53.0%
Maintainers (1)
Last synced: 5 months ago

Dependencies

.github/workflows/announce-new-release-discord.yml actions
.github/workflows/code-review-deno.yml actions
.github/workflows/codeql-analysis.yml actions
.github/workflows/scan-virus.yml actions
.github/workflows/sync-labels.yml actions