type.Integer
This is a minor release that adds type.Integer
as a convenient way to get an integer type. This is useful when you want to convert to whole, non-fractional numbers.
import { Reflect, type } from "can";
let ConvertingInteger = type.convert(type.Integer);
let val = Reflect.convert(12.1, ConvertingInteger);
console.log(val); // -> 12