Skip to content

Commit

Permalink
Merge pull request #1 from soyuka/master
Browse files Browse the repository at this point in the history
normalize darwin header also
  • Loading branch information
huan authored Mar 16, 2018
2 parents fd82297 + 76cc0e0 commit 9c931a8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ module.exports = function childrenOfPid(pid, callback) {
* @param {string} str Header string to normalize
*/
function normalizeHeader(str) {
if (process.platform !== 'win32') {
return str;
}

switch (str) {
case 'Name': // for win32
case 'COMM': // for darwin
Expand All @@ -120,6 +116,6 @@ function normalizeHeader(str) {
return 'STAT';
break;
default:
throw new Error('Unknown process listing header: ' + str);
return str
}
}

0 comments on commit 9c931a8

Please sign in to comment.