{"ast":null,"code":"import isUnitlessNumber from \"../unitlessNumbers\";\n\nfunction dangerousStyleValue(name, value, isCustomProperty) {\n  var isEmpty = value == null || typeof value === 'boolean' || value === '';\n\n  if (isEmpty) {\n    return '';\n  }\n\n  if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {\n    return value + 'px';\n  }\n\n  return ('' + value).trim();\n}\n\nexport default dangerousStyleValue;","map":{"version":3,"sources":["/Users/nishan/Desktop/oss/responsive-breakpoints/example/node_modules/react-native-web/dist/modules/setValueForStyles/dangerousStyleValue.js"],"names":["isUnitlessNumber","dangerousStyleValue","name","value","isCustomProperty","isEmpty","hasOwnProperty","trim"],"mappings":"AAWA,OAAOA,gBAAP;;AAWA,SAASC,mBAAT,CAA6BC,IAA7B,EAAmCC,KAAnC,EAA0CC,gBAA1C,EAA4D;AAU1D,MAAIC,OAAO,GAAGF,KAAK,IAAI,IAAT,IAAiB,OAAOA,KAAP,KAAiB,SAAlC,IAA+CA,KAAK,KAAK,EAAvE;;AAEA,MAAIE,OAAJ,EAAa;AACX,WAAO,EAAP;AACD;;AAED,MAAI,CAACD,gBAAD,IAAqB,OAAOD,KAAP,KAAiB,QAAtC,IAAkDA,KAAK,KAAK,CAA5D,IAAiE,EAAEH,gBAAgB,CAACM,cAAjB,CAAgCJ,IAAhC,KAAyCF,gBAAgB,CAACE,IAAD,CAA3D,CAArE,EAAyI;AACvI,WAAOC,KAAK,GAAG,IAAf;AACD;;AAED,SAAO,CAAC,KAAKA,KAAN,EAAaI,IAAb,EAAP;AACD;;AAED,eAAeN,mBAAf","sourcesContent":["/* eslint-disable */\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\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 * From React 16.0.0\n * \n */\nimport isUnitlessNumber from '../unitlessNumbers';\n/**\n * Convert a value into the proper css writable value. The style name `name`\n * should be logical (no hyphens), as specified\n * in `CSSProperty.isUnitlessNumber`.\n *\n * @param {string} name CSS property name such as `topMargin`.\n * @param {*} value CSS property value such as `10px`.\n * @return {string} Normalized style value with dimensions applied.\n */\n\nfunction dangerousStyleValue(name, value, isCustomProperty) {\n  // Note that we've removed escapeTextForBrowser() calls here since the\n  // whole string will be escaped when the attribute is injected into\n  // the markup. If you provide unsafe user data here they can inject\n  // arbitrary CSS which may be problematic (I couldn't repro this):\n  // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n  // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n  // This is not an XSS hole but instead a potential CSS injection issue\n  // which has lead to a greater discussion about how we're going to\n  // trust URLs moving forward. See #2115901\n  var isEmpty = value == null || typeof value === 'boolean' || value === '';\n\n  if (isEmpty) {\n    return '';\n  }\n\n  if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {\n    return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers\n  }\n\n  return ('' + value).trim();\n}\n\nexport default dangerousStyleValue;"]},"metadata":{},"sourceType":"module"}