Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

citation-js-utils

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

citation-js-utils - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

1

dist/index.d.ts

@@ -56,2 +56,3 @@ export type CitationJson = {

suffix?: string;
partial?: 'author' | 'year';
};

@@ -58,0 +59,0 @@ export type CitationRenderer = Record<string, {

10

dist/index.js

@@ -13,3 +13,3 @@ import Cite from 'citation-js';

const cleanHtml = sanitizer.cleanCitationHtml(citation).trim();
return cleanHtml.replace(/^1\./g, '').trim();
return cleanHtml.replace(/^1\./g, '').replace(/&amp;/g, '&').trim();
}

@@ -49,3 +49,9 @@ // eslint-disable-next-line @typescript-eslint/no-unused-vars

const suffix = (opts === null || opts === void 0 ? void 0 : opts.suffix) ? `, ${opts.suffix}` : '';
const yearPart = kind === InlineCite.t ? ` (${year}${suffix})` : `, ${year}${suffix}`;
let yearPart = kind === InlineCite.t ? ` (${year}${suffix})` : `, ${year}${suffix}`;
if ((opts === null || opts === void 0 ? void 0 : opts.partial) === 'author')
yearPart = '';
if ((opts === null || opts === void 0 ? void 0 : opts.partial) === 'year') {
const onlyYear = kind === InlineCite.t ? `(${year}${suffix})` : `${year}${suffix}`;
return [{ type: 'text', value: onlyYear }];
}
if (!authors || authors.length === 0) {

@@ -52,0 +58,0 @@ const text = data.publisher || data.title;

{
"name": "citation-js-utils",
"version": "1.0.1",
"version": "1.0.2",
"description": "Utilities for citation-js.",

@@ -5,0 +5,0 @@ "type": "module",

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