DNS parse code for nodejs