Socket
Socket
Sign inDemoInstall

@azure/core-paging

Package Overview
Dependencies
1
Maintainers
2
Versions
159
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @azure/core-paging

Core types for paging async iterable iterators


Version published
Weekly downloads
3M
decreased by-2.92%
Maintainers
2
Install size
161 kB
Created
Weekly downloads
 

Readme

Source

Azure Core Paging client library for JavaScript

This library provides core types for paging async iterable iterators.

Getting started

Installation

If using this as part of another project in the azure-sdk-for-js repo, then run rush install after cloning the repo.

Otherwise, use npm to install this package in your application as follows

npm install @azure/core-paging

Key concepts

You can find an explanation of how this repository's code works by going to our architecture overview.

Examples

Example of building with the types:

  public listSecrets(
    options: ListSecretsOptions = {}
  ): PagedAsyncIterableIterator<SecretAttributes> {
    const iter = this.listSecretsAll(options);
    return {
      async next() { return iter.next(); },
      [Symbol.asyncIterator]() { return this; },
      byPage: (settings: PageSettings = {}) => this.listSecretsPage(settings, options),
    };
  }

And using the types:

  for await (let page of client.listSecrets().byPage({ maxPageSize: 2 })) {
    for (const secret of page) {
      console.log("secret: ", secret);
    }
  }

Next steps

Try out this package in your application when dealing with async iterable iterators and provide feedback!

Troubleshooting

Log an issue at https://github.com/Azure/azure-sdk-for-js/issues

Contributing

If you'd like to contribute to this library, please read the contributing guide to learn more about how to build and test the code.

Impressions

Keywords

FAQs

Last updated on 11 Apr 2024

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc