UNPKG

@neurosity/sdk

Version:
18 lines (17 loc) 516 B
import { pipe } from "rxjs"; import { map } from "rxjs/operators"; export function filterInternalKeys() { return pipe(map((status) => { if (!status) { return status; } // remove internal properties that start with "__" const filteredStatus = Object.entries(status).reduce((acc, [key, value]) => { if (!key.startsWith("__")) { acc[key] = value; } return acc; }, {}); return filteredStatus; })); }