mirror of
https://github.com/JonasunderscoreJones/jonas_jones-api.git
synced 2025-10-23 17:19:18 +02:00
some progress
This commit is contained in:
parent
aea93a5527
commit
e3c15bd288
1388 changed files with 306946 additions and 68323 deletions
25
node_modules/mongodb-connection-string-url/README.md
generated
vendored
Normal file
25
node_modules/mongodb-connection-string-url/README.md
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
# mongodb-connection-string-url
|
||||
|
||||
MongoDB connection strings, based on the WhatWG URL API
|
||||
|
||||
```js
|
||||
import ConnectionString from 'mongodb-connection-string-url';
|
||||
|
||||
const cs = new ConnectionString('mongodb://localhost');
|
||||
cs.searchParams.set('readPreference', 'secondary');
|
||||
console.log(cs.href); // 'mongodb://localhost/?readPreference=secondary'
|
||||
```
|
||||
|
||||
## Deviations from the WhatWG URL package
|
||||
|
||||
- URL parameters are case-insensitive
|
||||
- The `.host`, `.hostname` and `.port` properties cannot be set, and reading
|
||||
them does not return meaningful results (and are typed as `never`in TypeScript)
|
||||
- The `.hosts` property contains a list of all hosts in the connection string
|
||||
- The `.href` property cannot be set, only read
|
||||
- There is an additional `.isSRV` property, set to `true` for `mongodb+srv://`
|
||||
- There is an additional `.clone()` utility method on the prototype
|
||||
|
||||
## LICENSE
|
||||
|
||||
Apache-2.0
|
Loading…
Add table
Add a link
Reference in a new issue