Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit 3240205

Browse files
authored
Remove new keyword
Removed the `new` keyword in some examples
1 parent d10e983 commit 3240205

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ All other configuration is plugin specific. It must be passed within an object
355355
to the `plugins` parameter in the client constructor. For example:
356356

357357
```js
358-
var cloudant = new Cloudant({ url: myurl, maxAttempt: 5, plugins: [ { iamauth: { iamApiKey: 'abcxyz' } }, { retry: { retryDelayMultiplier: 4 } } ]);
358+
var cloudant = Cloudant({ url: myurl, maxAttempt: 5, plugins: [ { iamauth: { iamApiKey: 'abcxyz' } }, { retry: { retryDelayMultiplier: 4 } } ]);
359359
```
360360
361361
`maxAttempt` can _not_ be overridden by plugin specific configuration.
@@ -370,7 +370,7 @@ var cloudant = new Cloudant({ url: myurl, maxAttempt: 5, plugins: [ { iamauth: {
370370
371371
For example:
372372
```js
373-
var cloudant = new Cloudant({ url: 'https://user:[email protected]', plugins: 'cookieauth' });
373+
var cloudant = Cloudant({ url: 'https://user:[email protected]', plugins: 'cookieauth' });
374374
```
375375
376376
The plugin will transparently call `POST /_session` to exchange your
@@ -416,7 +416,7 @@ var cloudant = new Cloudant({ url: myurl, maxAttempt: 5, plugins: [ { iamauth: {
416416
417417
For example:
418418
```js
419-
var cloudant = new Cloudant({ url: 'https://examples.cloudant.com', plugins: { iamauth: { iamApiKey: 'xxxxxxxxxx', retryDelayMultiplier: 4, retryInitialDelayMsecs: 100 } } });
419+
var cloudant = Cloudant({ url: 'https://examples.cloudant.com', plugins: { iamauth: { iamApiKey: 'xxxxxxxxxx', retryDelayMultiplier: 4, retryInitialDelayMsecs: 100 } } });
420420
```
421421
422422
If the IAM token cannot be retrieved after the configured number of retries
@@ -435,7 +435,7 @@ var cloudant = new Cloudant({ url: myurl, maxAttempt: 5, plugins: [ { iamauth: {
435435
these requests are suitably retried:
436436
437437
```js
438-
var cloudant = new Cloudant({ url: myurl, maxAttempt: 5, plugins: { retry: { retryErrors: false, retryStatusCodes: [ 429 ] } } });
438+
var cloudant = Cloudant({ url: myurl, maxAttempt: 5, plugins: { retry: { retryErrors: false, retryStatusCodes: [ 429 ] } } });
439439
```
440440
441441
The plugin has the following configuration options:
@@ -463,7 +463,7 @@ var cloudant = new Cloudant({ url: myurl, maxAttempt: 5, plugins: [ { iamauth: {
463463
464464
You can pass the plugins as an array, for example:
465465
```js
466-
var cloudant = new Cloudant({ url: myurl, plugins: [ 'cookieauth', { retry: { retryDelayMultiplier: 4 } } ] });
466+
var cloudant = Cloudant({ url: myurl, plugins: [ 'cookieauth', { retry: { retryDelayMultiplier: 4 } } ] });
467467
```
468468
469469
The plugins are _always_ executed in the order they are specified. Remember that

0 commit comments

Comments
 (0)