Playing Around with your Standard, Run-of-the-Mill JavaScript Decorator Exampleby@jlowery2663
2,990 reads
2,990 reads

Playing Around with your Standard, Run-of-the-Mill JavaScript Decorator Example

by jefflowery2mNovember 17th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

JavaScript decorators have been a language feature since ES2015 came out, but they are still largely ‘experimental’ in JavaScript engines that support them. With decorators, you’re not actually limited to the arguments that you are given, but can infer parameter values from within the decorator, passing those onto the wrapped method. All code in this article can be found here. To run sample code, add the following run target in package.json: "scripts": "babel-node yourdecoratedcode.js --require babel-polyfill"

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Playing Around with your Standard, Run-of-the-Mill JavaScript Decorator Example
jefflowery HackerNoon profile picture
jefflowery

jefflowery

@jlowery2663

I'm an early adopter kinda guy.

Learn More
LEARN MORE ABOUT @JLOWERY2663'S
EXPERTISE AND PLACE ON THE INTERNET.

Share Your Thoughts

About Author

jefflowery HackerNoon profile picture
jefflowery@jlowery2663
I'm an early adopter kinda guy.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
L O A D I N G
. . . comments & more!