Closed lclancey closed 3 years ago
Hello, welcome ! I am always happy to help or answer question ;)
So, actually those codes are similar but work for two different versions of Node.
In Node v14, the optionnal chaining
has been added (https://nodejs.medium.com/node-js-version-14-available-now-8170d384567e). It's part of the V8.1 Javascript. I have been waiting for this new functions for really long so I got a little bit excited and try it it.
If you want some information about it, you can find that here : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining
I came back on my previous commit because multiple person has been using this package and reporting this error. As Node 12 will still be maintained until April 2022. It might be too early to make use of it.
Now, we are at Node V15 and new functionalities has been added. So you might encounter the logical assignment operators
from now : ??= or &&= or ||=
Hi I tryed this module(npm install @justalk/pornhub-api) and didn't work on my machine. Node report an error over here:
I double checked your code, and found the latest commit changed this code https://github.com/JustalK/PORNHUB-API/commit/b05a887c1baa09aa57c5ea79eb6c8484cc6318e0 so I too rewrited:
now works perfectly. My question is what kinda grammar is this (foo?.bar)? Cause I have never seen this kinda grammar before. Thank you.