https://github.com/fadhil-riyanto/chemistry
chemistry and medicine datasheet library
https://github.com/fadhil-riyanto/chemistry
chemistry node-package pubchem
Last synced: 9 months ago
JSON representation
chemistry and medicine datasheet library
- Host: GitHub
- URL: https://github.com/fadhil-riyanto/chemistry
- Owner: fadhil-riyanto
- License: gpl-2.0
- Created: 2024-06-23T01:47:11.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-27T10:17:38.000Z (over 1 year ago)
- Last Synced: 2025-02-05T21:59:27.377Z (11 months ago)
- Topics: chemistry, node-package, pubchem
- Language: TypeScript
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# chemistry
get data from largest chemistry database
```
npm i @fadhil-riyanto/chemistry
```
## how to search and getting Compound ID
```ts
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
```ts
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