UNPKG

@hackylabs/deep-redact

Version:

A fast, safe and configurable zero-dependency library for redacting strings or deeply redacting arrays and objects.

13 lines (12 loc) 284 B
export const _error = (value) => { if (!(value instanceof Error)) return value; return { _transformer: 'error', value: { type: value.constructor.name, message: value.message, stack: value.stack, }, }; };