@mimik/lib-filters
v1.5.4
Published
Libraries for filter process
Downloads
464
Readme
lib-filters
Example
const libFilters = require('@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. |