New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/redact-secrets

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/redact-secrets - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

45

redact-secrets/index.d.ts

@@ -5,11 +5,50 @@ // Type definitions for redact-secrets 1.0

// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.7
interface Redactor {
map: (obj: any) => any;
forEach: (obj: any) => void;
/**
* @param obj The object to redact.
* @returns A clone of the given `obj` with its secret values redacted.
*/
map<TObj extends Record<string, any>>(obj: TObj): TObj;
/**
* Redacts the secret values of the `obj` in-place.
*
* @param obj The object to redact.
*/
forEach(obj: Record<string, unknown>): void;
}
/**
* Create a redactor instance.
*
* @param redacted The string used as a replacement variable for values that are redacted.
*
* @example
* const makeRedact = require('redact-secrets')
*
* const redact = makeRedact('[REDACTED]')
*
* const obj = {
* username: 'watson',
* password: 'hhGu38gf',
* extra: {
* id: 1,
* token: 'some-secret-stuff'
* card: '1234 1234 1234 1234'
* }
* }
*
* console.log(redact.map(obj))
* // {
* // username: 'watson',
* // password: '[REDACTED]',
* // extra: {
* // id: 1,
* // token: '[REDACTED]'
* // card: '[REDACTED]'
* // }
* // }
*/
declare function Redact(redacted: string): Redactor;
export = Redact;

7

redact-secrets/package.json
{
"name": "@types/redact-secrets",
"version": "1.0.0",
"version": "1.0.1",
"description": "TypeScript definitions for redact-secrets",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redact-secrets",
"license": "MIT",

@@ -22,4 +23,4 @@ "contributors": [

"dependencies": {},
"typesPublisherContentHash": "86d8fe513e3661c3616f779a7712a9d96ee85284979034888fb73e69d12e049c",
"typeScriptVersion": "3.0"
"typesPublisherContentHash": "0dbc571b2c9cc3407376dca892900894c6f8245d293434e6a998653653ad3f52",
"typeScriptVersion": "4.1"
}

@@ -9,5 +9,62 @@ # Installation

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redact-secrets.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redact-secrets/index.d.ts)
````ts
// Type definitions for redact-secrets 1.0
// Project: https://github.com/watson/redact-secrets#readme
// Definitions by: wrumsby <https://github.com/wrumsby>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface Redactor {
/**
* @param obj The object to redact.
* @returns A clone of the given `obj` with its secret values redacted.
*/
map<TObj extends Record<string, any>>(obj: TObj): TObj;
/**
* Redacts the secret values of the `obj` in-place.
*
* @param obj The object to redact.
*/
forEach(obj: Record<string, unknown>): void;
}
/**
* Create a redactor instance.
*
* @param redacted The string used as a replacement variable for values that are redacted.
*
* @example
* const makeRedact = require('redact-secrets')
*
* const redact = makeRedact('[REDACTED]')
*
* const obj = {
* username: 'watson',
* password: 'hhGu38gf',
* extra: {
* id: 1,
* token: 'some-secret-stuff'
* card: '1234 1234 1234 1234'
* }
* }
*
* console.log(redact.map(obj))
* // {
* // username: 'watson',
* // password: '[REDACTED]',
* // extra: {
* // id: 1,
* // token: '[REDACTED]'
* // card: '[REDACTED]'
* // }
* // }
*/
declare function Redact(redacted: string): Redactor;
export = Redact;
````
### Additional Details
* Last updated: Thu, 28 May 2020 01:34:46 GMT
* Last updated: Wed, 23 Nov 2022 18:11:55 GMT
* Dependencies: none

@@ -14,0 +71,0 @@ * Global values: none

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