lambda-live-debugger
Version:
Debug Lambda functions locally like it is running in the cloud
23 lines (22 loc) • 506 B
JavaScript
export function translateTraits(indicator) {
if (typeof indicator === "object") {
return indicator;
}
indicator = indicator | 0;
const traits = {};
let i = 0;
for (const trait of [
"httpLabel",
"idempotent",
"idempotencyToken",
"sensitive",
"httpPayload",
"httpResponseCode",
"httpQueryParams",
]) {
if (((indicator >> i++) & 1) === 1) {
traits[trait] = 1;
}
}
return traits;
}