INNER CODE UNIT · JavaScript

noopResolves

godaddy/terminus · lib/terminus.js:10

function noopResolves () {
  return Promise.resolve()
}

async function sendSuccess (res, { info, verbatim, statusOk, statusOkResponse, headers }) {
  res.statusCode = statusOk
  res.setHeader('Content-Type', 'application/json')
  res.writeHead(statusOk, headers)
  if (info) {
    return res.end(
      JSON.stringify(
        Object.assign(
          statusOkResponse,
          verbatim ? info : { info, details: info }
        )
      )
    )
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…