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

@citation-js/plugin-doi

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@citation-js/plugin-doi - npm Package Compare versions

Comparing version 0.4.6 to 0.4.7

15

lib-mjs/api.js

@@ -7,4 +7,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }

import { util } from '@citation-js/core';
var apiHeaders = {
Accept: 'application/vnd.citationstyles.csl+json'
var apiOptions = {
checkContentType: true,
headers: {
Accept: 'application/vnd.citationstyles.csl+json'
}
};

@@ -20,5 +23,3 @@

_context.next = 2;
return util.fetchFileAsync(url, {
headers: apiHeaders
});
return util.fetchFileAsync(url, apiOptions);

@@ -70,5 +71,3 @@ case 2:

var fetchDoiApi = function fetchDoiApi(url) {
var result = util.fetchFile(url, {
headers: apiHeaders
});
var result = util.fetchFile(url, apiOptions);
return result === '[]' ? {} : JSON.parse(result);

@@ -75,0 +74,0 @@ };

@@ -18,4 +18,7 @@ "use strict";

const apiHeaders = {
Accept: 'application/vnd.citationstyles.csl+json'
const apiOptions = {
checkContentType: true,
headers: {
Accept: 'application/vnd.citationstyles.csl+json'
}
};

@@ -25,5 +28,3 @@

var _ref = _asyncToGenerator(function* (url) {
const result = yield _core.util.fetchFileAsync(url, {
headers: apiHeaders
});
const result = yield _core.util.fetchFileAsync(url, apiOptions);
return result === '[]' ? {} : JSON.parse(result);

@@ -51,5 +52,3 @@ });

const fetchDoiApi = function fetchDoiApi(url) {
const result = _core.util.fetchFile(url, {
headers: apiHeaders
});
const result = _core.util.fetchFile(url, apiOptions);

@@ -56,0 +55,0 @@ return result === '[]' ? {} : JSON.parse(result);

{
"name": "@citation-js/plugin-doi",
"version": "0.4.6",
"version": "0.4.7",
"description": "Plugin for DOI input for Citation.js",

@@ -35,3 +35,3 @@ "keywords": [

"devDependencies": {
"@citation-js/core": "^0.4.6"
"@citation-js/core": "^0.4.7"
},

@@ -41,3 +41,3 @@ "peerDependencies": {

},
"gitHead": "01169a9cc9c05bd81b8ca442f2cc6c862419368c"
"gitHead": "96d42cc13bf1ce0a53f54f186007ff40b15d1460"
}
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