# src/helpers/DatasetHelper.js

## Maintainability

81.26

## Lines of code

21

## Difficulty

14.18

## Estimated Errors

0.17

## Function weight

### By Complexity

### By SLOC

import _ from 'lodash'; import { convertParameterNameToAlias } from './Parameters.js'; export function getDatasetParameterByName(dataset, parameterName) { var parameter = _.find(dataset.parameters, function (o) { return o.name === parameterName }); if (parameter) { if (parameter.value) { return parameter.value; } } return; }; export function getDatasetParameterByPrefixName(dataset, prefix) { var parameters = _.filter(JSON.parse(JSON.stringify(dataset.parameters)), function (o) { return o.name.startsWith(prefix) }); return _.map(parameters, function(parameter){ parameter.name = convertParameterNameToAlias(parameter.name); return parameter; }); };