UNPKG

@rashedmakkouk/dev-utils

Version:
16 lines (15 loc) 447 B
/** * Extracts values from supplied `key` (i-e 'id') and converts any value to * array; drops object values. * * @param key - Object field name property to extract values from. * @param payload - List of results. */ declare function extractValues({ key, payload, separator, }: { key: string; payload: { [key: string]: unknown; } | unknown[]; separator?: string; }): string[] | number[]; export default extractValues;