Move plugins to this repo

This commit is contained in:
Gregory Schier
2024-06-27 21:44:45 -07:00
parent d1d08963fb
commit a63b485b95
35 changed files with 6931 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
import { DOMParser } from '@xmldom/xmldom';
import xpath from 'xpath';
export function pluginHookResponseFilter(
_ctx: any,
{ filter, body }: { filter: string; body: string },
) {
const doc = new DOMParser().parseFromString(body, 'text/xml');
return `${xpath.select(filter, doc)}`;
}