MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / clean

Function clean

packages/utilities/src/object.ts:1–9  ·  view source on GitHub ↗
(input: any)

Source from the content-addressed store, hash-verified

1export function clean(input: any): any {
2 return Object.entries(input).reduce((output, [key, value]) => {
3 if (value) {
4 // @ts-ignore
5 output[key] = value;
6 }
7 return output;
8 }, {});
9}
10
11export const toObject = <T extends Record<string, any>, K extends keyof T>(
12 arr: T[],

Callers 1

object.spec.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected