ping.js 265 B

123456
  1. // ping the npm registry used by the ping and doctor commands
  2. const npmFetch = require('npm-registry-fetch')
  3. module.exports = async (flatOptions) => {
  4. const res = await npmFetch('/-/ping', { ...flatOptions, cache: false })
  5. return res.json().catch(() => ({}))
  6. }