mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
PR-URL: https://github.com/nodejs/node/pull/62216 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
7 lines
265 B
JavaScript
7 lines
265 B
JavaScript
// ping the npm registry used by the ping and doctor commands
|
|
const npmFetch = require('npm-registry-fetch')
|
|
module.exports = async (flatOptions) => {
|
|
const res = await npmFetch('/-/ping', { ...flatOptions, cache: false })
|
|
return res.json().catch(() => ({}))
|
|
}
|