webmention-handler
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "webmention-handler", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "A handler for web mentions", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
# webmention-handler | ||
`webmention-handler` is a nodejs handler for the 2017 W3C Recomendation Spec of [webmentions](https://www.w3.org/TR/webmention/). Written in TypesScript and including full type definitions. | ||
## Should I use this package | ||
No, not right now. It's still technically an in-dev and shouldn't even really be considered a release. | ||
## What is a webmention | ||
@@ -8,0 +5,0 @@ A Webmention is a notification that one URL links to another. For example, Alice writes an interesting post on her blog. Bob then writes a response to her post on his own site, linking back to Alice's original post. Bob's publishing software sends a Webmention to Alice notifying that her article was replied to, and Alice's software can show that reply as a comment, like, repost or other relevant type on the original post. |
@@ -19,2 +19,3 @@ import { convertHEntryToMention } from "../functions/convert-h-entry-to-mention"; | ||
blacklist?: string[]; | ||
stripQueryParameters: boolean; | ||
@@ -28,2 +29,3 @@ constructor(options: WebMentionOptions) { | ||
this.blacklist = options.blacklist; | ||
this.stripQueryParameters = options.stripQueryParameters || false; | ||
} | ||
@@ -67,2 +69,4 @@ | ||
targetUrl.hash = ''; | ||
if(this.stripQueryParameters) targetUrl.search = ''; | ||
@@ -69,0 +73,0 @@ // TODO: add support for returning a mention status url |
@@ -9,2 +9,3 @@ import { IWebMentionStorage } from "../interfaces/web-mention-storage.interface" | ||
supportedHosts: string[]; | ||
stripQueryParameters?: boolean; | ||
} |
93819
1052
87