Avoid type="number" in AngularJS

The other day I got hit by a peculiar bug in Angular. Using type="number" on an input element wouldn’t do any number validation. On top of this, when I entered an invalid number the only validation failing was required. After a little research ...

Introducing Retest

If you’ve looked into testing your API in node before, you’ve probably run across supertest by the prolific TJ Holowaychuk. So have I and it’s truly a fantastic library for testing APIs. However, I found it to be lacking a couple of features I sorely ...

Enabling Generators in Mocha

For the last week, I’ve been working on a new project that uses node 0.11 and generators. Aside from the numerous benefits with generators in the application, I also integrated generators into my test suite. By using mocha and co, you can also enable ...

Partial Application in JavaScript

Partial application is the act of pre-filling arguments of a function and returning a new function of smaller arity. The returned function can be called with additional parameters and in JavaScript, the this context can also be changed when called. Using ...

Forcing Function Arity in JavaScript

Function arity in something in JavaScript that is usually overlooked. For the most part, that’s perfectly understandable, it’s just a number. Unfortunately, this number can be integral to many other functions working correctly. But first, what number ...