{"version":3,"sources":["../src/CowObj.ts"],"sourcesContent":["import eobj from './eobj';\n\nclass CowObj {\n  SJSON() {\n    return JSON.stringify(this);\n  }\n\n  toJSON() {\n    return {\n      ...this,\n      __methods: this.extractMethods(),\n    };\n  }\n\n  private extractMethods() {\n    const methods: Record<string, string> = {};\n    for (const key in this)\n      if (typeof this[key] === 'function')\n        methods[key] = String(this[key]);\n    return methods;\n  }\n}\n\nexport default eobj(CowObj).default;\n\nexport type CowObject<Object = {}> = Object & Partial<{\n  __methods: Record<string, string>;\n}>"],"mappings":";yCAEA,IAAMA,EAAN,KAAa,CACX,OAAQ,CACN,OAAO,KAAK,UAAU,IAAI,CAC5B,CAEA,QAAS,CACP,MAAO,CACL,GAAG,KACH,UAAW,KAAK,eAAe,CACjC,CACF,CAEQ,gBAAiB,CACvB,IAAMC,EAAkC,CAAC,EACzC,QAAWC,KAAO,KACZ,OAAO,KAAKA,CAAG,GAAM,aACvBD,EAAQC,CAAG,EAAI,OAAO,KAAKA,CAAG,CAAC,GACnC,OAAOD,CACT,CACF,EAEOE,EAAQC,EAAKJ,CAAM,EAAE","names":["CowObj","methods","key","CowObj_default","eobj_default"]}