Skip to content

Commit

Permalink
doc: add table of content to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mernxl committed Jul 27, 2018
1 parent 2a31a18 commit e2f26e2
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,21 @@ This plugin assigns values base on your configurations, be it `MongoDB's ObjectI

It creates a collection with name `id_assigner` that store the `nextId` for a configured field. This only happens if you have fields configured with type `String` or `Number`. As `ObjectId` and `UUID` can be generated locally unique, they do not use this collection for assigning values.

This is the perfect tool if you wish to work with `discriminators` and have `_id` field(and/or other fields) values different amongst the discriminators instances. See examples below for demonstration.
This is the perfect tool if you wish to work with `discriminators` and have `_id` field(and/or other fields) values different amongst the discriminators instances. See examples below for demonstration.

-----

# Table of Content
- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Plugin Options](#plugin-options)
- [Point to Note](#point-to-note)
- [Examples](#examples)
- [Configuration Methods](#configuration-methods)
- [Working with Discriminators](#working-with-discriminators)
- [TypeDefinitions](#typedefinitions)
- [Strain Test](#strain-test,-performs-the-task-below-on-a-locally-hosted-db-instance.)
- [License](#license)

## Installation
```
Expand Down Expand Up @@ -82,6 +96,8 @@ console.log(doc.uuidFieldString) ---> '7729e2e0-8f8b-11e8-882d-2dade78bb893'
```

**Method 2**: Request Assigner Instance, If you have initialisation logic, you need to initialise the plugin.
Calling initialise is really optional, except you want to query nextIds, or your collection is really a very busy one.
You may just call it and ignore the promise.
```js
const options = {
modelName: 'ExampleModel',
Expand Down

0 comments on commit e2f26e2

Please sign in to comment.