Comparing version 0.5.0 to 0.5.1
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ var gulp = require('gulp'); |
@@ -0,0 +0,0 @@ 'use strict'; |
{ | ||
"name": "node-ncbi", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Access and parse the NCBI eUtils API in Node or the Browser", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -78,4 +78,6 @@ # node-ncbi | ||
- `similar()` - papers similar to this one (similarity is calculated on NCBI's side of the API, not ours). | ||
- `isOa()` - true if the full NLM XML can be retrieved ("Gold" open-access) | ||
- `fulltext()` - the full NLM XML if available, null otherwise | ||
All methods return a promise accessible by `.then()`. Except for `.abstract()` the parameter passed to the callback is a PubMed summary or an array of summaries. | ||
All methods return a promise accessible by `.then()`; the value retrieved is passed to the promise. | ||
@@ -82,0 +84,0 @@ ## Contributing |
@@ -0,0 +0,0 @@ const update = require('react-addons-update'); |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ const parseString = require('xml2js').parseString; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ const update = require('react-addons-update'); |
@@ -1,3 +0,1 @@ | ||
const update = require('react-addons-update'); | ||
const summaryQueries = { | ||
@@ -17,4 +15,3 @@ | ||
authors: summaryQueries.formatAuthors(data.authors) || '', | ||
pubDate: data.sortpubdate, | ||
abstract: '' | ||
pubDate: data.sortpubdate | ||
}; | ||
@@ -27,3 +24,3 @@ data.articleids.forEach((idObject) => { | ||
//Remove PMC from the beginning of the string and make sure it's an integer. | ||
summary.pmc = parseInt(idObject.value.replace("PMC", "")); | ||
summary.pmc = parseInt(idObject.value.replace('PMC', '')); | ||
} else if (idObject.idtype === 'doi') { | ||
@@ -39,3 +36,3 @@ //Move DOI to the top level | ||
if (sortingFunc) { | ||
summaries.sort(sortingFunction); | ||
summaries.sort(sortingFunc); | ||
} else { | ||
@@ -42,0 +39,0 @@ //default sorting function: reverse chronological |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -23,10 +23,9 @@ /* eslint-env mocha, node */ | ||
isPubmedSummary: function(obj) { | ||
check.number(obj.pmid); | ||
check.object(obj.raw); | ||
check.string(obj.pubDate); | ||
check.string(obj.title); | ||
check.string(obj.authors); | ||
check.emptyString(obj.abstract); | ||
check.string(obj.pubDate); | ||
check.number(obj.pmid); | ||
} | ||
} |
@@ -0,0 +0,0 @@ /* eslint-env mocha, node */ |
@@ -0,0 +0,0 @@ /* eslint-env mocha, node */ |
@@ -0,0 +0,0 @@ /* eslint-env mocha, node */ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
131
224476
2476