Jose MarmolejosFinding the intersection of two arrays in JavaScriptWhenever a math teacher would show us a Venn diagram my first reaction would be“why would I ever need to even think about this?”. As the…Oct 29, 2018Oct 29, 2018
Jose MarmolejosExtend HttpClient calls to add authentication, mocking and other goodiesThe HttpClient doesn’t implement an interface you can easily mock, nor are the methods you are interested in mocking declared as virtual…Oct 16, 2016Oct 16, 2016
Jose MarmolejosUsing a list of patterns to apply multiple regex replacements on a string.Let me start this one off with a simple disclaimer: I hate working with regular expressions … not because they’re bad or anything, but…May 24, 2016May 24, 2016
Jose MarmolejosinCaffeine and TestingTesting async code with Mocha using callbacks and promisesTesting async code with Mocha using callbacks is pretty straight forward, all you need to do is pass the done function down the callback…Feb 27, 20164Feb 27, 20164
Jose MarmolejosYou don’t need to remember to bind your functions every time.One of the things we love the most about JavaScript is how most of the times we don’t know where this points to (yeah right, we love that)…Jan 14, 2016Jan 14, 2016
Jose MarmolejosJavaScript classes and factory methods, it is good to have options.JavaScript classes are one of the shiny new bits that come with ES6, they provide us with more formal way of defining a type structure for…Jan 9, 2016Jan 9, 2016
Jose MarmolejosClassical inheritance and sharing functionality with Object.create()A common approach when implementing classical inheritance in JavaScript is to define your classes like this:Dec 6, 2015Dec 6, 2015
Jose MarmolejosScheduling background tasks in your .Net Web Api projectOne thing we should always keep in mind when developing REST APIs is that response time should always be as low as possible, an API that…Nov 4, 2015Nov 4, 2015
Jose MarmolejosinCaffeine and TestingUnit testing JavaScript code in the browserWhen asked about testing front end code, I’d usually reply with something like “I haven’t found the right tool and approach yet”, but maybe…Oct 30, 2015Oct 30, 2015
Jose MarmolejosTrying out Popmotion for simple animationsRecently I stumbled into this handy motion library (Popmotion) and thought it would be cool to try it out for a very simple animation. I…Oct 22, 2015Oct 22, 2015