Arrow functions are a new ES6 Javascript feature to write more readable and shorter code, with the same results. It came with another new feature like the “let/const” renaming from the ES5 “var”. It may seem very similar to the anonymous functions of ES5 but with some small differences. A […]
JavaScript
Javascript is an object-oriented and event-oriented language, designed for web programming, initially on the client side but later also on the server side.
Javascript object to query string
It can often be useful to transform a javascript object into a query string dynamically, without necessarily knowing the properties of that object. Another good reason is to avoid concatenation for each individual parameter. This method can be used also in javascript/typescript frameworks like: Angular, React, Svelte, etc. This is […]
Compare 2 or more JS arrays
Sometimes can be useful an efficient way to compare more JS arrays of objects or primitives. In these cases, the simple comparison operator is not enough because arrays are two different instances of objects. We have to compare JS arrays that are lists and not simple objects. Manipulating data often […]
Obscure sensible data – Javascript
Something we can have the request to obscure sensible data for hiding purposes of information.Pay attention that this is not a security prone method to hide sensible informations because someone can search on network requests and response and find what you’re trying to hide. We should do a true shadowing […]
How to return a GET response from POST with json-server
What I’m going to say is a bad idea. Sometimes it may be necessary to force the hand a little for not quite standard requests. This is the case when a BE, when faced with a request with the POST/PUT/DELETE method, returns an answer that would be more appropriate for […]