UNPKG

npm

Version:

a package manager for JavaScript

8 lines (7 loc) 252 B
// 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(() => ({})) }