If you’re porting PHP code to nodejs, you’re going to want to take a look at this, since it may save a considerable amount of time (no, I’m not going to go on about PHP).