@oliasoft-open-source/units 3.12.0-beta-4 → 3.12.0

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.
package/README.md CHANGED
@@ -398,20 +398,17 @@ checkAndCleanDecimalComma('36..6'); // '36.6';
398
398
  #### Convert value to another unit
399
399
 
400
400
  ```js
401
- convertAndGetValue(1, 'm', 'ft'); // 1 / 0.3048
402
- convertAndGetValue('1|m', 'ft'); // 1 / 0.3048
403
- convertAndGetValue(0, 'C', 'F'); // 32
404
- convertAndGetValue('0|C', 'F'); // 32
405
- convertAndGetValue(32, 'F', 'C'); // 0
406
- convertAndGetValue('32|F', 'C'); // 0
407
- convertAndGetValue(50, '%', 'fr'); // 0.5
408
- convertAndGetValue('50|%', 'fr'); // 0.5
409
- convertAndGetValue(0.125, 'fr', '%'); // 12.5
410
- convertAndGetValue('0.125|fr', '%'); // 12.5
411
- convertAndGetValue(180, 'deg', 'rad').toFixed(4); // '3.1416'
412
- convertAndGetValue('180|deg', 'rad').toFixed(4); // '3.1416'
413
- convertAndGetValue(1, 'rad', 'deg').toFixed(4); // '57.2958'
414
- convertAndGetValue('1|rad', 'deg').toFixed(4); // '57.2958'
401
+ to(1, 'm', 'ft'); // 1 / 0.3048
402
+ to(0, 'C', 'F'); // 32
403
+ to(32, 'F', 'C'); // 0
404
+ to(50, '%', 'fr'); // 0.5
405
+ to(0.125, 'fr', '%'); // 12.5
406
+ to(180, 'deg', 'rad').toFixed(4); // '3.1416'
407
+ to(1, 'rad', 'deg').toFixed(4); // '57.2958'
408
+ to('1,12', 'rad', 'deg').toFixed(4); // '64.1713'
409
+ to('1....12', 'rad', 'deg').toFixed(4); // '64.1713'
410
+ to('1,,12', 'rad', 'deg').toFixed(4); // '64.1713'
411
+ to('1,,.12', 'rad', 'deg').toFixed(4); // '64.1713'
415
412
  ```
416
413
 
417
414
  ### split(numWithUnit) {...}