Skip to content

Commit 9eae8c6

Browse files
committed
chore: more readme updates
1 parent 821be72 commit 9eae8c6

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,14 @@ console.log(diff(lhs, rhs));
5757

5858
`human-object-diff` supports a variety of options to allow you to take control over the output of your object diff.
5959

60-
| Option | type | Default | Description |
61-
| ------------ | ----------- | ---------------------------------- | ----------------------------------------------------------------------------------------------- |
62-
| objectName | String | 'Obj' | This is the object name when presented in the path. ie... "Obj.foo" ignored if hidePath is true |
63-
| prefilter | Array\|Func | | see [prefiltering](#prefiltering) |
64-
| dateFormat | String | 'MM/dd/yyyy hh:mm a' | dateFns format string see [below](#support-for-dates) |
65-
| ignoreArrays | Bool | false | If array differences aren't needed. Set to true and skip processing |
66-
| templates | Object | see [templates](#custom-templates) | Completely customize the output. |
60+
| Option | type | Default | Description |
61+
| -------------- | ---------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------- |
62+
| objectName | String | 'Obj' | This is the object name when presented in the path. ie... "Obj.foo" ignored if hidePath is true |
63+
| prefilter | \[String\]\|Func | | see [prefiltering](#prefiltering) |
64+
| dateFormat | String | 'MM/dd/yyyy hh:mm a' | dateFns format string see [below](#support-for-dates) |
65+
| ignoreArrays | Bool | false | If array differences aren't needed. Set to true and skip processing |
66+
| templates | Object | see [templates](#custom-templates) | Completely customize the output. |
67+
| sensitivePaths | \[String\] | | Paths that will use the sensitive field templates if they are defined |
6768

6869
### Custom Templates
6970

@@ -96,9 +97,9 @@ Where N is a new key, D is a deleted key, E is an edited key, I is an inserted a
9697

9798
We also expose a sensitiveFields array option which will cause a path to use the S option template.
9899

99-
You can define each sentence in templates to be whatever you'd like them to be and you can use the following codes that will be replaced by their diff values in the final output.
100+
You can define each sentence in the templates to be whatever you'd like. The following tokens can be used to replace their diff values in the final output.
100101

101-
The available values you can plug in to your sentences are `FIELD`, `DOTPATH`,`NEWVALUE`,`OLDVALUE`, `INDEX`, `POSITION`. Position is just index+1. Be aware that not all sentence types will have values for each token. For instance non array changes will not have a position or an index.
102+
The available tokens that can plug in to your sentence templates are `FIELD`, `DOTPATH`,`NEWVALUE`,`OLDVALUE`, `INDEX`, `POSITION`. Position is just index+1. Be aware that not all sentence types will have values for each token. For instance, non-array changes will not have a position or an index.
102103

103104
### Support for Dates
104105

0 commit comments

Comments
 (0)