Skip to content

Commit

Permalink
Capitalize OpenAlex identifier key
Browse files Browse the repository at this point in the history
  • Loading branch information
AbeJellinek committed Jul 22, 2024
1 parent 74af943 commit cc3d1eb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ module.exports = {
});
}
else if (testCase.type === 'search') {
const expected = ['DOI', 'ISBN', 'PMID', 'identifiers', 'contextObject', 'adsBibcode', 'ericNumber', 'openalex'];
const expected = ['DOI', 'ISBN', 'PMID', 'identifiers', 'contextObject', 'adsBibcode', 'ericNumber', 'openAlex'];
const keys = Array.isArray(testCase.input) ? testCase.input.flatMap(Object.keys) : Object.keys(testCase.input);

if (!keys.every(key => expected.includes(key))) {
Expand Down
10 changes: 5 additions & 5 deletions OpenAlex JSON.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions OpenAlex.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ function detectWeb(doc, url) {
}

function detectSearch(item) {
return !!item.openalex;
return !!item.openAlex;
}

async function doSearch(item) {
await scrape([item.openalex]);
await scrape([item.openAlex]);
}

function getSearchResults(doc, checkOnly) {
Expand Down

0 comments on commit cc3d1eb

Please sign in to comment.