Yesterday, I found a good reason to use arrow functions, sometimes I said the arrow functions is a fancy or shorter way to write functions but this is not the only benefit, the Arrow functions can keep the scope of his object without going to global window, I will explain with code.
These days I was working in a place where “the proxy” was not my best friend, trying to install my packages using npm or install the VSCode extensions was impossible so I need to configure the proxy in both.
From the terminal:
npm config set proxy http: // yourproxyiporaddress: port
npm config set https-proxy http: // yourproxyiporaddress: port`
For VSCode extensions the “proxy” is also required:
Preferences> User Settings
"http.proxy": "http: // yourproxyiporaddress: port"
Using the function Vue.filter() and passing the name of the filter as the first parameter and the function as a second. My example the function receives the date as parameter and inside I write the definition of our function that is using the MomentJS library, using as parameters the date and a format “YYYYMMDD”, this creates an instance of MomentJS that contains the method fromNow () that returns us the time from the date we have passed until today.
VeeValidate is a plugin for #Vue that allows you to validate the HTML elements and show errors in an easy way, only adding the v-validate directive in the input and the validations that we need to be divided by a pipe.
VeeValidate has more than 20 validations by default, it also creates an errors objects where the references to all the validations that we have in our instance of Vue are stored.
To create the API using json-server, first creates a file db.json with the definition of the API so that json-server generates the verbs get, post, put and delete of the different entities that we define into the file.
Today I sold my Magic Mouse 2, the truth is a few months ago when I bought the main aspects beautiful mouse and could be charged with the same cable of the iPhone, it was the best solution to say goodbye to the batteries, In summary perfect.
The months passed and aside from the beauty, the functionality on the Mac was “fine”, the gestures, but ... from there .. nothing special, in my day to day I work with a Logitech Mouse of 9 euros
I have become accustomed to the behavior of Mouse Logitech, besides that when I start the virtual machine with Windows, the Magic Mouse does not have the fluency I expected or the smoothness when moving the mouse.
If you are a person who only uses Mac because you always use Magic Mouse it will be a trustworthy purchase, but if you spend 8 hours with a “normal” mouse and you only use the Magic Mouse a few hours when you are at home then I do not think it is a great purchase
For less than € 20 you have better options that work perfectly well on both Windows and Mac.