1.0.1 • Published 4 years ago

biothings-explorer-filters v1.0.1

Weekly downloads
44
License
Apache-2.0
Repository
github
Last release
4 years ago

biothings_explorer_filters.js

npm Build Status Coverage Status
NodeJS library delivering Filter features for BioThings Explorer

Install

npm install biothings-explorer-filters

Usage

const filterResults = require("biothings-explorer-filters");

//other code for setting up and using call-apis package
let results = queryExecutor.result; //get results from call-apis package

let options = {
    sort_by: "ngd_overall",
    max_results: 10
};
results = await filterResults(results, options);

Options

ParamTypeDescription
sort_byStringField to sort by, can be either "ngd_overall" or "ngd_starred"
max_resultsNumberMaximum results to return

Run Tests

npm run test