Skip to content

Instantly share code, notes, and snippets.

Avatar

Sylvain LERIS sylvainleris

  • Y3S SAS
  • Bruges, France
View GitHub Profile
@sylvainleris
sylvainleris / MiddlewareES6.js
Last active Apr 12, 2021 — forked from darrenscerri/Middleware.js
A very minimal Javascript (ES5 & ES6) Middleware Pattern Implementation
View MiddlewareES6.js
class Middleware {
constructor() {
// Array prototype last
if (!Array.prototype.last) {
Array.prototype.last = function() {
return this[this.length - 1];
}
}