mirror of
https://github.com/nodejs/node.git
synced 2025-05-15 16:01:52 +00:00

PR-URL: https://github.com/nodejs/node/pull/37879 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 lines
252 B
JavaScript
8 lines
252 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?write=true', flatOptions)
|
|
return res.json().catch(() => ({}))
|
|
}
|