@geneontology/curie-util-es5

Javascript Library to Translate CURIEs to IRIs and vice versa. ES5 Version.

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
10Jun 8, 2020Jul 25, 2018Minified + gzip package size for @geneontology/curie-util-es5 in KB

Readme

curie-util-js

Javascript Library to translate CURIEs to IRIs and vice versa. ES5 Version based on the Java Implementation: https://github.com/prefixcommons/curie-util

Install

npm install --save @geneontology/curie-util-es5

Use require or import to use the package in your JavaScript code

Usage

Retrieve a JSON-LD file such as: https://github.com/prefixcommons/biocontext/blob/master/registry/go_context.jsonld

var map = parseContext(json);
var curie = new CurieUtil(map);

Get IRI

curie.getIri("ZFIN:ZDB-GENE-031112-7");
curie.getIri("MGI:MGI:34340");

Get CURIE

curie.getCurie("http://identifiers.org/zfin/ZDB-GENE-031112-7");
curie.getCurie("http://identifiers.org/mgi/MGI:34340");

Notes

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.