openchemlib-utils
Advanced tools
Comparing version 5.16.1 to 5.16.2
@@ -18,4 +18,8 @@ const unsaturationsObject = { | ||
export function getUnsaturation(mf) { | ||
if (!mf) | ||
return undefined; | ||
// split a molecular formula into its elements | ||
const elements = mf.match(/[A-Z][a-z]*\d*/g); | ||
if (!elements || elements.length === 0) | ||
return undefined; | ||
let unsaturation = 0; | ||
@@ -22,0 +26,0 @@ for (let i = 0; i < elements.length; i++) { |
@@ -21,4 +21,8 @@ "use strict"; | ||
function getUnsaturation(mf) { | ||
if (!mf) | ||
return undefined; | ||
// split a molecular formula into its elements | ||
const elements = mf.match(/[A-Z][a-z]*\d*/g); | ||
if (!elements || elements.length === 0) | ||
return undefined; | ||
let unsaturation = 0; | ||
@@ -25,0 +29,0 @@ for (let i = 0; i < elements.length; i++) { |
{ | ||
"name": "openchemlib-utils", | ||
"version": "5.16.1", | ||
"version": "5.16.2", | ||
"description": "Various utilities that extends openchemlib-js like HOSE codes or diastereotopic IDs", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -19,4 +19,6 @@ const unsaturationsObject = { | ||
export function getUnsaturation(mf) { | ||
if (!mf) return undefined; | ||
// split a molecular formula into its elements | ||
const elements = mf.match(/[A-Z][a-z]*\d*/g); | ||
if (!elements || elements.length === 0) return undefined; | ||
let unsaturation = 0; | ||
@@ -23,0 +25,0 @@ for (let i = 0; i < elements.length; i++) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
1095556
16450