bionode-ncbi
Advanced tools
Comparing version 0.0.8 to 0.1.0
@@ -35,2 +35,3 @@ // # bionode-ncbi | ||
var debug = require('debug')('bionode-ncbi') | ||
var concat = require('concat-stream') | ||
@@ -84,6 +85,7 @@ | ||
NCBI.prototype.search = function(db, term) { | ||
NCBI.prototype.search = function(db, term, cb) { | ||
var stream = through.obj(transform) | ||
if (term) { stream.write(term); stream.end() } | ||
return stream | ||
if (cb) { stream.pipe(concat(cb)) } | ||
else { return stream } | ||
@@ -199,6 +201,7 @@ function transform(obj, enc, next) { | ||
NCBI.prototype.link = function(srcDB, destDB, srcUID) { | ||
NCBI.prototype.link = function(srcDB, destDB, srcUID, cb) { | ||
var stream = through.obj(getDestUID) | ||
if (srcUID) { stream.write(srcUID); stream.end() } | ||
return stream | ||
if (cb) { stream.pipe(concat(cb)) } | ||
else { return stream } | ||
@@ -257,6 +260,7 @@ function getDestUID(srcUID, enc, next) { | ||
NCBI.prototype.download = function(db, term) { | ||
NCBI.prototype.download = function(db, term, cb) { | ||
var stream = through.obj(transform) | ||
if (term) { stream.write(term); stream.end() } | ||
return stream | ||
if (cb) { stream.pipe(concat(cb)) } | ||
else { return stream } | ||
function transform(obj, enc, next) { | ||
@@ -287,6 +291,7 @@ var self = this | ||
NCBI.prototype.urls = function(db, term) { | ||
NCBI.prototype.urls = function(db, term, cb) { | ||
var stream = through.obj(transform) | ||
if (term) { stream.write(term); stream.end() } | ||
return stream | ||
if (cb) { stream.pipe(concat(cb)) } | ||
else { return stream } | ||
function transform(obj, enc, next) { | ||
@@ -293,0 +298,0 @@ var self = this |
{ | ||
"name": "bionode-ncbi", | ||
"description": "Node.js module for working with the NCBI API (aka e-utils) using Streams.", | ||
"version": "0.0.8", | ||
"version": "0.1.0", | ||
"homepage": "http://github.com/bionode/bionode-ncbi", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -8,7 +8,11 @@ <p align="center"> | ||
</p> | ||
# bionode-ncbi [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][depstat-image]][depstat-url] [![DOI][doi-image]][doi-url] | ||
# bionode-ncbi | ||
> Node.js module for working with the NCBI API (aka e-utils). | ||
[![NPM version][npm-image]][npm-url] | ||
[![Build Status][travis-image]][travis-url] | ||
[![Coveralls Status][coveralls-image]][coveralls-url] | ||
[![Dependency Status][depstat-image]][depstat-url] | ||
[![Gitter chat][gitter-image]][gitter-url] | ||
[![DOI][doi-image]][doi-url] | ||
@@ -91,12 +95,14 @@ Install | ||
[npm-url]: http://npmjs.org/package/bionode-ncbi | ||
[npm-image]: http://badge.fury.io/js/bionode-ncbi.png | ||
[travis-url]: http://travis-ci.org/bionode/bionode-ncbi | ||
[travis-image]: http://travis-ci.org/bionode/bionode-ncbi.png?branch=master | ||
[coveralls-url]: http://coveralls.io/r/bionode/bionode-ncbi | ||
[coveralls-image]: http://coveralls.io/repos/bionode/bionode-ncbi/badge.png | ||
[npm-image]: http://img.shields.io/npm/v/bionode-ncbi.svg?style=flat | ||
[travis-url]: http:////travis-ci.org/bionode/bionode-ncbi | ||
[travis-image]: http://img.shields.io/travis/bionode/bionode-ncbi.svg?style=flat | ||
[coveralls-url]: http:////coveralls.io/r/bionode/bionode-ncbi | ||
[coveralls-image]: http://img.shields.io/coveralls/bionode/bionode-ncbi.svg?style=flat | ||
[depstat-url]: http://david-dm.org/bionode/bionode-ncbi | ||
[depstat-image]: http://david-dm.org/bionode/bionode-ncbi.png | ||
[doi-url]: http://dx.doi.org/10.5281/zenodo.10610 | ||
[doi-image]: https://zenodo.org/badge/3959/bionode/bionode-ncbi.png | ||
[depstat-image]: http://img.shields.io/david/bionode/bionode-ncbi.svg?style=flat | ||
[gitter-image]: http://img.shields.io/badge/gitter-bionode/bionode--ncbi-brightgreen.svg?style=flat | ||
[gitter-url]: https://gitter.im/bionode/bionode-ncbi | ||
[doi-url]: http://dx.doi.org/10.5281/zenodo.11129 | ||
[doi-image]: http://img.shields.io/badge/doi-10.5281/zenodo.11129-blue.svg?style=flat | ||
[![Bitdeli Badge](http://d2weczhvl823v0.cloudfront.net/bionode/bionode-ncbi/trend.png)](https://bitdeli.com/free "Bitdeli Badge") |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
439945
1369
107