78138a922f420d8032f5894873ff4019.json
2.45 KB
{"ast":null,"code":"Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var CSS_UNIT_RE=/^[+-]?\\d*(?:\\.\\d+)?(?:[Ee][+-]?\\d+)?(%|\\w*)/;var getUnit=function getUnit(str){return str.match(CSS_UNIT_RE)[1];};var isNumeric=function isNumeric(n){return!isNaN(parseFloat(n))&&isFinite(n);};var multiplyStyleLengthValue=function multiplyStyleLengthValue(value,multiple){if(typeof value==='string'){var number=parseFloat(value)*multiple;var unit=getUnit(value);return\"\"+number+unit;}else if(isNumeric(value)){return value*multiple;}};var _default=multiplyStyleLengthValue;exports.default=_default;","map":{"version":3,"sources":["C:/Users/bluej/Desktop/2_2/searchGuide/searchGuide/node_modules/react-native-web/dist/modules/multiplyStyleLengthValue/index.js"],"names":["CSS_UNIT_RE","getUnit","str","match","isNumeric","n","isNaN","parseFloat","isFinite","multiplyStyleLengthValue","value","multiple","number","unit"],"mappings":"gFAQA,GAAIA,CAAAA,WAAW,CAAG,6CAAlB,CAEA,GAAIC,CAAAA,OAAO,CAAG,QAASA,CAAAA,OAAT,CAAiBC,GAAjB,CAAsB,CAClC,MAAOA,CAAAA,GAAG,CAACC,KAAJ,CAAUH,WAAV,EAAuB,CAAvB,CAAP,CACD,CAFD,CAIA,GAAII,CAAAA,SAAS,CAAG,QAASA,CAAAA,SAAT,CAAmBC,CAAnB,CAAsB,CACpC,MAAO,CAACC,KAAK,CAACC,UAAU,CAACF,CAAD,CAAX,CAAN,EAAyBG,QAAQ,CAACH,CAAD,CAAxC,CACD,CAFD,CAIA,GAAII,CAAAA,wBAAwB,CAAG,QAASA,CAAAA,wBAAT,CAAkCC,KAAlC,CAAyCC,QAAzC,CAAmD,CAChF,GAAI,MAAOD,CAAAA,KAAP,GAAiB,QAArB,CAA+B,CAC7B,GAAIE,CAAAA,MAAM,CAAGL,UAAU,CAACG,KAAD,CAAV,CAAoBC,QAAjC,CACA,GAAIE,CAAAA,IAAI,CAAGZ,OAAO,CAACS,KAAD,CAAlB,CACA,MAAO,GAAKE,MAAL,CAAcC,IAArB,CACD,CAJD,IAIO,IAAIT,SAAS,CAACM,KAAD,CAAb,CAAsB,CAC3B,MAAOA,CAAAA,KAAK,CAAGC,QAAf,CACD,CACF,CARD,C,aAUeF,wB","sourcesContent":["/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar CSS_UNIT_RE = /^[+-]?\\d*(?:\\.\\d+)?(?:[Ee][+-]?\\d+)?(%|\\w*)/;\n\nvar getUnit = function getUnit(str) {\n return str.match(CSS_UNIT_RE)[1];\n};\n\nvar isNumeric = function isNumeric(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n};\n\nvar multiplyStyleLengthValue = function multiplyStyleLengthValue(value, multiple) {\n if (typeof value === 'string') {\n var number = parseFloat(value) * multiple;\n var unit = getUnit(value);\n return \"\" + number + unit;\n } else if (isNumeric(value)) {\n return value * multiple;\n }\n};\n\nexport default multiplyStyleLengthValue;"]},"metadata":{},"sourceType":"script"}