Package Exports
- sslko
Readme
π SSLko
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 sslkoyarn add sslkopnpm add sslkobun 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.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Made with β€οΈ by the Roman OΕΎana