groupBy multiple key
- Linguagem predominante
- JavaScript
- Estrelas
- 2.9k
- Forks
- 319
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
```
it('should allow groupBy multiple key', function() {
var arrays = [
{ key1: 1, key2: 1, data: {} },
{ key1: 1, key2: 1, data: {} },
{ key1: 1, key2: 2, data: {} },
{ key1: 1, key2: 2, data: {} },
{ key1: 2, key2: 3, data: {} },
{ key1: 2, key2: 3, data: {} },
{ key1: 2, key2: 4, data: {} },
{ key1: 2, key2: 4, data: {} }
];
expect(filter(arrays, ['key1', 'key2'])).toEqual({
'1,1': [arrays[0], arrays[1]],
'1,2': [arrays[2], arrays[3]],
'2,3': [arrays[4], arrays[5]],
'2,4': [arrays[6], arrays[7]]
});
});
```
should allow to group by multiple key instead of only 1 key
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
Look at the existing groupBy filter implementation in the angular-filter source code, likely in a file like angular-filter.js or a filters directory. The test shows the desired behavior: groupBy should accept an array of keys and group objects by the combined values of those keys, forming a composite key string like '1,1'. Start by finding where groupBy is defined, then modify it to handle an array of keys. Run the provided test to verify the change works.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- angularjs, javascript
- Domínio
- frontend
- Tipo de issue
- Funcionalidade
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Status de atividade
- Estagnada
- Clareza
- Claramente especificada
- Facilidade para iniciantes
- 70/100