serverless-offline
Version:
Emulate AWS λ and API Gateway locally when developing your Serverless project
16 lines (15 loc) • 366 B
JavaScript
export default function getApiKeysValues(apiKeys) {
return new Set(
apiKeys
.map((apiKey) => {
if (typeof apiKey === "object" && apiKey.value != null) {
return apiKey.value
}
if (typeof apiKey === "string") {
return apiKey
}
return undefined
})
.filter((apiKey) => !!apiKey),
)
}