Follow

Updated my little missing required argument joke module for Node.js with @Paul’s suggestion to use Error.captureStackTrace (neat, thanks, Paul!) and, because I have no life, it now has 100% code coverage ;P

Also, thanks to @severo_bo who uncovered prior art from two years ago – there goes the patent and the riches… oh, well :)

freecodecamp.org/news/elegant-

Blog post: ar.al/2020/03/23/fail-fast-on-

@aral @Paul @severo_bo

I love it! I've been using named arguments via destructuring for the past year or so and it's massively simplified my refactors.

Now I'm wondering how hard it would be to automatically detect the missing property name...

@aral @Paul @severo_bo

I am embarrassed / proud to report that I hacked together something that works... as long as you don't indent your function.

gist.github.com/christianbundy

@aral @Paul @severo_bo

...wait scratch that, as long as require("fs") doesn't throw an error then this Just Works now.

Sign in to participate in the conversation
Aral’s Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!