Just a cosmetic typing note:
at https://github.com/fidm/x509/blob/master/src/x509.ts#L296 the data argument is converted via toString in https://github.com/fidm/asn1/blob/master/src/pem.ts#L44, so it seems like it could safely receive a string, and a more general parameter type could be Buffer | string i.e.
static fromPEM (data: Buffer | string): Certificate {
return Certificate.fromPEMs(data)[0]
}
Just a cosmetic typing note:
at https://github.com/fidm/x509/blob/master/src/x509.ts#L296 the
dataargument is converted viatoStringin https://github.com/fidm/asn1/blob/master/src/pem.ts#L44, so it seems like it could safely receive astring, and a more general parameter type could beBuffer | stringi.e.