[nodejs] How do I add numbers to output?

2013-08-13 Thread Mattias Larsson
Hi, How should I think (and do) to add numbers to each hop (line) on my traceroute. Here is my script (it's example script from traceroute npm package) traceroute = require('traceroute'); traceroute.trace('4.69.155.254', function (err,hops) { if (!err) console.log(hops);}); And output is l

Re: [nodejs] undefined [newbie]

2013-08-11 Thread Mattias Larsson
Thanks Jose ! Didn't know it was a wrapper function! It works now ! Br, Mattias On Sunday, August 11, 2013 1:29:00 PM UTC+2, Jose Luis Rivas wrote: > > On 8/11/13 3:55 AM, Mattias Larsson wrote: > > Hi, > > > > When I'm running this example script I

[nodejs] undefined [newbie]

2013-08-11 Thread Mattias Larsson
Hi, When I'm running this example script I get "undefined"... What could be the problem? I have installed the npm package traceroute. traceroute = require('traceroute'); traceroute.trace('google.com', function (err,hops) { if (!err) console.log(hops);}); Copied from https://npmjs.org/pack