angular-cn/aio/transforms/examples-package/utils.js

7 lines
182 B
JavaScript

module.exports = {
mapObject(obj, mapper) {
const mappedObj = {};
Object.keys(obj).forEach(key => { mappedObj[key] = mapper(key, obj[key]); });
return mappedObj;
}
};