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

seam

Package Overview
Dependencies
Maintainers
0
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seam - npm Package Compare versions

Comparing version 1.49.0 to 1.50.0

4

package.json
{
"name": "seam",
"version": "1.49.0",
"version": "1.50.0",
"description": "JavaScript SDK for the Seam API written in TypeScript.",

@@ -68,3 +68,3 @@ "type": "module",

"dependencies": {
"@seamapi/http": "1.25.0",
"@seamapi/http": "1.25.1",
"@seamapi/types": "1.356.0",

@@ -71,0 +71,0 @@ "@seamapi/webhook": "1.1.1",

@@ -48,2 +48,3 @@ # Seam JavaScript SDK

- [Manually fetch pages with the nextPageCursor](#manually-fetch-pages-with-the-nextpagecursor)
- [Resume pagination](#resume-pagination)
- [Iterate over all pages](#iterate-over-all-pages)

@@ -343,2 +344,28 @@ - [Iterate over all resources](#iterate-over-all-resources)

#### Resume pagination
Get the first page on initial load:
```ts
const params = { limit: 20 }
const pages = seam.createPaginator(seam.devices.list(params))
const [devices, pagination] = await pages.firstPage()
localStorage.setItem('/seam/devices/list', JSON.stringify([params, pagination]))
```
Get the next page at a later time:
```ts
const [params = {}, { hasNextPage = false, nextPageCursor = null } = {}] =
JSON.parse(localStorage.getItem('/seam/devices/list') ?? '[]')
if (hasNextPage) {
const pages = seam.createPaginator(seam.devices.list(params))
const [moreDevices] = await pages.nextPage(nextPageCursor)
}
```
#### Iterate over all pages

@@ -381,3 +408,3 @@

const devices = await pages.toArray()
const devices = await pages.flattenToArray()
```

@@ -384,0 +411,0 @@

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