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

chemicaltools

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chemicaltools

Chemical Tools for Chemistry students.

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34
decreased by-5.56%
Maintainers
1
Weekly downloads
 
Created
Source

chemicaltools-js

Version Build Status codecov Dependency Status Greenkeeper badge Downloads

Chemical Tools for JavaScript.

Installion

Install with npm

npm i chemicaltools

And you can use in Node.js:

chemicaltools = require('../index')

Use in a web page

Add script:

<script src="https://cdn.jsdelivr.net/npm/chemicaltools@latest/bundle.js"></script>

Usage

console.log(JSON.stringify(chemicaltools.searchElement("Hf")));
// {"number":"72","name":"铪","symbol":"Hf","mass":"178.5","iupac":"Hafnium","origin":"Hafnia, the New Latin name for Copenhagen","pinyin":"ha","url":"https://i.loli.net/2018/03/31/5abf7a90c8da6.png"}
console.log(JSON.stringify(chemicaltools.calculateMass("C6H12O6")));
// {"name":"C6H12O6","mass":180.156,"peratom":[{"name":"氢","iupac":"Hydrogen","symbol":"H","atomnumber":12,"mass":"1.008","massper":6.714181043095984},{"name":"碳","iupac":"Carbon","symbol":"C","atomnumber":6,"mass":"12.01","massper":39.99866782122161},{"name":"氧","iupac":"Oxygen","symbol":"O","atomnumber":6,"mass":"16","massper":53.28715113568241}]}
console.log(JSON.stringify(chemicaltools.calculateGas(p = 3, V = 1, n = 1)));
// {"p":3,"V":1,"n":1,"T":0.36083714216983404}
console.log(JSON.stringify(chemicaltools.calculateAcid(0.1, [2, 7], true)));
// {"c":0.1,"pH":1.5683850420032601,"ion":[{"name":"H","c":0.027015621187203295},{"name":"H2A","c":0.07298430582855843},{"name":"HA-","c":0.027015594171541573},{"name":"A2-","c":9.999989999984995e-8}]}
console.log(JSON.stringify(chemicaltools.calculateDeviation([2.232, 2.455, 2.742, 2.535, 2.362])));
// {"input":[2.232,2.455,2.742,2.535,2.362],"average":2.4652000000000003,"average_deviation":0.13864,"relative_average_deviation":0.05623884471848126,"standard_deviation":0.05160000000000009,"relative_standard_deviation":0.3721869590305834}
console.log(JSON.stringify(chemicaltools.makeQuestion("name", "iupac")));
// {"question":"铍","options":["Beryllium","Gallium","Lanthanum","Platinum"]}
console.log(JSON.stringify(chemicaltools.correctAnswer("铷", "Rubidiutm", "name", "iupac")));
// {"correct":false,"question":"铷","correct_answer":"Rubidium","answer":"Rubidiutm"}

Keywords

FAQs

Package last updated on 07 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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