MCPcopy Create free account
hub / github.com/dadi/api / formatForOutput

Method formatForOutput

dadi/lib/model/schemaStore.js:319–327  ·  view source on GitHub ↗
(schemas)

Source from the content-addressed store, hash-verified

317 }
318
319 formatForOutput(schemas) {
320 const isArray = Array.isArray(schemas)
321 const schemasArray = isArray ? schemas : [schemas]
322 const formattedSchemas = schemasArray.map(schema => {
323 return Object.assign({}, schema, {_id: undefined})
324 })
325
326 return isArray ? formattedSchemas : formattedSchemas[0]
327 }
328
329 async get({name, property}) {
330 const {results} = await this.find({name, property})

Callers 13

clients.jsFile · 0.80
roles.jsFile · 0.80
keys.jsFile · 0.80
collections.jsFile · 0.80
index.jsFile · 0.80
index.jsFile · 0.80
createFunction · 0.80
updateFunction · 0.80
getFunction · 0.80
key.jsFile · 0.80
client.jsFile · 0.80
role.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected