diff --git a/package.json b/package.json index 7a5bd80..1ee3c3b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ssl-checker", - "version": "2.0.4", + "version": "2.0.5", "description": "ssl-checker", "main": "./lib/cmjs/index.js", "module": "./lib/cmjs/index.js", diff --git a/src/index.ts b/src/index.ts index d0bf245..9d2742e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -29,7 +29,7 @@ const sslChecker = ( agent: false, method: "HEAD", port: 443, - rejectUnauthorized: false + rejectUnauthorized: false, } ): Promise => new Promise((resolve, reject) => { @@ -53,7 +53,7 @@ const sslChecker = ( (res: http.IncomingMessage) => { const { valid_from, - valid_to + valid_to, } = (res.connection as tls.TLSSocket).getPeerCertificate(); const validTo = new Date(valid_to); @@ -64,7 +64,7 @@ const sslChecker = ( ((res.socket as { authorized?: boolean }) .authorized as boolean) || false, validFrom: new Date(valid_from).toISOString(), - validTo: validTo.toISOString() + validTo: validTo.toISOString(), }); } ); @@ -76,4 +76,4 @@ const sslChecker = ( } }); -module.exports = sslChecker; +export default sslChecker;