@qiwi/masker-secret-key
v2.0.1
Published
Hide sensitive data by key/path pattern match
Downloads
1,098
Readme
@qiwi/masker-secret-key
Hide sensitive data by key/path pattern match
Install
yarn add @qiwi/masker-secret-key
Usage
import {masker} from '@qiwi/masker'
import {pipe as secretKey} from '@qiwi/masker-secret-key'
masker({ secret: 'foo' }, {
pipeline: [[secretKey, {pattern: /secret/g, pupeline: ['plain']}]]
})
// {secret: '***'}