Skip to content

V2.0.0

Latest

Choose a tag to compare

@imhele imhele released this 23 Jul 07:34

Update defualt char set to ensure the results of numerical comparison will not change

const defaultCharSet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
const a = 11;
const b = 12;
(a < b) === (changeRadix(a, { fromRadix: 10 }) < changeRadix(b, { fromRadix: 10 }));