src/IncomingMessage.js
function sanitizeContext(context) {
  const sanitizedContext = {
    ...context,
    log : context.log.bind(context)
  };

  // We don't want the developper to mess up express flow
  // See https://github.com/yvele/azure-function-express/pull/12#issuecomment-336733540
  delete sanitizedContext.done;

  return sanitizedContext;
}
function sanitizeContext(context) {
  const sanitizedContext = {
    ...context,
    log : context.log.bind(context)
  };

  // We don't want the developper to mess up express flow
  // See https://github.com/yvele/azure-function-express/pull/12#issuecomment-336733540
  delete sanitizedContext.done;

  return sanitizedContext;
}
function sanitizeContext ( context ) { const sanitizedContext = { ... context , log : context . log . bind ( context ) } ; // We don't want the developper to mess up express flow // See https://github.com/yvele/azure-function-express/pull/12#issuecomment-336733540 delete sanitizedContext . done ; return sanitizedContext ; }
Copy usefull context properties from the native context provided by the Azure Function engine

See:
- https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-node#context-object
- https://github.com/christopheranderson/azure-functions-typescript/blob/master/src/context.d.ts

@param {Object} context Raw Azure context object for a single HTTP request
@returns {Object} Filtered context
Copy usefull context properties from the native context provided by the Azure Function engine