loaders ยป integer

integer() โ†’ int
integerItems() โ†’ array
integerList() โ†’ array

Accepts integers only (float is not clipped but triggers an error), returns an integer.

enogood: -13
bad: 0.3
javascriptconst document = eno.parse(input);

document.integer('good');  // returns -13

document.integer('bad');
  // throws an error: 'bad' must contain an integer, for instance '42' or '-21'.