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.1 to 1.4.2

2

lib/restorer.js

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

: `o${delim}${path} = secret[${escPath}].val`
const clear = `secret[${escPath}].val = null`
const clear = `secret[${escPath}].val = undefined`
return `

@@ -45,0 +45,0 @@ if (secret[${escPath}].val !== undefined) {

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

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

@@ -883,1 +883,15 @@ 'use strict'

})
test('handles objects with and then without target paths', ({ end, is }) => {
const redact = fastRedact({ paths: ['test'] })
const o1 = { test: 'check' }
const o2 = {}
is(redact(o1), '{"test":"[REDACTED]"}')
is(redact(o2), '{}')
// run each check twice to ensure no mutations
is(redact(o1), '{"test":"[REDACTED]"}')
is(redact(o2), '{}')
is('test' in o1, true)
is('test' in o2, false)
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