It looks like the Node version throws if the input here is not a number, we should implement that bit at least.