var MAX_INT = 2147483647;
var MIN_INT = -2147483648;
function coerceInt(value) {
var num = Number(value);
if (num === num && num <= MAX_INT && num >= MIN_INT) {
return (num < 0 ? Math.ceil : Math.floor)(num);
}
return null;
}
becomes:
var MAX_INT = 2147483647;
var MIN_INT = -2147483648;
function coerceInt(value) {
var num = Number(value);
return null;
}
For example (from graphql-js):
becomes:
Not yet sure if it's a bug with this transform or Babel itself.Will be fixed by https://github.com/babel/babel/pull/3557