concealotron
concealotron takes an object and returns a copy that has all of the string fields truncated. This is useful for when you want to log an object but it contains sensitive ids, e.g. database fields or secrets. Non string fields are left untouched. The default truncation is to 3 characters, which is normally enough to allow the identification of entities that are known to the developer or operations
Install
npm i -D concealotron
Usage
import objectConceal from "concealotron"
objectConceal() // true
License
MIT © Ed Sykes