{"version":3,"sources":["../src/integer.js"],"names":["requiredInteger","props","propName","componentName","propValue","RangeError","validator","integer","rest","isRequired"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEA,SAASA,eAAT,CAAyBC,KAAzB,EAAgCC,QAAhC,EAA0CC,aAA1C,EAAyD;AAAA,MACnCC,SADmC,GACrBH,KADqB,CAC9CC,QAD8C;;AAEvD,MAAIE,SAAS,IAAI,IAAb,IAAqB,CAAC,2BAAUA,SAAV,CAA1B,EAAgD;AAC9C,WAAO,IAAIC,UAAJ,WAAkBH,QAAlB,iBAAiCC,aAAjC,yBAAP;AACD;;AACD,SAAO,IAAP;AACD;;AAED,IAAMG,SAAS,GAAG,SAASC,OAAT,CAAiBN,KAAjB,EAAwBC,QAAxB,EAA2C;AAAA,MACvCE,SADuC,GACzBH,KADyB,CAClDC,QADkD;;AAG3D,MAAIE,SAAS,IAAI,IAAjB,EAAuB;AACrB,WAAO,IAAP;AACD;;AAL0D,oCAANI,IAAM;AAANA,IAAAA,IAAM;AAAA;;AAO3D,SAAOR,eAAe,MAAf,UAAgBC,KAAhB,EAAuBC,QAAvB,SAAoCM,IAApC,EAAP;AACD,CARD;;AAUAF,SAAS,CAACG,UAAV,GAAuBT,eAAvB;;eAEe;AAAA,SAAM,+BAAcM,SAAd,EAAyB,SAAzB,CAAN;AAAA,C","sourcesContent":["import isInteger from './helpers/isInteger';\nimport wrapValidator from './helpers/wrapValidator';\n\nfunction requiredInteger(props, propName, componentName) {\n const { [propName]: propValue } = props;\n if (propValue == null || !isInteger(propValue)) {\n return new RangeError(`${propName} in ${componentName} must be an integer`);\n }\n return null;\n}\n\nconst validator = function integer(props, propName, ...rest) {\n const { [propName]: propValue } = props;\n\n if (propValue == null) {\n return null;\n }\n\n return requiredInteger(props, propName, ...rest);\n};\n\nvalidator.isRequired = requiredInteger;\n\nexport default () => wrapValidator(validator, 'integer');\n"],"file":"integer.js"}