chemical-groups
Advanced tools
Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "chemical-groups", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "JSON containing information about chemical groups", | ||
"main": "src/index.js", | ||
"main": "lib/index.js", | ||
"module": "src/index.js", | ||
"files": [ | ||
"src" | ||
"src", | ||
"lib" | ||
], | ||
@@ -19,4 +21,4 @@ "repository": { | ||
}, | ||
"homepage": "https://github.com/cheminfo/mass-tools/tree/master/packages/chemical-elements#readme", | ||
"gitHead": "b01931558f4a134c6e8547a379bada50af8ba8fc" | ||
"homepage": "https://github.com/cheminfo/mass-tools/tree/main/packages/chemical-elements#readme", | ||
"gitHead": "bd2c06e05f2196c5f9c6ff011cf3ef41e1b6a0f9" | ||
} |
@@ -1,11 +0,8 @@ | ||
'use strict'; | ||
import { groupsObject, groups } from '..'; | ||
let data = require('..'); | ||
test('data size', () => { | ||
expect(data.groups.length).toBeGreaterThan(200); | ||
expect(groups.length).toBeGreaterThan(200); | ||
}); | ||
test('getGroupsObject', () => { | ||
let groupsObject = data.getGroupsObject(); | ||
test('groupsObject', () => { | ||
expect(groupsObject.Ala).toStrictEqual({ | ||
@@ -12,0 +9,0 @@ elements: [ |
@@ -1,5 +0,3 @@ | ||
'use strict'; | ||
import { groupsToSequence } from '..'; | ||
let groupsToSequence = require('../groupsToSequence'); | ||
test('groupsToSequence', () => { | ||
@@ -6,0 +4,0 @@ expect(groupsToSequence('HOAlaGlyOH')).toBe('AG'); |
@@ -1,6 +0,4 @@ | ||
'use strict'; | ||
import { groups } from './groups'; | ||
const groups = require('./groups'); | ||
const groupsObject = {}; | ||
export const groupsObject = {}; | ||
groups.forEach((e) => { | ||
@@ -12,3 +10,1 @@ if (groupsObject[e.symbol]) { | ||
}); | ||
module.exports = groupsObject; |
@@ -1,11 +0,9 @@ | ||
'use strict'; | ||
import { groupsObject } from './groupsObject.js'; | ||
const groupsObject = require('./groupsObject.js'); | ||
/** | ||
* Recreate a one letter sequence | ||
* @param {} mf | ||
* @param {object} mf | ||
*/ | ||
function groupsToSequence(mf) { | ||
export function groupsToSequence(mf) { | ||
mf = mf.replace(/\([^(]*\)/g, ''); | ||
@@ -28,3 +26,1 @@ let parts = mf.split(/(?=[A-Z ])/); | ||
} | ||
module.exports = groupsToSequence; |
@@ -1,18 +0,3 @@ | ||
'use strict'; | ||
const groups = require('./groups.js'); | ||
const groupsToSequence = require('./groupsToSequence'); | ||
function getGroupsObject() { | ||
let object = {}; | ||
groups.forEach((e) => { | ||
object[e.symbol] = e; | ||
}); | ||
return object; | ||
} | ||
module.exports = { | ||
groups, | ||
getGroupsObject, | ||
groupsToSequence, | ||
}; | ||
export * from './groups.js'; | ||
export * from './groupsObject.js'; | ||
export * from './groupsToSequence.js'; |
Sorry, the diff of this file is too big to display
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
282517
10
1184
1