File: ping.js

package info (click to toggle)
npm 9.2.0~ds1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 319,008 kB
  • sloc: javascript: 167,820; sh: 194; makefile: 52; perl: 11
file content (7 lines) | stat: -rw-r--r-- 252 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
// 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(() => ({}))
}