UNPKG

pubchem

Version:

pubchem simplifies the data retrieval from the PubChem API.

21 lines 989 B
"use strict"; // Names and Identifiers var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getInChIKey = getInChIKey; const jsonpath_1 = __importDefault(require("jsonpath")); function getInChIKey(data) { return { value: jsonpath_1.default.query(data, '$.Section[?(@.TOCHeading==="Names and Identifiers")]' + '.Section[?(@.TOCHeading==="Computed Descriptors")]' + '.Section[?(@.TOCHeading==="InChIKey")]' + '.Information[0]')[0].Value.StringWithMarkup[0].String, label: 'InChIKey', description: jsonpath_1.default.query(data, '$.Section[?(@.TOCHeading==="Names and Identifiers")]' + '.Section[?(@.TOCHeading==="Computed Descriptors")]' + '.Section[?(@.TOCHeading==="InChIKey")]')[0].Description, }; } //# sourceMappingURL=getInChIKey.js.map