export type TGetMapFromObjArgs = Parameters; export type TGetMapFromObjReturn = ReturnType; /** * Gets a Map from object * @template K,V * @param {Record} [obj={}] Source object * @param {(key: string, value: V, index: number) => boolean} [getFiltered] Filter function for each entry * @returns {Map} Resulting map * @throws {TypeError} getMapFromObj: obj must be a plain object * @throws {TypeError} getMapFromObj: getFiltered must be a function * @example * // How to convert an object to ES6 Map and pass only number values? * const sourceObj = { hello: "world", goodbye: 1 }; * const targetMap = getMapFromObj(sourceObj as any, (_k, v) => typeof v === "number"); * console.log(targetMap); // => Map { "goodbye" => 1 } * @example * // Convert a permission configuration object into a lookup Map * const permissions = getMapFromObj({ edit: true, delete: false }, (_key, allowed) => allowed); * permissions.has("edit"); // => true */ export declare const getMapFromObj: (obj?: Record, getFiltered?: (key: string, value: V, index: number) => boolean) => Map;