npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

all-isotopes

v1.3.0

Published

JSON containing information about isotopes with JavaScript

Downloads

8

Readme

all-isotopes

JSON containing information about isotopes with JavaScript

Usage

import the package:

import * as allIso from 'all-isotopes';

(1) get all isotopes:

console.log(allIso.isotopes);
output:
[
  {
    "atomic_number": 1,
    "element": "H",
    "isotopes": [
      {
        "mass_number": 1,
        "nuclide": "H-1",
        "mass": 1.00782503223,
        "abundance": 0.999885
      },
      {
        "mass_number": 2,
        "nuclide": "H-2",
        "mass": 2.01410177812,
        "abundance": 0.000115
      },
  ...
]

(2) get info by element's symbol:

const DsInfo = allIso.elements.Ds;
or
const DsInfo = allIso.getInfoByElement('Ds');
console.log(DsInfo);
output:
{
  "atomic_number": 110,
  "element": "Ds",
  "isotopes": [
    {
      "mass_number": 267,
      "nuclide": "Ds-267",
      "mass": 267.14377,
      "abundance": 0
    },   
    ...
}

(3) or get info by atomic number:

const infoByNumber2 = allIso.numbers[2];
or
const infoByNumber2 = allIso.getInfoByAtomicNumber(2);
console.log(infoByNumber2);

(4) get categorized isotopes by element symbol:

const isoOfLi = allIso.categorizeByElement('Li');
console.log(isoOfLi);
output:
{
  "stable":[
    {
    "atomic_number": 3,
    "element": "Li",
    "mass_number": 6,
    "nuclide": "Li-6",
    "mass": 6.0151228874,
    "abundance": 0.0759
    },
  ...
  ],
  "unstable":[
    {
    "atomic_number": 3,
    "element": "Li",
    "mass_number": 3,
    "nuclide": "Li-3",
    "mass": 3.0308,
    "abundance": 0
    },
  ... 
  ]  
... 
}

(5) or get categorized isotopes by atomic number

const isoOfNumber5 = allIso.categorizeByAtomicNumber(5);
console.log(isoOfNumber5);

Data

The data for this package comes from NIST and was retrieved on Sep 23th, 2023. The "Linearized ASCII Output" for all elements and all isotopes can be found in NIST_DATA.dat. The script generate_all.mjs can be used to regenerate the allIsotopes.json file which contains the isotopic distribution data. The development dependencies must be installed before running generate_all.mjs.

License

This software is released under the MIT license