Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chemical-elements

Package Overview
Dependencies
Maintainers
4
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chemical-elements - npm Package Compare versions

Comparing version 1.2.4 to 1.3.0

src/__tests__/test.js

18

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc