mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-19 07:53:54 +01:00
18 lines
412 B
JavaScript
18 lines
412 B
JavaScript
function u(r) {
|
|
let e;
|
|
try {
|
|
e = JSON.parse(r);
|
|
} catch {
|
|
return;
|
|
}
|
|
if (t(e) && "yaakSchema" in e && (e.yaakSchema === 1 && (e.resources.httpRequests = e.resources.requests, e.yaakSchema = 2), e.yaakSchema === 2))
|
|
return { resources: e.resources };
|
|
}
|
|
function t(r) {
|
|
return Object.prototype.toString.call(r) === "[object Object]";
|
|
}
|
|
export {
|
|
t as isJSObject,
|
|
u as pluginHookImport
|
|
};
|