New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bibtex-search

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bibtex-search - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

34

index.js

@@ -12,6 +12,8 @@ #!/usr/bin/env node

const chalk = require('chalk');
const hyperlinker = require('hyperlinker');
const MAX_ARTICLES = 10;
const ACM_SEARCH_URL = 'https://dl.acm.org/results.cfm';
const ACM_REFERENCE_URL = 'https://dl.acm.org/exportformats.cfm';
const ACM_BASE = 'https://dl.acm.org';
const ACM_SEARCH_URL = `${ACM_BASE}/results.cfm`;
const ACM_REFERENCE_URL = `${ACM_BASE}/exportformats.cfm`;

@@ -35,10 +37,10 @@ /**

const { id } = querystring.parse(
link
.attr('href')
.split('?')
.pop()
);
return { id, title, authors };
const url = link.attr('href');
const { id } = querystring.parse(url.split('?').pop());
return {
id,
title,
authors,
href: `${ACM_BASE}/${url}`
};
});

@@ -69,6 +71,10 @@ }

function buildQuestions(articles) {
const choices = articles.map(({ id, title, authors }, i) => ({
value: id,
name: `${title} ${chalk.dim(`(${authors})`)}`
}));
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}`
};
});

@@ -75,0 +81,0 @@ return [

{
"name": "bibtex-search",
"version": "0.1.1",
"version": "0.1.2",
"description": "Search for BibTeX references",

@@ -34,2 +34,3 @@ "main": "index.js",

"got": "^8.0.0",
"hyperlinker": "^1.0.0",
"inquirer": "^4.0.0",

@@ -36,0 +37,0 @@ "meow": "^4.0.0",

@@ -5,3 +5,3 @@ # bibtex-search [![Build Status](https://travis-ci.org/ekmartin/bibtex-search.svg?branch=master)](https://travis-ci.org/ekmartin/bibtex-search)

![bibtex-search](https://i.imgur.com/MAx3vXx.gif)
![bibtex-search](https://i.imgur.com/ARhwzbQ.gif)

@@ -13,2 +13,4 @@ Currently uses [ACM's Digital Library](https://dl.acm.org/) to find papers, but

bibtex-search needs at least version 7.6 of Node.js installed.
```bash

@@ -15,0 +17,0 @@ $ npm install --global bibtex-search

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

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