mongodb-redact
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

mongodb-redact

Remove potentially sensitive information from objects without changing the shape.

Inspired by fruitsalad and mongo-redact.

Installation

npm install --save mongodb-redact

API

var redact = require('mongodb-redact');
 
// `variable` can be of any type, including object and array.
var result = redact(variable);

Redaction

The following types of strings are currently redacted:

  • Certificates and private keys
  • Electron application resource directories (Windows, OS X, Linux)
  • Generic user directories (Windows, OS X, Linux)
  • Email addresses
  • IP addresses
  • URLs
  • MongoDB connection strings

Does not redact any non-string types (e.g. numbers, dates, etc).

For examples, see ./test/index.test.js.

License

Apache 2.0

/mongodb-redact/

    Package Sidebar

    Install

    npm i mongodb-redact

    Weekly Downloads

    35,697

    Version

    0.2.2

    License

    Apache-2.0

    Unpacked Size

    14.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • orechova
    • himanshusinghs
    • c-buckingham
    • mongo-j
    • mabaasit
    • alexander_schroll
    • chuck.kalmanek
    • mongodb-js-user
    • rueckstiess
    • durran
    • lerouxb
    • fredtruman
    • mbroadst
    • hswolff
    • satyasinha
    • matt_d_rat
    • rhysm
    • tomhollander
    • alena.khineika
    • jeff-allen-mongo
    • mmarcon
    • jonathan.balsano
    • mongodb-build
    • jack.weir
    • stennie
    • mcasimir
    • kristina.stefano
    • jarjee
    • shaketbaby
    • devtoolsbot
    • addaleax
    • gribnoysup
    • mutukrish
    • imlucas