New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@baselime/paginate-aws

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@baselime/paginate-aws

Typesafe AWS Pagination using async generators

latest
Source
npmnpm
Version
1.0.6
Version published
Maintainers
2
Created
Source

paginate-aws

Typesafe AWS Pagination using async generators

Useful when you need to paginate and AWS SDK call (v2/v3). Works with any aws operation with a paginationKey and uses typescript to help (but not guarantee) you have selected the correct pagination key

Pagination Key Help

Install

npm install @baselime/paginate-aws

Usage

import { paginate } from '@baselime/paginate-aws';

for await (const stacks of paginate((next) => cloudFormation.listStacks({ NextToken: next }).promise(), 'NextToken')) {
    console.log(stacks.StackSummaries)
    //=> [{ StackName: 'prod-just-ship-it-be-cool', ...}, ...]
}

API

paginate((next: string) => somePromise({ next }), paginationKey: string)

returns an async generator that paginates through the aws-sdk list method returning all the responses.

Keywords

Pagination

FAQs

Package last updated on 23 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts