@fadhil-riyanto/chemistry

1.0.0 • Public • Published

chemistry

get data from largest chemistry database

how to search and getting Compound ID

import { chemistry } from "@fadhil-riyanto/chemistry"

(async () => {
    let search = new chemistry.Search("1,4 dichlorobenzene")
    let result = await search.get()
    console.log(result); // <-- you I'll get autocomplete data here

    console.log(await search.getCID("1-Bromo-2,4-dichlorobenzene")) // <-- fill desired keyword

})()

getting chemical info based on CID

import { chemistry, imageType } from "@fadhil-riyanto/chemistry"

(async () => {
    let details = new chemistry.CompoundID(5360545)
    console.log(details.image(imageType.IMG_3D))

    console.log((await details.summary()))
})()

maintainer:

@fadhil-riyanto

license

GPL-2.0

Readme

Keywords

none

Package Sidebar

Install

npm i @fadhil-riyanto/chemistry

Weekly Downloads

0

Version

1.0.0

License

GPL-2.0

Unpacked Size

42.7 kB

Total Files

17

Last publish

Collaborators

  • fadhil-riyanto