Node package to find the OS-installed root CA certificates. This uses the same location list as go. Based upon this this answer on ServerFault.
npm install --save find-root-ca-cert
const certFinder = require("find-root-ca-cert");
certFinder.findCAPath();
// /etc/ssl/certs/ca-certificates.crt
certFinder.findCABundle();
// /etc/ssl/certs/ca-certificates.crt
'aix', 'freebsd', 'linux', 'openbsd', 'sunos'
'ios', 'darwin', 'win32'
Licensed under the MIT License. See LICENSE file for details.