Skip to content

Commit

Permalink
feat: add Symbol.toStringTag (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykzts authored Mar 2, 2023
1 parent 9527c35 commit bbe6db6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ export class SitemapTransformer {
this.#indent = pretty ? ' ' : ''
}

/**
* @returns {string}
*/
get [Symbol.toStringTag]() {
return 'SitemapTransformer'
}

/** @type {TransformerFlushCallback<string>} */
flush(controller) {
controller.enqueue(`</urlset>${this.#lf}`)
Expand Down Expand Up @@ -127,6 +134,13 @@ export class SitemapStream {
)
}

/**
* @returns {string}
*/
get [Symbol.toStringTag]() {
return 'SitemapStream'
}

/**
* @returns {ReadableStream<string>}
*/
Expand Down

0 comments on commit bbe6db6

Please sign in to comment.