• Returns a shallow object made of only the keys and values for each path.

    Parameters

    • paths: string[]

    Returns (<T>(data) => {
        [k: string]: T;
    })

      • <T>(data): {
            [k: string]: T;
        }
      • Type Parameters

        • T extends Record<string, unknown>

        Parameters

        • data: T

        Returns {
            [k: string]: T;
        }

        • [k: string]: T

    Example

    pick(['hello', 'foo.bar'])({
    hello: "world",
    foo: {
    bar: "zip"
    }
    })
    // => { hello: "world", bar: "zip" }

Generated using TypeDoc