• Obtain 1 or more properties from the specified sources. Specify the property names separated by a separator (" " by default). Returns an array of values for each specified property in the names. Each property is returned from the first object containing it.

    Parameters

    • names: string
    • scopes: any[]
    • Optional sep: string

    Returns any[]

    Example

    const fbProps = { f: 20, g: 7 };
    const mainProps = { a: 1, b: { c: 1, d: 2 }, e: 3, f: 100 };
    console.log(props('e f g', [mainProps, fbProps])); // [3, 100, 7]