isotopic-distribution
Advanced tools
Comparing version 1.4.11 to 1.4.12
{ | ||
"name": "isotopic-distribution", | ||
"version": "1.4.11", | ||
"version": "1.4.12", | ||
"description": "Calculate the isotopic distribution of a molecular formula", | ||
@@ -29,3 +29,3 @@ "main": "src/index.js", | ||
}, | ||
"gitHead": "6f42f9cae2750cee8ace9aa39378168cdd25d07e" | ||
"gitHead": "ded48e241b127a125dc06c71c8f0cb8c6727a292" | ||
} |
@@ -51,2 +51,14 @@ 'use strict'; | ||
it('create distribution with minY', () => { | ||
let isotopicDistribution = new IsotopicDistribution('C', { minY: 0.1 }); | ||
let distribution = isotopicDistribution.getDistribution(); | ||
expect(distribution.array).toMatchObject([{ x: 12, y: 0.9893 }]); | ||
}); | ||
it('create distribution with impossible minY', () => { | ||
let isotopicDistribution = new IsotopicDistribution('C', { minY: 1 }); | ||
let distribution = isotopicDistribution.getDistribution(); | ||
expect(distribution.array).toMatchObject([]); | ||
}); | ||
it('create distribution from parts', () => { | ||
@@ -53,0 +65,0 @@ let parts = [ |
@@ -137,3 +137,3 @@ 'use strict'; | ||
if (totalDistribution.array) { | ||
if (totalDistribution.array && totalDistribution.array.length > 0) { | ||
totalDistribution.sortX(); | ||
@@ -140,0 +140,0 @@ part.fromX = totalDistribution.array[0].x; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50827
1380