smart-energy-monitor/software/flow/node_modules/npm/lib/utils/ping.js

8 lines
252 B
JavaScript
Raw Normal View History

2023-02-23 15:38:30 +01:00
// 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(() => ({}))
}