UNPKG

@techmely/utils

Version:

Collection of helpful JavaScript / TypeScript utils

19 lines (14 loc) 330 B
'use strict'; /*! * @techmely/utils * Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com> * MIT Licensed */ // src/listify/index.ts function listify(obj, mapFn) { return Object.entries(obj).reduce((acc, [key, value]) => { acc.push(mapFn(key, value)); return acc; }, []); } exports.listify = listify;