Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 777 Bytes

README.md

File metadata and controls

44 lines (29 loc) · 777 Bytes

edam2json-js

Javascript library to convert EDAM to JSON/JSON-LD

Installation

$ yarn add edam2json-js

or

$ npm install edam2json-js

Importing/Requiring

import { jsonTreeFromURL } from "edam2json-js";

or

const jsonTreeFromURL = require("edam2json-js").jsonTreeFromURL;

Usage

jsonTreeFromURL is a function that takes a url (with .owl extention) as a first argument and outputs the converted json tree to the callback function passed as a second argument

const url =
  "https://raw.githubusercontent.com/edamontology/edamontology/main/EDAM_dev.owl";

jsonTreeFromURL(url, (tree) => {
  console.log(tree);
});

License

MIT license