
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@lamware/memoize
Advanced tools
This Lamware Middleware allows you to memoize variables and instances outside of the Lambda Handler with ease.
A lesser known feature of Lambda is that variables declared outside of the handler persist through the handler lifecycle. Since a Lambda instance, once cold-started, stays alive for 5-15 minutes (varies based on activity and the type of Lambda function), this provides a clear performance gain over having all logic instantiated inside the handler itself, since it'll only execute once (on the first request/invocation).
Currently, Lambda doesn't support top-level async/await, meaning set-up that involves non-synchronous operations isn't as simple as placing it outside the handler. By allowing you to supply a closure, and Lamware having support for asynchronous initialization, this middleware allows you to asynchronously memoize/load outside of the handler.
This package is available via NPM:
yarn add @lamware/memoize
# or
npm install @lamware/memoize
import type { APIGatewayProxyHandlerV2 } from 'aws-lambda';
import { memoize } from '@lamware/memoize';
import { lamware } from '@lamware/core';
interface MemoizePayload {
count: number;
}
const { handler } = lamware<APIGatewayProxyHandlerV2<any>>()
.use(memoize<MemoizePayload>(async () => {
return { count: 1 };
}, {
// [optional] Whether to throw an `Error` if the memoize closure fails [default: true]
throwOnError: false,
}))
.execute(async ({ state }) => {
return {
statusCode: 200,
message: 'count should always be `1` since it is memoized!',
count: state.count,
};
});
export { handler };
FAQs
Lamware Middleware for memoizing outside the Lambda handler
We found that @lamware/memoize demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.