UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

1 lines 502 B
import{isObject}from"#shared/guards.js";function normalizeSessionInboxWireV2(e,t=!1){return e===void 0?t?null:void 0:Array.isArray(e)?e.map(e=>normalizeSessionInboxWireV2(e,!0)):isPlainRecord$1(e)?Object.fromEntries(Object.entries(e).filter(e=>e[1]!==void 0).map(([e,t])=>[e,normalizeSessionInboxWireV2(t)])):e}function isPlainRecord$1(e){if(!isObject(e))return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null}export{normalizeSessionInboxWireV2};