mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-17 22:21:26 +01:00
Move plugin stuff around
This commit is contained in:
1 parent
f55c8aba56
commit
d23de93917
25 files changed
+3417
-8
No files matched your search
@@ -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 };
|
||||
}
|
||||
Reference in new issue
Block a user