Gathering detailed insights and metrics for @netly/node-fetch
Gathering detailed insights and metrics for @netly/node-fetch
npm install @netly/node-fetch
Typescript
Module System
Min. Node Version
Node Version
NPM Version
69.5
Supply Chain
92
Quality
76.7
Maintenance
100
Vulnerability
100
License
JavaScript (75.3%)
TypeScript (23.41%)
Shell (1.3%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
1,883
Last Day
1
Last Week
3
Last Month
27
Last Year
915
MIT License
3 Stars
143 Commits
1 Watchers
5 Branches
3 Contributors
Updated on Dec 09, 2024
Minified
Minified + Gzipped
Latest Version
1.1.1
Package Id
@netly/node-fetch@1.1.1
Unpacked Size
12.97 kB
Size
3.59 kB
File Count
10
NPM Version
9.8.1
Node Version
20.15.1
Published on
Jul 17, 2024
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
50%
3
Compared to previous week
Last Month
-30.8%
27
Compared to previous month
Last Year
122.6%
915
Compared to previous year
Inspired by node-fetch-retry-timeout.
Tiny replacement for native fetch with additional benefits.
npm i @netly/node-fetch
Same as in native fetch, but with small extension. Everything is optional.
parameter | type | description | default |
---|---|---|---|
retry | number | number of times to retry the request | 3 |
timeout | number | number of ms to wait before request cancel | 20_000 |
retryStrategy | Function | exponential backoff strategy | (times) => Math.min((2 ** times - 1) * 1000, 20000) |
retryOnHttpResponse | Function | can retry based on http response statuses | (response) => response.status >= 500; |
1retry?: number
1timeout?: number
Calculates how long to wait before next retry. times
- the number of retry.
To disable retry strategy: () => 0
1retryStrategy: (times: number): number => Math.min((2 ** times - 1) * 1000, 20000);
Check if response is desired. If no - throw error and send request one more time.
1retryOnHttpResponse: (response: globalThis.Response) => response.status >= 500;
cjs
1const { default: fetch } = require('@netly/node-fetch'); 2// or 3const { fetch } = require('@netly/node-fetch'); 4 5const response = await fetch('https://www.google.com');
esm
1import { fetch } from '@netly/node-fetch'; 2// or 3import fetch from '@netly/node-fetch'; 4 5const response = await fetch('https://www.google.com');
ts
1import { fetch } from '@netly/node-fetch'; 2// or 3import fetch from '@netly/node-fetch'; 4 5const response = await fetch('https://www.google.com');
No vulnerabilities found.
No security vulnerabilities found.