MCPcopy Create free account
hub / github.com/ThatGuySam/doesitarm / excludeExtaKindData

Function excludeExtaKindData

helpers/api/kind.js:22–34  ·  view source on GitHub ↗
( { rawKindPage, excludes = defaultExludedProperties } = {} )

Source from the content-addressed store, hash-verified

20]
21
22function excludeExtaKindData ( { rawKindPage, excludes = defaultExludedProperties } = {} ) {
23
24 return {
25 ...rawKindPage,
26 items: rawKindPage.items.map( item => {
27 for ( const exclude of excludes ) {
28 delete item[ exclude ]
29 }
30
31 return item
32 })
33 }
34}
35
36function makeKindEndpoint ({ kindSlug, number = null }) {
37 if ( number ) {

Callers 1

apiFilesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected