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