Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

edge-sitemap

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edge-sitemap - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

47

./src/index.js
/**
* @typedef {('always'|'daily'|'hourly'|'monthly'|'never'|'weekly'|'yearly')} SitemapChangeFreq
* @typedef {'always' | 'daily' | 'hourly' | 'monthly' | 'never' | 'weekly' | 'yearly'} SitemapChangeFreq
*/

@@ -7,6 +7,6 @@

* @typedef {Object} SitemapItem
* @property {SitemapChangeFreq=} changefreq
* @property {`${number}-${number}-${number}`=} lastmod
* @property {SitemapChangeFreq} [changefreq]
* @property {`${number}-${number}-${number}`} [lastmod]
* @property {(URL|string)} loc
* @property {number=} priority
* @property {number} [priority]
*/

@@ -16,4 +16,4 @@

* @typedef {Object} SitemapTransformerOptions
* @property {(URL|string)=} baseURL
* @property {boolean=} pretty
* @property {URL | string} [baseURL]
* @property {boolean} [pretty]
*/

@@ -25,3 +25,3 @@

export class SitemapTransformer {
/** @type {(URL|string)=} */
/** @type {URL | string | undefined} */
#baseURL

@@ -34,3 +34,3 @@ /** @type {string} */

/**
* @param {SitemapTransformerOptions=} options
* @param {SitemapTransformerOptions} [options]
*/

@@ -109,12 +109,15 @@ constructor(

* @typedef {Object} SitemapStreamOptions
* @property {(URL|string)=} baseURL
* @property {boolean=} pretty
* @property {URL | string} [baseURL]
* @property {boolean} [pretty]
*/
/**
* @extends {TransformStream<SitemapItem, string>}
* @implements {TransformStream<SitemapItem, string>}
*/
export class SitemapStream extends TransformStream {
export class SitemapStream {
/** @type {TransformStream<SitemapItem, string>} */
#transformStream
/**
* @param {SitemapStreamOptions=} options
* @param {SitemapStreamOptions} [options]
*/

@@ -127,4 +130,20 @@ constructor(

) {
super(new SitemapTransformer({ baseURL, pretty }))
this.#transformStream = new TransformStream(
new SitemapTransformer({ baseURL, pretty })
)
}
/**
* @returns {ReadableStream<string>}
*/
get readable() {
return this.#transformStream.readable
}
/**
* @returns {WritableStream<SitemapItem>}
*/
get writable() {
return this.#transformStream.writable
}
}

@@ -42,3 +42,3 @@ {

"types": "./src/index.d.ts",
"version": "1.0.4",
"version": "1.0.5",
"scripts": {

@@ -45,0 +45,0 @@ "build": "tsc",

/**
* @typedef {('always'|'daily'|'hourly'|'monthly'|'never'|'weekly'|'yearly')} SitemapChangeFreq
* @typedef {'always' | 'daily' | 'hourly' | 'monthly' | 'never' | 'weekly' | 'yearly'} SitemapChangeFreq
*/
/**
* @typedef {Object} SitemapItem
* @property {SitemapChangeFreq=} changefreq
* @property {`${number}-${number}-${number}`=} lastmod
* @property {SitemapChangeFreq} [changefreq]
* @property {`${number}-${number}-${number}`} [lastmod]
* @property {(URL|string)} loc
* @property {number=} priority
* @property {number} [priority]
*/
/**
* @typedef {Object} SitemapTransformerOptions
* @property {(URL|string)=} baseURL
* @property {boolean=} pretty
* @property {URL | string} [baseURL]
* @property {boolean} [pretty]
*/

@@ -21,3 +21,3 @@ /**

/**
* @param {SitemapTransformerOptions=} options
* @param {SitemapTransformerOptions} [options]
*/

@@ -32,15 +32,24 @@ constructor({ baseURL, pretty }?: SitemapTransformerOptions | undefined);

* @typedef {Object} SitemapStreamOptions
* @property {(URL|string)=} baseURL
* @property {boolean=} pretty
* @property {URL | string} [baseURL]
* @property {boolean} [pretty]
*/
/**
* @extends {TransformStream<SitemapItem, string>}
* @implements {TransformStream<SitemapItem, string>}
*/
export class SitemapStream extends TransformStream<SitemapItem, string> {
export class SitemapStream implements TransformStream<SitemapItem, string> {
/**
* @param {SitemapStreamOptions=} options
* @param {SitemapStreamOptions} [options]
*/
constructor({ baseURL, pretty }?: SitemapStreamOptions | undefined);
/**
* @returns {ReadableStream<string>}
*/
get readable(): ReadableStream<string>;
/**
* @returns {WritableStream<SitemapItem>}
*/
get writable(): WritableStream<SitemapItem>;
#private;
}
export type SitemapChangeFreq = ('always' | 'daily' | 'hourly' | 'monthly' | 'never' | 'weekly' | 'yearly');
export type SitemapChangeFreq = 'always' | 'daily' | 'hourly' | 'monthly' | 'never' | 'weekly' | 'yearly';
export type SitemapItem = {

@@ -53,8 +62,8 @@ changefreq?: SitemapChangeFreq | undefined;

export type SitemapTransformerOptions = {
baseURL?: (URL | string) | undefined;
baseURL?: string | URL | undefined;
pretty?: boolean | undefined;
};
export type SitemapStreamOptions = {
baseURL?: (URL | string) | undefined;
baseURL?: string | URL | undefined;
pretty?: boolean | undefined;
};
/**
* @typedef {('always'|'daily'|'hourly'|'monthly'|'never'|'weekly'|'yearly')} SitemapChangeFreq
* @typedef {'always' | 'daily' | 'hourly' | 'monthly' | 'never' | 'weekly' | 'yearly'} SitemapChangeFreq
*/

@@ -7,6 +7,6 @@

* @typedef {Object} SitemapItem
* @property {SitemapChangeFreq=} changefreq
* @property {`${number}-${number}-${number}`=} lastmod
* @property {SitemapChangeFreq} [changefreq]
* @property {`${number}-${number}-${number}`} [lastmod]
* @property {(URL|string)} loc
* @property {number=} priority
* @property {number} [priority]
*/

@@ -16,4 +16,4 @@

* @typedef {Object} SitemapTransformerOptions
* @property {(URL|string)=} baseURL
* @property {boolean=} pretty
* @property {URL | string} [baseURL]
* @property {boolean} [pretty]
*/

@@ -25,3 +25,3 @@

export class SitemapTransformer {
/** @type {(URL|string)=} */
/** @type {URL | string | undefined} */
#baseURL

@@ -34,3 +34,3 @@ /** @type {string} */

/**
* @param {SitemapTransformerOptions=} options
* @param {SitemapTransformerOptions} [options]
*/

@@ -109,12 +109,15 @@ constructor(

* @typedef {Object} SitemapStreamOptions
* @property {(URL|string)=} baseURL
* @property {boolean=} pretty
* @property {URL | string} [baseURL]
* @property {boolean} [pretty]
*/
/**
* @extends {TransformStream<SitemapItem, string>}
* @implements {TransformStream<SitemapItem, string>}
*/
export class SitemapStream extends TransformStream {
export class SitemapStream {
/** @type {TransformStream<SitemapItem, string>} */
#transformStream
/**
* @param {SitemapStreamOptions=} options
* @param {SitemapStreamOptions} [options]
*/

@@ -127,4 +130,20 @@ constructor(

) {
super(new SitemapTransformer({ baseURL, pretty }))
this.#transformStream = new TransformStream(
new SitemapTransformer({ baseURL, pretty })
)
}
/**
* @returns {ReadableStream<string>}
*/
get readable() {
return this.#transformStream.readable
}
/**
* @returns {WritableStream<SitemapItem>}
*/
get writable() {
return this.#transformStream.writable
}
}
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