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 🙏

© 2024 – Pkg Stats / Ryan Hefner

bridgedb

v6.2.7

Published

JS client for BridgeDb.org ID mapping framework webservices

Downloads

31

Readme

bridgedb-6.0.0-2

JS client for the BridgeDb ID mapping framework webservice. If you want to use the version, see the 5x branch.

~~##API Documentation~~

Installation

Browser

<script src="https://bridgedb.github.io/bridgedbjs/dist/bridgedb-5.0.13.min.js"></script>

Node.js

npm install --save bridgedb

Simple Example

var BridgeDb = require('bridgedb').default; // Omit this line unless you're using Node.js

var bridgeDbInstance = new BridgeDb();
bridgeDbInstance.search('Mouse', 'Nfkb1')
  .subscribe(function(searchResult) {
    console.log('Result for Nfkb1');
    console.log(searchResult);
  });

More Complex Example

Use ES2015, options and error catching.

import BridgeDb from 'bridgedb';

const bridgeDbInstance = new BridgeDb({
  baseIri: 'http://example.org/',
  dataSourcesHeadersIri: 'http://example.org/data-sources-headers.txt'
  dataSourcesMetadataIri 'http://example.org/data-sources.txt',
});
bridgeDbInstance.search('Mouse', 'Nfkb1')
  .subscribe(function(searchResult) {
    console.log('Result for Nfkb1');
    console.log(searchResult);
  }, function(err) {
    throw err;
  }, function() {
    console.log('complete');
  });

The methods return RxJS Observables, meaning can use subscribe as shown above to get the next values, catch errors and be notified when the observable is complete.

For more examples, see the test directory.

For Developers

  1. Install Node.js
  2. Fork this repo (if you don't have commit rights to it)
  3. git clone https://github.com/bridgedb/bridgedbjs.git (or use your fork's URL)
  4. cd bridgedbjs
  5. npm install
  6. Make sure the tests pass: test documentation.
  7. Refactor the code. Add new tests for your changes if not already covered by the existing tests.
  8. Make sure the tests all pass.
  9. Send a pull request from your local repo to the master branch of this repo.

Dependencies

Each time this library is instantiated, it downloads the following files:

These files are accessed via the RawGit CDN. The desired version of the files to download is specified in src/main.ts as the commit hash of the latest release of bridgedbjs, e.g/, 24186142d05b5f811893970b9a5d61a06f241f68 to produce a URL like https://cdn.rawgit.com/bridgedb/BridgeDb/24186142d05b5f811893970b9a5d61a06f241f68/org.bridgedb.bio/resources/org/bridgedb/bio/datasources.txt

TODOs

  • [ ] Set up mockserver so it "caches" the API response from an endpoint the first time it's called. Right now, we need to create new mocks for API endpoints manually. (I have the code for doing this already working somewhere.)
  • [ ] UI components
    • [ ] Use React without Redux.
    • [ ] Make it possible to use the UI components individually and in any combination.
    • [ ] Build tests. Current tests are not working.
  • [ ] Check handling of no results returned for attributeSearch for both the API client and the UI component.
  • [ ] Possibly require that inputs to attributeSearch be at least three characters in length.

Troubleshooting

npm install throws an error like library not found for -lgcc_s.10.5

  • This appears to be particular to certain Node and OS X versions and can be fixed with a symlink: >cd /usr/local/lib >sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib