@nodevu/fetchindex
v0.1.0
Published
A tool that fetches the /dist/index.json file from the Node.js website.
Downloads
11
Readme
@nodevu/fetchindex
A tool that fetches the /dist/index.json file from the Node.js website.
Usage
const fetchindex = require('@nodevu/fetchindex')
const options = {
fetch: globalThis.fetch, // use your own fetch if you want!
urls: {
index: 'https://nodejs.org/dist/index.json',
},
};
const index = await fetchindex(options); // returns a huge JSON object
API
fetchindex(options)
options
(object): Options object. -fetch
(function): Fetch function. Default:globalThis.fetch
. -urls
(object): URLs object. -index
(string): URL to fetch the index.json file from. Default:'https://nodejs.org/dist/index.json'
.- Returns: Promise that resolves with the fetched
index.json
object.
- Returns: Promise that resolves with the fetched