Why parseInt here? parseInt would allow `'abc42def'` which is not correct.

Maybe add a toInteger to utils?

```js
function toInteger(x) {
  if (isNaN(x)) return 0;
  if (!isFinite(x) || x === 0) return x;
  return x > 0 ? Math.floor(x) : Math.ceil(x);
}
```