diff --git a/docs/api.md b/docs/api.md index d06127bf7..41565b809 100644 --- a/docs/api.md +++ b/docs/api.md @@ -105,7 +105,10 @@ Each path must be a string using a syntax which corresponds to JavaScript dot an If an object is supplied, three options can be specified: * `paths` (array): Required. An array of paths. See [redaction - Path Syntax ⇗](/docs/redaction.md#paths) for specifics. - * `censor` (String): Optional. A value to overwrite key which are to be redacted. Default: `'[Redacted]'` + * `censor` (String|Function|Undefined): Optional. When supplied as a String the `censor` option will overwrite keys which are to be redacted. When set to `undefined` the the key will be removed entirely from the object. + The `censor` option may also be a mapping function. The (synchronous) mapping function is called with the unredacted value. The value returned from the mapping function becomes the applied censor value. Default: `'[Redacted]'` + value synchronously. + Default: `'[Redacted]'` * `remove` (Boolean): Optional. Instead of censoring the value, remove both the key and the value. Default: `false` **WARNING**: Never allow user input to define redacted paths.