All files / lib model-transform.js

27.27% Statements 3/11
100% Branches 0/0
0% Functions 0/1
27.27% Lines 3/11

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 111x                 1x 1x
// toModelRegion
function toModel(obj) {
	return Object.keys(obj)
		.filter(p => p.startsWith('_'))
		.reduce((acc, p) => {
			acc[p.substring(1)] = obj[p];
			return acc;
		}, {});
}
 
exports.toModel = toModel;