json-map-keys-jest
v1.2.0
Published
Jest transformer to replace json values with the key path.
Maintainers
Readme
json-map-keys-jest
Jest transformer to replace json values with the keys path.
Example:
{
"a": {
"b": "Text Note"
}
}Will generate
{
"a": {
"b": "a.b"
}
}Install
npm install json-map-keys-jest --save-devUsage
/** @type {import('jest').Config} */
export default {
transform: {
'data\\.json$': ['json-map-keys-jest', { prefix: '[name]:' }]
}
}License
JSON Map Keys Jest © 2020 by Tiago Porto is licensed under MIT License.
