NodeJS utilities ported to AngularJS.