bibtex-search
Advanced tools
Comparing version 0.1.2 to 0.1.3
34
index.js
@@ -12,8 +12,6 @@ #!/usr/bin/env node | ||
const chalk = require('chalk'); | ||
const hyperlinker = require('hyperlinker'); | ||
const MAX_ARTICLES = 10; | ||
const ACM_BASE = 'https://dl.acm.org'; | ||
const ACM_SEARCH_URL = `${ACM_BASE}/results.cfm`; | ||
const ACM_REFERENCE_URL = `${ACM_BASE}/exportformats.cfm`; | ||
const ACM_SEARCH_URL = 'https://dl.acm.org/results.cfm'; | ||
const ACM_REFERENCE_URL = 'https://dl.acm.org/exportformats.cfm'; | ||
@@ -37,10 +35,10 @@ /** | ||
const url = link.attr('href'); | ||
const { id } = querystring.parse(url.split('?').pop()); | ||
return { | ||
id, | ||
title, | ||
authors, | ||
href: `${ACM_BASE}/${url}` | ||
}; | ||
const { id } = querystring.parse( | ||
link | ||
.attr('href') | ||
.split('?') | ||
.pop() | ||
); | ||
return { id, title, authors }; | ||
}); | ||
@@ -71,10 +69,6 @@ } | ||
function buildQuestions(articles) { | ||
const choices = articles.map(({ id, href, title, authors }, i) => { | ||
const prefix = hyperlinker(title, href); | ||
const suffix = chalk.dim(`(${authors})`); | ||
return { | ||
value: id, | ||
name: `${prefix} ${suffix}` | ||
}; | ||
}); | ||
const choices = articles.map(({ id, title, authors }, i) => ({ | ||
value: id, | ||
name: `${title} ${chalk.dim(`(${authors})`)}` | ||
})); | ||
@@ -81,0 +75,0 @@ return [ |
{ | ||
"name": "bibtex-search", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Search for BibTeX references", | ||
@@ -34,3 +34,2 @@ "main": "index.js", | ||
"got": "^8.0.0", | ||
"hyperlinker": "^1.0.0", | ||
"inquirer": "^4.0.0", | ||
@@ -37,0 +36,0 @@ "meow": "^4.0.0", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
7
0
100
53924
7
103
1
- Removedhyperlinker@^1.0.0
- Removedhyperlinker@1.0.0(transitive)