0.0.0-typofix • Published 4 years ago

@callmeumm/middleware v0.0.0-typofix

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@callmeumm/middleware

Simple middleware made on node.js

📖 See Docs Here

Features

  • Working with async/await
  • Zero dependencies
  • Native Promise

Usage

const { Composer } = require("@callmeumm/middleware");
const composer = new Composer({
	name: "",
	status: ""
});

composer.compose(
	(ctx) => {
		ctx.data.name = "Pak Asep";
		ctx.next();
	},
	(ctx) => {
		ctx.data.status = "Single Ting ting";
		ctx.next();
	},
	(ctx) => {
		console.log(ctx.data);
	}
).run();