JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q58462F
  • License MIT

A simple tool to check SSL/TLS certificate information for a given domain.

Package Exports

  • sslko

Readme

πŸ”’ SSLko

NPM Downloads NPM Version NPM License Last Commit GitHub Workflow Status

SSLko is a lightweight JavaScript library for retrieving SSL/TLS certificate details, including validity and expiration information.

πŸ“¦ Installation

You can install SSLko using npm, yarn, pnpm, or bun:

npm install sslko
yarn add sslko
pnpm add sslko
bun add sslko

πŸš€ Quick Start

Get Certificate Information

import { getCertificateInfo } from "sslko";

const certInfo = await getCertificateInfo("example.com");
console.log(certInfo);

Will return an CertificateInfo object.

Get Certificate

import { getCertificate } from 'sslko';

const cert = await getCertificate('example.com');

There is few options you can pass to the getCertificate function:

import { getCertificate } from 'sslko';

const cert = await getCertificate('example.com', {
    port: 488, // Default is 443
    timeout: 10000, // Default is 5000ms => 5 seconds
});

More information about the options can be found in the API documentation.

πŸ“„ License

MIT License - see the LICENSE file for details.

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Made with ❀️ by the Roman Ožana