News for hackers. Stuff that matters.
Re:The melting pot of JavaScript (2017) by tracker1 on Tuesday January 08, 2019 @03:52PM (#18859565)
That would be relatively easy to do something very similar with middleware for express/koa

    router.get('/users/:id'. skipNonUuid(id => ...))
You simply have a function/middleware that does the check.... or `compose(skipNonUuid, dbo.findUserById, ui.formatView('modelName'))`

You can do function composition that is nearly as simple and far more flexible in general with JS

There are no comments on this comment yet.