Skip to content

Commit

Permalink
refactor(aws-lambda): Object.hasOwn is recommended (#2831)
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego authored May 28, 2024
1 parent dfbc6c4 commit 029cf71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/adapter/aws-lambda/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,11 @@ export const getProcessor = (event: LambdaEvent): EventProcessor<LambdaEvent> =>
}

const isProxyEventALB = (event: LambdaEvent): event is ALBProxyEvent => {
return Object.prototype.hasOwnProperty.call(event.requestContext, 'elb')
return Object.hasOwn(event.requestContext, 'elb')
}

const isProxyEventV2 = (event: LambdaEvent): event is APIGatewayProxyEventV2 => {
return Object.prototype.hasOwnProperty.call(event, 'rawPath')
return Object.hasOwn(event, 'rawPath')
}

export const isContentTypeBinary = (contentType: string) => {
Expand Down

0 comments on commit 029cf71

Please sign in to comment.