@pm2/pm2-version-check
Advanced tools
Comparing version
17
index.js
const https = require('https'); | ||
const debug = require('debug')('pm2:version-check') | ||
const qs = require('querystring') | ||
var VersionCheck = {} | ||
VersionCheck.runCheck = function(type, cb) { | ||
if (!cb) { | ||
cb = type | ||
type = '/check' | ||
VersionCheck.runCheck = function(params, cb) { | ||
var path = null | ||
if (cb == null) { | ||
cb = params | ||
path = '/check' | ||
} else { | ||
path = '/check?' + qs.stringify(params) | ||
} | ||
@@ -15,3 +20,3 @@ | ||
host: 'version.pm2.io', | ||
path: type || '/check', | ||
path: path, | ||
strictSSL: false, | ||
@@ -43,3 +48,3 @@ rejectUnauthorized: false | ||
module.export = VersionCheck | ||
module.exports = VersionCheck | ||
@@ -46,0 +51,0 @@ if (require.main === module) { |
{ | ||
"name": "@pm2/pm2-version-check", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Module to check latest PM2 version", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
0
-100%9
Infinity%1534
-7.37%44
-22.81%