@mimik/lib-filters v2.0.3
lib-filters
Example
import libFilters from '@mimik/lib-filters';- lib-filters
- ~lengthyString(object, length) ⇒ Object
- ~isProd(env) ⇒ Boolean
- ~logs(object, config) ⇒ Object
lib-filters~lengthyString(object, length) ⇒ Object
Replace lenghty strings by --(string length)-- in a given object.
Kind: inner method of lib-filters
Returns: Object - The transformed object.
Category: sync
| Param | Type | Description |
|---|---|---|
| object | Object | The object where strings will be replaced. |
| length | Number | The length at which the replacement happens. If no length is given the default length is 1000 characters. |
lib-filters~isProd(env) ⇒ Boolean
Chech if the environment is Production
Kind: inner method of lib-filters
Returns: Boolean - Return true if the env in not exisitent or not a string
Category: sync
| Param | Type | Description |
|---|---|---|
| env | String | The enviroment property. |
lib-filters~logs(object, config) ⇒ Object
Mask the variable defined in the config on the object.
Kind: inner method of lib-filters
Returns: Object - The filtered object.
Mask the variable defined in the config on the object.
Follow the jsonpath pattern for masking: https://www.npmjs.com/package/jsonpath
Category: sync
| Param | Type | Description |
|---|---|---|
| object | Object | The object to apply filtering. |
| config | Object | The configuration to use for the filtering. |
7 months ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
4 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago