Just to expand on something mentioned earlier. These generate the results.
// less precision
moment().unix() === moment().format('X') // uppercase X
// more precision
moment().valueOf() === moment().format('x') // lowercase x
Hope that sheds some light