Skip to content

Add "groupBy" method #214

@katanacrimson

Description

@katanacrimson

Proposed method:

Similar to sortBy, but instead of just sorting by the returned value, it will rebuild the list using the returned value as the entry's index for an array of entries. This would be useful when trying to group or categorize.

e.g.

  { pid: '2384',
    name: 'node run',
    exe: 'node.exe',
    path: 'C:\\Program Files\\nodejs\\node.exe',
    cmdline: 'node.exe',
    memuse: '13348864' },
  { pid: '5000',
    name: 'C:\\Windows\\system32\\wbem\\wmiprvse.exe',
    exe: 'wmiprvse.exe',
    path: 'C:\\Windows\\system32\\wbem\\wmiprvse.exe',
    cmdline: 'WmiPrvSE.exe',
    memuse: '6266880' } ]

with a groupBy method, you'd be able to group individual processes by 'exe' - something that nothing else (that I can see) would allow for.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions