rn-css 1.6.15 → 1.6.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,8 +50,8 @@ function convertValue(key, value, units) {
50
50
  const convertedValue = value.replace(/(\b\d+(\.\d+)?)([a-z]+\b|%)/ig, occ => {
51
51
  const [val, unit] = parseValue(occ);
52
52
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
53
- if (['deg', 'rad', 'turn'].includes(unit))
54
- return occ; // We don't want to convert deg and rad units
53
+ if (['deg', 'rad', 'turn', 's'].includes(unit))
54
+ return occ; // We don't want to convert deg, rad, turn, second units
55
55
  return val * (finalUnits[unit || 'px']) + '';
56
56
  });
57
57
  // We handle extra calculations (calc, min, max, parsing...)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rn-css",
3
- "version": "1.6.15",
3
+ "version": "1.6.16",
4
4
  "scripts": {
5
5
  "test": "jest",
6
6
  "prepare": "tsc",
@@ -41,7 +41,7 @@ export function convertValue (key: keyof PartialStyle | keyof Transform, value:
41
41
  const convertedValue = value.replace(/(\b\d+(\.\d+)?)([a-z]+\b|%)/ig, occ => {
42
42
  const [val, unit] = parseValue(occ)
43
43
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
44
- if (['deg', 'rad', 'turn'].includes(unit!)) return occ // We don't want to convert deg and rad units
44
+ if (['deg', 'rad', 'turn', 's'].includes(unit!)) return occ // We don't want to convert deg, rad, turn, second units
45
45
  return val * (finalUnits[unit as keyof Units || 'px']!) + ''
46
46
  })
47
47