@vtex/api
Version:
VTEX I/O API client
7 lines (6 loc) • 310 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.renameBy = void 0;
const ramda_1 = require("ramda");
const renameBy = (fn, obj) => (0, ramda_1.compose)(ramda_1.fromPairs, (0, ramda_1.map)(([key, val]) => [fn(key), val]), ramda_1.toPairs)(obj);
exports.renameBy = renameBy;