This package extends WP-API (the best wordpress api wrapper for node) to add features like menu and custom post type request functions. You need to install the WUXT Headless WordPress API Extensions extension on your wordpress server.
WP-API Extensions are available via yarn and npm.
$ yarn add wpapi-extensions
$ npm install --save wpapi-extensions
Notice: This package depends on WP-API.
import WPAPI from 'wpapi';
import { registerWuxt } from 'wpapi-extensions';
const wp = new WPAPI({/* options */});
registerWuxt(wp); // registers all functions
You can alse register the functions seperately:
registerFrontPage(wp);
registerMenu(wp);
registerSlug(wp);
registerCpt(wp);
await wp.frontPage()
await wp.menu()
await wp.slug()
await wp.cpt('movies')
A good description on the functions is also here
Credits to @danielauener for creating the inital implementation.