chemical-elements
Advanced tools
Comparing version 1.2.4 to 1.3.0
{ | ||
"name": "chemical-elements", | ||
"version": "1.2.4", | ||
"version": "1.3.0", | ||
"description": "JSON containing information about chemical elements and isotopes", | ||
"main": "lib/index.js", | ||
"module": "src/index.js", | ||
"main": "src/index.js", | ||
"files": [ | ||
"src", | ||
"lib" | ||
"src" | ||
], | ||
@@ -21,9 +19,11 @@ "repository": { | ||
}, | ||
"homepage": "https://github.com/cheminfo/mass-tools/tree/main/packages/chemical-elements#readme", | ||
"homepage": "https://github.com/cheminfo/mass-tools/tree/master/packages/chemical-elements#readme", | ||
"dependencies": { | ||
"papaparse": "^5.3.2" | ||
}, | ||
"devDependencies": { | ||
"cross-fetch": "^3.1.5", | ||
"papaparse": "^5.3.2", | ||
"wikidata-sdk": "^8.1.0" | ||
"wikidata-sdk": "^7.14.4" | ||
}, | ||
"gitHead": "bd2c06e05f2196c5f9c6ff011cf3ef41e1b6a0f9" | ||
"gitHead": "ade929b07af4e2f0f8b3fe1aaf0df70c50f4b2db" | ||
} |
@@ -15,5 +15,6 @@ # chemical-elements | ||
```js | ||
import { elements } from 'chemical-elements'; | ||
import library from 'chemical-elements'; | ||
console.log(elements); | ||
const result = library(args); | ||
// result is ... | ||
``` | ||
@@ -20,0 +21,0 @@ |
@@ -1,3 +0,5 @@ | ||
import { stableIsotopesObject } from '..'; | ||
'use strict'; | ||
const stableIsotopesObject = require('../stableIsotopesObject'); | ||
test('stableIsotopesObject', () => { | ||
@@ -4,0 +6,0 @@ const data = stableIsotopesObject; |
@@ -1,1 +0,5 @@ | ||
export const ELECTRON_MASS = 5.4857990907e-4; | ||
'use strict'; | ||
module.exports = { | ||
ELECTRON_MASS: 5.4857990907e-4, | ||
}; |
@@ -1,4 +0,6 @@ | ||
import { elementsAndIsotopes } from './elementsAndIsotopes.js'; | ||
'use strict'; | ||
export const elements = elementsAndIsotopes.map((element) => ({ | ||
const elements = require('./elements.json'); | ||
const data = elements.map((element) => ({ | ||
number: element.number, | ||
@@ -10,1 +12,3 @@ symbol: element.symbol, | ||
})); | ||
module.exports = data; |
@@ -1,6 +0,10 @@ | ||
import { elementsAndIsotopes } from './elementsAndIsotopes.js'; | ||
'use strict'; | ||
export const elementsAndIsotopesObject = {}; | ||
elementsAndIsotopes.forEach((element) => { | ||
const elements = require('./elements.json'); | ||
let elementsAndIsotopesObject = {}; | ||
elements.forEach((element) => { | ||
elementsAndIsotopesObject[element.symbol] = element; | ||
}); | ||
module.exports = elementsAndIsotopesObject; |
@@ -1,9 +0,9 @@ | ||
import { elementsAndIsotopes } from './elementsAndIsotopes.js'; | ||
'use strict'; | ||
export const elementsAndStableIsotopes = JSON.parse( | ||
JSON.stringify(elementsAndIsotopes), | ||
); | ||
const elements = JSON.parse(JSON.stringify(require('./elements.json'))); | ||
elementsAndStableIsotopes.forEach((element) => { | ||
elements.forEach((element) => { | ||
element.isotopes = element.isotopes.filter((i) => i.abundance > 0); | ||
}); | ||
module.exports = elements; |
@@ -1,6 +0,10 @@ | ||
import { elementsAndStableIsotopes } from './elementsAndStableIsotopes.js'; | ||
'use strict'; | ||
export const elementsAndStableIsotopesObject = {}; | ||
const elementsAndStableIsotopes = require('./elementsAndStableIsotopes.js'); | ||
let elementsAndStableIsotopesObject = {}; | ||
elementsAndStableIsotopes.forEach((element) => { | ||
elementsAndStableIsotopesObject[element.symbol] = element; | ||
}); | ||
module.exports = elementsAndStableIsotopesObject; |
@@ -1,6 +0,10 @@ | ||
import { elements } from './elements.js'; | ||
'use strict'; | ||
export const elementsObject = {}; | ||
const elements = require('./elements.js'); | ||
let elementsObject = {}; | ||
elements.forEach((element) => { | ||
elementsObject[element.symbol] = element; | ||
}); | ||
module.exports = elementsObject; |
@@ -1,11 +0,21 @@ | ||
export * from './constants.js'; | ||
'use strict'; | ||
export * from './elements.js'; | ||
export * from './elementsAndIsotopes.js'; | ||
export * from './elementsAndIsotopesObject.js'; | ||
export * from './elementsAndStableIsotopes.js'; | ||
export * from './elementsAndStableIsotopesObject.js'; | ||
export * from './elementsObject.js'; | ||
export * from './stableIsotopesObject.js'; | ||
export * from './isotopesObject.js'; | ||
export * from './unsaturationsObject.js'; | ||
const { ELECTRON_MASS } = require('./constants'); | ||
const elements = require('./elements.js'); | ||
const elementsAndIsotopes = require('./elementsAndIsotopes.js'); | ||
const elementsAndIsotopesObject = require('./elementsAndIsotopesObject.js'); | ||
const elementsAndStableIsotopes = require('./elementsAndStableIsotopes.js'); | ||
const elementsAndStableIsotopesObject = require('./elementsAndStableIsotopesObject.js'); | ||
const elementsObject = require('./elementsObject.js'); | ||
const stableIsotopesObject = require('./stableIsotopesObject.js'); | ||
module.exports = { | ||
elements, | ||
elementsObject, | ||
elementsAndIsotopes, | ||
elementsAndIsotopesObject, | ||
elementsAndStableIsotopes, | ||
elementsAndStableIsotopesObject, | ||
stableIsotopesObject, | ||
ELECTRON_MASS, | ||
}; |
@@ -1,5 +0,7 @@ | ||
import { elementsAndIsotopes } from './elementsAndIsotopes.js'; | ||
'use strict'; | ||
export const stableIsotopesObject = {}; | ||
for (const element of elementsAndIsotopes) { | ||
const elements = require('./elements.json'); | ||
let isotopeObject = {}; | ||
for (const element of elements) { | ||
let abundance = 0; | ||
@@ -25,4 +27,6 @@ let mostAbundant = 0; | ||
} | ||
stableIsotopesObject[isotope.nominal + element.symbol] = entry; | ||
isotopeObject[isotope.nominal + element.symbol] = entry; | ||
} | ||
} | ||
module.exports = isotopeObject; |
@@ -1,2 +0,4 @@ | ||
export const unsaturationsObject = { | ||
'use strict'; | ||
module.exports = { | ||
O: 0, | ||
@@ -3,0 +5,0 @@ N: 1, |
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
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
2
29
135632
1
16
132
+ Addedpapaparse@^5.3.2
+ Addedpapaparse@5.4.1(transitive)