open-index/open-npm huggingface dataset:
npm package: @smithy/util-hex-encoding
Description: Converts binary buffers to and from lowercase hexadecimal encoding
Author: AWS SDK for JavaScript Team
Latest version: 4.2.2

# @smithy/util-hex-encoding

[![NPM version](https://img.shields.io/npm/v/@smithy/util-hex-encoding/latest.svg)](https://www.npmjs.com/package/@smithy/util-hex-encoding)
[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-hex-encoding.svg)](https://www.npmjs.com/package/@smithy/util-hex-encoding)
npm package: @smithy/util-middleware
Description: Shared utilities for to be used in middleware packages.
Author: AWS SDK for JavaScript Team
Latest version: 4.2.13

# @smithy/util-middleware

[![NPM version](https://img.shields.io/npm/v/@smithy/util-middleware/latest.svg)](https://www.npmjs.com/package/@smithy/util-middleware)
[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-middleware.svg)](https://www.npmjs.com/package/@smithy/util-middleware)

### :warning: Internal API :warning:

> This is an internal package.
> That means this is used as a dependency for other, public packages, but
> should not be taken directly as a dependency in your application's `package.json`.

> If you are updating the version of this package, for example to bring in a
> bug-fix, you should do so by updating your application lockfile with
> e.g. `npm up @scope/package` or equivalent command in another
> package manager, rather than taking a direct dependency.

---
npm package: @smithy/util-retry
Description: Shared retry utilities to be used in middleware packages.
Author: AWS SDK for JavaScript Team
Latest version: 4.3.1

# @smithy/util-retry

[![NPM version](https://img.shields.io/npm/v/@smithy/util-retry/latest.svg)](https://www.npmjs.com/package/@smithy/util-retry)
[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-retry.svg)](https://www.npmjs.com/package/@smithy/util-retry)

This package provides shared utilities for retries.

## Usage

### Default

By default, each client already has a default retry strategy. The default retry count is 3, and
only retryable errors will be retried.

[AWS Documentation: Retry behavior](https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html).

```js
import { S3Client } from "@aws-sdk/client-s3";

const client = new S3Client({}); // default retry strategy included.
```

### MaxAttempts

If you want to change the number of attempts, you can provide `maxAttempts` configuration during client creation.

```js
import { S3Client } from "@aws-sdk/client-s3";

const client = new S3Client({ maxAttempts: 4 });
```

This is recommended because the `StandardRetryStrategy` includes backoff calculation,
deciding whether an error should be retried, and a retry token counter.

### MaxAttempts and BackoffComputation

If you want to change the number of attempts and use a custom delay
computation, you can use the `ConfiguredRetryStrategy` from `@smithy/util-retry`.

```js
import { S3Client } from "@aws-sdk/client-s3";
import { ConfiguredRetryStrategy } from "@smithy/util-retry";

const client = new S3Client({
  retryStrategy: new ConfiguredRetryStrategy(
    4, // max attempts.
    (attempt: number) => 100 + attempt * 1000 // backoff function.
  ),
});
```

This example sets the backoff at 100ms plus 1s per attempt.

### MaxAttempts and RetryStrategy

If you provide both `maxAttempts` and `retryStrategy`, the `retryStrategy` will
get precedence as it's more specific.

```js
import { S3Client } from "@aws-sdk/client-s3";
import { ConfiguredRetryStrategy } from "@smithy/util-retry";

const client = new S3Client({
  maxAttempts: 2, // ignored.
  retryStrategy: new ConfiguredRetryStrategy(
    4, // used.
    (attempt: number) => 100 + attempt * 1000 // backoff function.
  ),
});
```

### Further customization

You can implement the `RetryStrategyV2` interface.

Source: https://github.com/smithy-lang/smithy-typescript/blob/main/packages/types/src/retry.ts
API Docs: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-types/Interface/RetryStrategyV2/
npm package: @smithy/util-stream
Description: [![NPM version](https://img.shields.io/npm/v/@smithy/util-stream/latest.svg)](https://www.npmjs.com/package/@smithy/util-stream) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-stream.svg)](https://www.npmjs.com/package/@smithy/util-stream)
Author: AWS SDK for JavaScript Team
Latest version: 4.5.22

# @smithy/util-stream

[![NPM version](https://img.shields.io/npm/v/@smithy/util-stream/latest.svg)](https://www.npmjs.com/package/@smithy/util-stream)
[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-stream.svg)](https://www.npmjs.com/package/@smithy/util-stream)

Package with utilities to operate on streams.
npm package: @smithy/util-stream-browser
Description: [![NPM version](https://img.shields.io/npm/v/@smithy/util-stream-browser/latest.svg)](https://www.npmjs.com/package/@smithy/util-stream-browser) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-stream-browser.svg)](https://www.npmjs.com/packag
Author: AWS SDK for JavaScript Team
Latest version: 3.2.16

# @smithy/util-stream-browser

[![NPM version](https://img.shields.io/npm/v/@smithy/util-stream-browser/latest.svg)](https://www.npmjs.com/package/@smithy/util-stream-browser)
[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-stream-browser.svg)](https://www.npmjs.com/package/@smithy/util-stream-browser)

Package with utilities to operate on browser streams.

> An internal package

## Usage

This package is deprecated for `@smithy/util-stream`, which provides the same functionality merging Node.js and browser.
npm package: @smithy/util-stream-node
Description: [![NPM version](https://img.shields.io/npm/v/@smithy/util-stream-node/latest.svg)](https://www.npmjs.com/package/@smithy/util-stream-node) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-stream-node.svg)](https://www.npmjs.com/package/@smithy
Author: AWS SDK for JavaScript Team
Latest version: 4.2.20

# @smithy/util-stream-node

[![NPM version](https://img.shields.io/npm/v/@smithy/util-stream-node/latest.svg)](https://www.npmjs.com/package/@smithy/util-stream-node)
[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-stream-node.svg)](https://www.npmjs.com/package/@smithy/util-stream-node)

Package with utilities to operate on Node.JS streams.

> An internal package

## Usage

This package is deprecated for `@smithy/util-stream`, which provides the same functionality merging Node.js and browser.
npm package: @smithy/util-uri-escape
Description: [![NPM version](https://img.shields.io/npm/v/@smithy/util-uri-escape/latest.svg)](https://www.npmjs.com/package/@smithy/util-uri-escape) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-uri-escape.svg)](https://www.npmjs.com/package/@smithy/ut
Author: AWS SDK for JavaScript Team
Latest version: 4.2.2

# @smithy/util-uri-escape

[![NPM version](https://img.shields.io/npm/v/@smithy/util-uri-escape/latest.svg)](https://www.npmjs.com/package/@smithy/util-uri-escape)
[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-uri-escape.svg)](https://www.npmjs.com/package/@smithy/util-uri-escape)

> An internal package

## Usage

You probably shouldn't, at least directly.
npm package: @smithy/util-utf8
Description: A UTF-8 string <-> UInt8Array converter
Author: AWS SDK for JavaScript Team
Latest version: 4.2.2

# @smithy/util-utf8

[![NPM version](https://img.shields.io/npm/v/@smithy/util-utf8/latest.svg)](https://www.npmjs.com/package/@smithy/util-utf8)
[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-utf8.svg)](https://www.npmjs.com/package/@smithy/util-utf8)
npm package: @smithy/util-waiter
Description: Shared utilities for client waiters for the AWS SDK
Author: AWS SDK for JavaScript Team
Latest version: 4.2.15

# @smithy/util-waiter

[![NPM version](https://img.shields.io/npm/v/@smithy/util-waiter/latest.svg)](https://www.npmjs.com/package/@smithy/util-waiter)
[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-waiter.svg)](https://www.npmjs.com/package/@smithy/util-waiter)

### :warning: Internal API :warning:

> This is an internal package.
> That means this is used as a dependency for other, public packages, but
> should not be taken directly as a dependency in your application's `package.json`.

> If you are updating the version of this package, for example to bring in a
> bug-fix, you should do so by updating your application lockfile with
> e.g. `npm up @scope/package` or equivalent command in another
> package manager, rather than taking a direct dependency.

---
npm package: @smithy/uuid
Description: Polyfill for generating UUID v4
Author: AWS SDK for JavaScript Team
Latest version: 1.1.2

# @smithy/uuid

[![NPM version](https://img.shields.io/npm/v/@smithy/uuid/latest.svg)](https://www.npmjs.com/package/@smithy/uuid)
[![NPM downloads](https://img.shields.io/npm/dm/@smithy/uuid.svg)](https://www.npmjs.com/package/@smithy/uuid)

> An internal package

## Usage

This is an internal `@smithy` package. You should not install it as a direct dependency in your applications.