-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from lrecknagel/multi-wildcard-support-finaliz…
…ation Multi wildcard support finalization
- Loading branch information
Showing
8 changed files
with
288 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
node_modules | ||
.nyc_output | ||
package-lock.json | ||
coverage | ||
coverage | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use strict' | ||
const fastRedact = require('..') | ||
const redact = fastRedact({ paths: ['a[*].c.d[*].i'] }) | ||
const obj = { | ||
a: [ | ||
{ c: { d: [ { i: 'redact me', j: 'not me' } ], e: 'leave me be' } }, | ||
{ c: { d: [ { i: 'redact me too', j: 'not me' }, { i: 'redact me too', j: 'not me' } ], f: 'I want to live' } }, | ||
{ c: { d: [ { i: 'redact me 3', j: 'not me' } ], g: 'I want to run in a stream' } } | ||
] | ||
} | ||
console.log(redact(obj)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use strict' | ||
const fastRedact = require('..') | ||
const redact = fastRedact({ paths: ['a[*].c.d[*]'] }) | ||
const obj = { | ||
a: [ | ||
{ c: { d: ['hide me', '2'], e: 'leave me be' } }, | ||
{ c: { d: ['and me'], f: 'I want to live' } }, | ||
{ c: { d: ['and also I'], g: 'I want to run in a stream' } } | ||
] | ||
} | ||
console.log(redact(obj)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use strict' | ||
const fastRedact = require('..') | ||
const redact = fastRedact({ paths: ['a[*].c[*].d'] }) | ||
const obj = { | ||
a: [ | ||
{ c: [{ d: 'hide me', e: 'leave me be' }, { d: 'hide me too', e: 'leave me be' }, { d: 'hide me 3', e: 'leave me be' }] }, | ||
{ c: [{ d: 'and me', f: 'I want to live' }] }, | ||
{ c: [{ d: 'and also I', g: 'I want to run in a stream' }] } | ||
] | ||
} | ||
console.log(redact(obj)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.