the-math
Advanced tools
Comparing version 1.1.7 to 1.1.9
@@ -6,3 +6,3 @@ "use strict"; | ||
var stringNumber = String(number); | ||
var _a = stringNumber.split('-'), beforeTrace = _a[0], afterTrace = _a[1]; | ||
var _a = stringNumber.split('e-'), beforeTrace = _a[0], afterTrace = _a[1]; | ||
var numberOfCases = 0; | ||
@@ -12,3 +12,3 @@ if (afterTrace) { | ||
if (afterDot && afterDot.length > 2) { | ||
numberOfCases = afterDot.length - 1 + Number(afterTrace); | ||
numberOfCases = afterDot.length + Number(afterTrace); | ||
} | ||
@@ -24,3 +24,3 @@ else { | ||
var correctionalBase = Math.pow(10, numberOfCases); | ||
return correctionalBase < 10 ? 10 : correctionalBase; | ||
return correctionalBase; | ||
} | ||
@@ -27,0 +27,0 @@ exports.numberCorrectional = numberCorrectional; |
{ | ||
"name": "the-math", | ||
"version": "1.1.7", | ||
"version": "1.1.9", | ||
"description": "Core of TheMath Calculator", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -35,3 +35,2 @@ # TheMath | ||
```typescript | ||
import TheMath from 'the-math'; | ||
@@ -47,3 +46,2 @@ | ||
```typescript | ||
import TheMath from 'the-math'; | ||
@@ -59,3 +57,2 @@ | ||
```typescript | ||
import TheMath from 'the-math'; | ||
@@ -71,3 +68,2 @@ | ||
```typescript | ||
import TheMath from 'the-math'; | ||
@@ -83,3 +79,2 @@ | ||
```typescript | ||
import TheMath from 'the-math'; | ||
@@ -86,0 +81,0 @@ |
@@ -0,0 +0,0 @@ { |
14121
109