molprint
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published
npm version npm downloads

MolPrint NPM Package

Npm package providing random chemical compounds.

Installation

npm install molprint

Use

  1. Import the package function..

    import getCompound from "molprint";
  2. Call the imported function..

    const compound = getCompound();
    console.log(compound);

    This will output a random chemical compound with description to the console.

    getCompound() has an optional boolean parameter detailed: true by default.

    If detailed: false, only the compound will be output, without description.

    import getCompound from "./index.js";
    console.log(getCompound(false)); 
    //Out: { compound: 'Ethanol (C2H5OH)', description: null }

If you'd like to contribute, feel free to submit a pull request.

Readme

Keywords

Package Sidebar

Install

npm i molprint

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

29.4 kB

Total Files

12

Last publish

Collaborators

  • prits_