Move plugin stuff around

This commit is contained in:
Gregory Schier
2024-01-15 14:33:51 -08:00
parent df3bfaaab7
commit 6b1d15415d
25 changed files with 3417 additions and 8 deletions

View File

@@ -0,0 +1,13 @@
import jp from 'jsonpath';
export function pluginHookResponseFilter({ text, filter }) {
let parsed;
try {
parsed = JSON.parse(text);
} catch (e) {
return;
}
const filtered = jp.query(parsed, filter);
return { filtered };
}