UNPKG

molstar

Version:

A comprehensive macromolecular library.

26 lines 939 B
/** * Copyright (c) 2017 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal <david.sehnal@gmail.com> */ import { __awaiter, __generator } from "tslib"; import fetch from 'node-fetch'; import { createMapping } from './mapping'; (function () { return __awaiter(this, void 0, void 0, function () { var data, json; return __generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, fetch('https://www.ebi.ac.uk/pdbe/api/mappings/1tqn?pretty=true')]; case 1: data = _a.sent(); return [4 /*yield*/, data.json()]; case 2: json = _a.sent(); console.log(createMapping(json)); return [2 /*return*/]; } }); }); }()); //# sourceMappingURL=test.js.map