Example
const libFilters = require('@mimik/lib-filters');
-
lib-filters
-
~lengthyString(object, length) ⇒
Object
-
~isProd(env) ⇒
Boolean
-
~logs(object, config) ⇒
Object
-
~lengthyString(object, length) ⇒
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. |
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. |
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. |