Skip to content

Commit

Permalink
reorder getters in the list of functions
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Oct 4, 2023
1 parent 2bfc6e7 commit 89ce935
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/templates/properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ module.exports['has-errors'] = function ({ item }) {
};

module.exports.functions = function ({ item }) {
return [...findAll(['VariableDeclaration', 'FunctionDefinition'], item)].filter(f =>
f.nodeType === 'VariableDeclaration' ? f.visibility === 'public' : f.visibility !== 'private',
);
return [
...[...findAll('FunctionDefinition', item)].filter(f => f.visibility !== 'private'),
...[...findAll('VariableDeclaration', item)].filter(f => f.visibility === 'public'),
];
};

module.exports.returns2 = function ({ item }) {
Expand Down

0 comments on commit 89ce935

Please sign in to comment.