1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

only show public methods

This commit is contained in:
Matthias Kretschmann 2019-01-29 11:34:31 +01:00
parent 942106b88c
commit c45504ccc2
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -20,16 +20,15 @@ export const cleanTypedocData = (data, useClasses) => {
// more kinds: 'Property', 'Class' // more kinds: 'Property', 'Class'
const showKindOfProperty = { const showKindOfProperty = {
Method: true, Method: { onlyPublic: true },
Property: { onlyPublic: true } Property: { onlyPublic: true }
} }
export const filterByKindOfProperty = ({ kindString, flags }) => { export const filterByKindOfProperty = ({ kindString, flags }) => {
const config = showKindOfProperty[kindString] const config = showKindOfProperty[kindString]
if (!config) { if (!config) return
return
} if (config.onlyPublic && !flags.isPublic) return
if (config.onlyPublic && !flags.isPublic) {
return
}
return true return true
} }