Gathering detailed insights and metrics for @hamworks/wordpress-api-fetch
Gathering detailed insights and metrics for @hamworks/wordpress-api-fetch
npm install @hamworks/wordpress-api-fetch
Typescript
Module System
Node Version
NPM Version
46.8
Supply Chain
60.7
Quality
74.3
Maintenance
25
Vulnerability
72.8
License
JavaScript (63.01%)
TypeScript (27.58%)
HTML (9.41%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
1,681
Last Day
1
Last Week
3
Last Month
12
Last Year
269
1 Stars
28 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Apr 19, 2023
Minified
Minified + Gzipped
Latest Version
0.1.0
Package Id
@hamworks/wordpress-api-fetch@0.1.0
Unpacked Size
293.58 kB
Size
70.91 kB
File Count
13
NPM Version
6.14.8
Node Version
14.15.0
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
200%
3
Compared to previous week
Last Month
-61.3%
12
Compared to previous month
Last Year
-36.6%
269
Compared to previous year
2
20
Customized @wordpress/api-fetch
use globalThis.fetch
.
Install the module
1npm install @hamworks/wordpress-api-fetch --save
1import apiFetch from '@team-hamworks/wordpress-api-fetch';
2
3// GET
4let posts = await apiFetch( { path: '/wp/v2/posts' } )
5console.log( posts )
6
7// POST
8let posts = await apiFetch( {
9 path: '/wp/v2/posts/1',
10 method: 'POST',
11 data: { title: 'New Post Title' },
12} )
13console.log( posts )
1import apiFetch from 'https://cdn.pika.dev/@hamworks/wordpress-api-fetch'; 2const posts = await apiFetch( { path: '/wp/v2/posts' } ) 3console.log( posts )
A modification of fetchAllMiddleware to perform requests in parallel.
1import apiFetch from 'https://cdn.pika.dev/@hamworks/wordpress-api-fetch';
2apiFetch.use( apiFetch.fetchAllInParallelMiddleware );
3const posts = await apiFetch( { path: '/wp/v2/posts?per_page=-1' }, { mode: 'cors'} );
4console.log(posts);
No vulnerabilities found.
No security vulnerabilities found.