chore(docs): alphabetize class members in docs

This commit is contained in:
perry
2017-02-01 11:44:09 -06:00
parent c578b07434
commit 7f304edcf9

View File

@ -40,9 +40,22 @@ module.exports = function collectInputsOutputs() {
} }
// update doc with pruned members list and add inputs and outputs // update doc with pruned members list and add inputs and outputs
doc.members = members; doc.members = members.sort(alphabetize);
doc.inputs = inputs; doc.inputs = inputs.sort(alphabetize);
doc.outputs = outputs; doc.outputs = outputs.sort(alphabetize);
}
function alphabetize(a, b) {
if (!a.name) {
return 1;
} else if (!b.name) {
return -1;
} else if (a.name < b.name) {
return -1;
} else if (a.name > b.name) {
return 1;
}
return 0;
} }
function parseMember(member) { function parseMember(member) {