1.0.3 • Published 4 years ago

lambda-composer v1.0.3

Weekly downloads
2
License
Apache License 2....
Repository
-
Last release
4 years ago

Lambda Composer

Treat AWS lambdas like composable functions

Based on the blog article "The Dynamic Composer (an AWS serverless pattern)"

Example Usage

const composer = require("labmda-composer");

exports.extractor = async event => {
	// Do some fancy processing...

	// Then merge the event to the function result
	let result = Object.assign(
		{
			article: {
				title: "This an article title",
				created: new Date().toISOString()
			}
		},
		event
	);

	// pass the original event and function result to the composer
	return composer(event, result);
};
1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago