mirror of
https://github.com/nodejs/node.git
synced 2026-11-15 10:36:53 -05:00
PR-URL: https://github.com/nodejs/node/pull/55255 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
8 lines
262 B
JavaScript
8 lines
262 B
JavaScript
// ping the npm registry
|
|
// used by the ping and doctor commands
|
|
const fetch = require('npm-registry-fetch')
|
|
module.exports = async (flatOptions) => {
|
|
const res = await fetch('/-/ping', { ...flatOptions, cache: false })
|
|
return res.json().catch(() => ({}))
|
|
}
|