web

webchemjs

JavaScript (Node.js) port of the WebChem library for R

Showing:

Popularity

Downloads/wk

12

GitHub Stars

1

Maintenance

Last Commit

2yrs ago

Contributors

0

Package

Dependencies

3

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

webchemjs

WebChemJS is a port of the R package WebChem to JavaScript for Node.js.

You can currently query the following:

(others coming soon)

Package Status - ALPHA

This is an initial commit on this project and is in a very rough ALPHA stage. I am currently constructing on an as-needed basis. Anyone wishing to contribute, please drop me a line.

General Usage

The submodules of this package can be used in a "promise-style" or "callback" fashion. Each submodule offers a set of query functions that provide an interface to the APIs provided by the associated data services.

Each query takes in an options parameter and asynchronously calls the related service accordingly. If a callback is provided, the callback will be called with the error state and the results of the call. If a callback is not provided, the query will return a promise (see https://github.com/kriskowal/q)

For example:

const PubChem = require('webchemjs').PubChem;
const util = require('util');

PubChem.query(
    {
        query : [
            {
                    id : "554Z48XN5E",
                    from : "xref/RegistryID",
                    to : "property/InChiKey" 
                },
                {
                    id : "721M9407IY",
                    from : "xref/RegistryID",
                    to : "property/InChiKey" 
                },
                {
                    id : "8KQ660G60G",
                    from : "xref/RegistryID",
                    to : "property/InChiKey" 
                }
        ],
        first : false,
        verbose : false
    },
    processResults
    
);

function processResults(err, results) {
    if (err) {
        console.log(err);
        process.exit(-1);
    }
    console.log("results: ", util.inspect(results,false,null));

}

Installation

npm install webchemjs --save

Testing

There is no real testing at the moment. Anything named test is simply an example.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial