HEX
Server: nginx/1.24.0
System: Linux nowruzgan 6.8.0-57-generic #59-Ubuntu SMP PREEMPT_DYNAMIC Sat Mar 15 17:40:59 UTC 2025 x86_64
User: babak (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/dev/shahnamag/front-end/node_modules/@npmcli/redact/README.md
# @npmcli/redact

Redact sensitive npm information from output.

## API

This will redact `npm_` prefixed tokens and UUIDs from values.

It will also replace passwords in stringified URLs.

### `redact(string)`

Redact values from a single value

```js
const { redact } = require('@npmcli/redact')

redact('https://user:pass@registry.npmjs.org/')
// https://user:***@registry.npmjs.org/

redact(`https://registry.npmjs.org/path/npm_${'a'.repeat('36')}`)
// https://registry.npmjs.org/path/npm_***
```

### `redactLog(string | string[])`

Redact values from a string or array of strings.

This method will also split all strings on `\s` and `=` and iterate over them.

```js
const { redactLog } = require('@npmcli/redact')

redactLog([
  'Something --x=https://user:pass@registry.npmjs.org/ foo bar',
  '--url=http://foo:bar@registry.npmjs.org',
])
// [
//   'Something --x=https://user:***@registry.npmjs.org/ foo bar',
//   '--url=http://foo:***@registry.npmjs.org/',
// ]
```