Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-ncbi

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-ncbi - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

1

bin/repl.js

@@ -0,1 +1,2 @@

const repl = require('repl');

@@ -2,0 +3,0 @@ const open = require('open');

4

package.json
{
"name": "node-ncbi",
"version": "0.1.0",
"version": "0.2.0",
"description": "Access and parse the NCBI eUtils API in Node or the Browser",

@@ -26,3 +26,2 @@ "keywords": [

"dependencies": {
"gulp-util": "^3.0.7",
"popsicle": "^0.5.12",

@@ -36,2 +35,3 @@ "underscore": "^1.8.3",

"gulp-mocha": "^2.1.2",
"gulp-util": "^3.0.7",
"mocha": "^2.2.5",

@@ -38,0 +38,0 @@ "open": "0.0.5"

@@ -29,5 +29,7 @@ # node-ncbi

```js
pubmedSearch.nextPage().then( ... );
pubmedSearch.getPage(1).then( ... );
```
**Note**: An earlier version used `pubmedSearch.nextPage` without an argument. I decided that storing this one tiny piece of state in the controller was stupid.
To change the number of results retrieved at a time:

@@ -34,0 +36,0 @@

@@ -19,4 +19,3 @@ const _ = require('underscore');

query: '',
settings: null,
currentPage: -1
settings: null
};

@@ -35,3 +34,2 @@

var search = createGateway.pubmedSearch(this.query, firstResult, lastResult);
console.log(search.generateUrl());

@@ -46,11 +44,5 @@ return search.resolve().then(eSearchDocument => {

/**
* nextPage - get the next page of results.
* Starting at 0, you can retrieve all results by calling nextPage sequentially.
* @return a promise which will resolve to a page's-worth of result summaries.
* Alias for getPage that gets the first page of results.
*/
SearchCtlr.nextPage = SearchCtlr.search = function() {
this.currentPage++;
var page = this.getPage(this.currentPage);
return page;
}
SearchCtlr.search = () => {return SearchCtlr.getPage(0)};

@@ -57,0 +49,0 @@ /**

@@ -1,2 +0,2 @@

const _ = require("underscore");
const _ = require('underscore');

@@ -3,0 +3,0 @@ /**

const parseString = require('xml2js').parseString;
const _ = require("underscore");
const _ = require('underscore');

@@ -4,0 +4,0 @@ const DocumentTypes = {

@@ -1,2 +0,2 @@

"strict mode";
'strict mode';

@@ -44,3 +44,3 @@ const _ = require('underscore');

var idString = _.isArray(ids) ? ids.join() : ids;
return this.addParams({id : idString});
return this.addParams({id: idString});
}

@@ -77,4 +77,4 @@

return popsicle({
method : 'GET',
url : url
method: 'GET',
url: url
});

@@ -116,6 +116,6 @@ }

gateway.settings = _.extend({
documentType : 'esearch',
responseType : 'json',
params : {},
test : false
documentType: 'esearch',
responseType: 'json',
params: {},
test: false
}, args);

@@ -122,0 +122,0 @@ gateway.addParams({retmode: gateway.settings.responseType});

@@ -1,2 +0,2 @@

"use strict";
'use strict';

@@ -31,6 +31,6 @@ const createGateway = require('./createGateway');

pubmedSummary: function(ids) {
let gateway = createGateway({
documentType : 'esummary',
params : {
db : 'pubmed'
const gateway = createGateway({
documentType: 'esummary',
params: {
db: 'pubmed'
}

@@ -47,7 +47,7 @@ });

pubmedRecord: function(ids) {
let gateway = createGateway({
documentType : 'efetch',
responseType : 'xml',
params : {
db : 'pubmed'
const gateway = createGateway({
documentType: 'efetch',
responseType: 'xml',
params: {
db: 'pubmed'
}

@@ -66,6 +66,6 @@ });

pubmedLinks: function(id) {
let gateway = createGateway({
documentType : 'elink',
params : {
db : 'pubmed',
const gateway = createGateway({
documentType: 'elink',
params: {
db: 'pubmed',
dbfrom: 'pubmed',

@@ -72,0 +72,0 @@ cmd: 'neighbor'

@@ -1,9 +0,7 @@

"use strict";
/* eslint-env mocha, node */
/*eslint-env mocha */
//test the tests
var assert = require("assert")
describe('Array', function(){
describe('#indexOf()', function(){
var assert = require('assert')
describe('Array', function() {
describe('#indexOf()', function() {
it('should return -1 when the value is not present', function(){

@@ -10,0 +8,0 @@ assert.equal(-1, [1,2,3].indexOf(5));

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc