Socket
Socket
Sign inDemoInstall

@reecem/prismic-sitemap

Package Overview
Dependencies
15
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.0 to 0.4.2

2

package.json
{
"name": "@reecem/prismic-sitemap",
"version": "0.4.0",
"version": "0.4.2",
"description": "Sitemap Generator for Prismic and Next.js with Minimal Configuration",

@@ -5,0 +5,0 @@ "keywords": [

@@ -10,3 +10,3 @@ const Prismic = require("prismic-javascript");

* @param {Prismic} api prismic client
* @param {Object} options {pageSize, auto}
* @param {Object} options {pageSize}
*/

@@ -20,10 +20,18 @@ init(api, options = {}) {

/**
* This paginates automatically over the document list from Prismic
* @todo Add Lang support for scoping to a selection of languages.
*
* @param {String} type The Document type
* @param {Number} next The Next Page type
* @returns Promise
*/
async paginate(type, next = null) {
const { results, total_pages, page } = await this.api.query(
Prismic.Predicates.at("document.type", type),
{
lang: "*",
pageSize: this.pageSize,
page: next
}
{
lang: "*",
pageSize: this.pageSize,
page: next
}
);

@@ -33,3 +41,3 @@

if (total_pages > this.nextPage) {
if (total_pages !== page) {
return this.paginate(type, page + 1)

@@ -36,0 +44,0 @@ }

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