Loading
Code Deb

Code Deb Log Redact

Recursive immutable nested object masking Case-insensitive headers and token-like fields TypeScript examples, API reference and installation guidance.

Technical documentation for 27 Code Deb JavaScript and TypeScript SDKs, Verify and MCP APIs and the developer platform. Browse API references, authentic implementation examples and provider boundaries. Check actual npm availability before installing.

Verified npm release: @codedeb/log-redact@0.1.0 was publicly accessible with the correct version, latest dist-tag and tarball.

Safe structured masking before log emission, including headers, URL query values and nested records.

Build and verify from source

From the CodeDeb repository root:

npm ci
npm run test:nepal-sdks
npm run sdk:pack:verify
node scripts/sdk/stage-npm-package.mjs sdk-log-redact

The staged npm artifact is placed at .sdk-artifacts/npm-stage/sdk-log-redact. The source package remains private: true; only explicitly verified staged artifacts can be published.

Install the verified public version with npm install @codedeb/log-redact@0.1.0.

Quickstart — actual source exports

import {redactRecord,redactUrl} from '@codedeb/log-redact';
console.log(redactRecord({user:'Ram',authorization:'Bearer something-secret-123456'}));
console.log(redactUrl('https://example.com?api_key=mysecret'))

These imports use the published npm entrypoints. The bundled JavaScript and TypeScript exports are exercised in an isolated consumer during the candidate release gate.

API reference

ExportPurpose
redactRecord(value, options)Walk nested plain data without mutation and mask configured keys.
redactText(text)Mask common credential-bearing fragments in strings.
redactUrl(url, extraKeys)Redact recognized credential query keys and URL userinfo.

Production integration and limitations

Pattern-based redaction is not an exhaustive detector of private information. Do not log raw payment information or secrets and expect a redactor to make the log safe; prefer allowlists, minimal retention and access policies.

Versioning and attribution

  • 0.1.0 — candidate (2026-11-21): Initial independent ESM package and TypeScript declarations, subject to runtime, type, security and publication checks.
  • License: Apache-2.0 for Code Deb-authored package code. The full license text is attached only to the reviewed public tarball. Code Deb brand names and logos are not licensed as trademarks.
  • Documentation: API reference · All SDKs · Developer resources
  • Related research: Source

No hosted service, support SLA or official Nepal government certification is implied by the package.

End-to-end integration procedure

  1. Mask secrets before events leave the application process.
  2. Test deeply nested objects, authorization headers and URLs with query tokens.
  3. Confirm redaction does not mutate caller-owned objects.
  4. Apply independent access control and retention to the observability store.

Install and verify the distribution

npm view @codedeb/log-redact@0.1.0 version
npm install @codedeb/log-redact@0.1.0

Pin 0.1.0 in a reproducible lockfile and exercise the published JavaScript and TypeScript declarations in an isolated consumer. Do not import files directly from the private source monorepo.

Production readiness tests

  • Validate normal, missing, malformed and boundary inputs using actual package imports.
  • Confirm application-owned adapters preserve authorization, tenant separation and durable state where relevant.
  • Record deterministic outputs and failure reasons; reject silent coercion or ambiguous success.
  • Review data retention, security and third-party licensing where applicable.

Troubleshooting

npm 404: Check the exact immutable version at npm; registry propagation and metadata publication are separate from local tarball packaging. Incorrect values: Check whether caller inputs were converted between text, numbers and locale formats. Unexpected integrations: Review the application's persistence and authorization boundaries; no hosted platform is included.

webhook kit · sdk core · All SDKs · Developer resources

More from Code Deb

Read about our agency, explore available services, or contact the team for a project discussion.