Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

resolve-mongodb-srv

Package Overview
Dependencies
Maintainers
33
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-mongodb-srv

Resolve mongodb+srv:// URLs to mongodb:// URLs

  • 1.1.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
33
Created
Source

resolve-mongodb-srv

Resolve mongodb+srv:// URLs to mongodb:// URLs as specified in the Initial DNS Seedlist Discovery Specification.

import resolveMongodbSrv from 'resolve-mongodb-srv';

await resolveMongodbSrv('mongodb+srv://user:password@somecluster.mongodb.net/db');
// Returns: mongodb://user:password@host1,host2,host3/db

The resolveMongodbSrv function takes an optional second argument, where the used dns implementation can be passed in:

import dns from 'dns';
import resolveMongodbSrv from 'resolve-mongodb-srv';

await resolveMongodbSrv('hostname', { dns });

LICENSE

Apache-2.0

Keywords

FAQs

Package last updated on 10 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc