Skip to content

Commit

Permalink
docs(readme): API docs for PK.index()
Browse files Browse the repository at this point in the history
  • Loading branch information
jcowman2 committed Oct 15, 2019
1 parent 27cdbf1 commit ea3b05f
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions README.md
Expand Up @@ -2778,15 +2778,31 @@ Generates a string value representative of this key.
value(): string
```
**Description**
This is used for the `equals` method, which is strongly preferred for testing the equality of two keys.
**Parameters**
**Returns**
None
`string`: A hash value representative of the key.
##### `index()`
Returns the placement of this key in the list of all keys.
```ts
index(): number
```
**Description**
For example, an index of 2 means this was the second key generated.
This includes reserved keys; if a set of reserved keys was used to generate this key's `PKProvider`, the entry with the lowest value will have an index of 0.
**Returns**
`string`: A hash value representative of the key.
`number`: The index of this key.
### `RegalError`
Expand Down

0 comments on commit ea3b05f

Please sign in to comment.