Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fast-redact

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-redact - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

2

lib/parse.js

@@ -12,3 +12,3 @@ 'use strict'

var path = strPath.match(rx).map((p) => p.replace(/'|"|`/g, ''))
const leadingBracket = ix === 0 && strPath[0] === '['
const leadingBracket = strPath[0] === '['
path = path.map((p) => {

@@ -15,0 +15,0 @@ if (p[0] === '[') return p.substr(1, p.length - 2)

{
"name": "fast-redact",
"version": "1.4.0",
"version": "1.4.1",
"description": "very fast object redaction",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -868,3 +868,3 @@ 'use strict'

test('correctly restores original object when a matchin path has value of `undefined`', ({ end, is }) => {
test('correctly restores original object when a matching path has value of `undefined`', ({ end, is }) => {
const redact = fastRedact({ paths: ['foo.bar'], strict: false })

@@ -877,1 +877,8 @@ const o = { bar: undefined }

})
test('handles multiple paths with leading brackets', ({ end, is }) => {
const redact = fastRedact({ paths: ['["x-y"]', '["y-x"]'] })
const o = { 'x-y': 'test', 'y-x': 'test2' }
is(redact(o), '{"x-y":"[REDACTED]","y-x":"[REDACTED]"}')
end()
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc