npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

trapi-client

v0.0.3

Published

Translator Application Programming Interface Client

Readme

TRAPI Javascript Client

This project is a lightweight Javascript client library for the Translator Reasoner API (TRAPI) web services. TRAPI is a standard web service specification for the Biomedical Data Translator project of the National Center for Advancing Translational Science (NCATS; https://ncats.nih.gov/).

Version

This client is current compatible with TRAPI Release 1.0.

Overview

The Translator Reasoner API (TRAPI) is a web services protocol for querying metadata and data in knowledge graphs which represent networks of biomedical concepts and relationships imported by so-called Translator Knowledge Provider ("KP") components from external biomedical knowledge sources (i.e. public bioinformatics databases, literature or data sources) or constructed by machine learning algorithms inferring from said imported knowledge sources by so-called Translator Autonomous Relay Agent ("ARA") components.

TRAPI 1.0 currently consists of two endpoints:

  • /predicates: returns web service metadata consisting of a simple map Biolink Model relationship predicates and concept category values used in knowledge graphs returned by the service (note: future TRAPI releases will significantly elaborate further on the functionality of this endpoint, which will also likely be renamed)

  • /query: executes a knowledge graph templated query on the underlying KP or ARA to return a relevant knowledge graph and a set of 'results' mapping of the seed concepts and edges of the knowledge graph templated query, against that knowledge graph.

Getting Started

This project uses Javascript and uses npm for managing module dependencies and running the system which needs to be installed. Instructions for installing npm are here.

Installing the Client from the Public Module Repository

Assuming that your npm is properly configured, the latest public npm package release of the module may be installed as follows:

$ npm install trapi-client

or using yarn

yarn add trapi-client

Locally Installing and Developing with the Client Project

If you wish to directly modify or add to the client software, the project may be directly installed as follows.

Obtaining the Source Code

The first step is to clone the project source code from the Github project repository, into a suitable location on your computer using a copy of Git installed on your operating system:

git clone https://github.com/STARInformatics/trapi-client-js.git

Installing Javascript Dependencies

After cloning the project, you need to install the project's Javascript module dependencies locally, by typing the following from within your root project directory (i.e. inside /path/to/your/project/trapi-client-js):

$ npm install

Using the Client

trapi.js

The trapi.js script may be run directly by typing:

$ node trapi.js

This script has very simple functionality for quick testing purposes.

client.js

The trapi.js script actually calls the underlying TRAPI client.js module to do its work. This client module may be directly invoked within other Javascript execution contexts by importing the module and running its functions directly, as illustrated by the code within the trapi.js script.

var client = require("./src/client.js");

var predicates = client.predicates();

var results = client.query();

Implementation

Aside from basic Javascript, this project uses the openapitools openapi-generator-cli module.