citation-js-utils
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -15,3 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getCitations = exports.InlineCite = exports.CitationJSStyles = exports.createSanitizer = void 0; | ||
exports.getCitations = exports.getInlineCitation = exports.InlineCite = exports.CitationJSStyles = exports.createSanitizer = void 0; | ||
const citation_js_1 = __importDefault(require("citation-js")); | ||
@@ -79,2 +79,3 @@ const dompurify_1 = __importDefault(require("dompurify")); | ||
} | ||
exports.getInlineCitation = getInlineCitation; | ||
function getCitations(bibtex) { | ||
@@ -89,4 +90,4 @@ return __awaiter(this, void 0, void 0, function* () { | ||
{ | ||
inline() { | ||
return getInlineCitation(c, InlineCite.p); | ||
inline(kind = InlineCite.p) { | ||
return getInlineCitation(c, kind); | ||
}, | ||
@@ -93,0 +94,0 @@ render() { |
@@ -49,3 +49,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
}; | ||
function getInlineCitation(c, kind) { | ||
export function getInlineCitation(c, kind) { | ||
var _a, _b, _c; | ||
@@ -81,4 +81,4 @@ const cite = new Cite(); | ||
{ | ||
inline() { | ||
return getInlineCitation(c, InlineCite.p); | ||
inline(kind = InlineCite.p) { | ||
return getInlineCitation(c, kind); | ||
}, | ||
@@ -85,0 +85,0 @@ render() { |
@@ -0,1 +1,2 @@ | ||
import Cite from 'citation-js'; | ||
export declare type InlineNode = { | ||
@@ -17,2 +18,6 @@ type: string; | ||
} | ||
export declare function getInlineCitation(c: Cite, kind: InlineCite): { | ||
type: string; | ||
value: string; | ||
}[] | undefined; | ||
export declare type CitationRenderer = Record<string, { | ||
@@ -19,0 +24,0 @@ render: () => string; |
{ | ||
"name": "citation-js-utils", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Utilities for citation-js.", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
@@ -50,3 +50,3 @@ import Cite, { CitationFormatOptions } from 'citation-js'; | ||
function getInlineCitation(c: Cite, kind: InlineCite) { | ||
export function getInlineCitation(c: Cite, kind: InlineCite) { | ||
const cite = new Cite(); | ||
@@ -88,4 +88,4 @@ const authors = cite.set(c).data[0].author; | ||
{ | ||
inline() { | ||
return getInlineCitation(c, InlineCite.p); | ||
inline(kind = InlineCite.p) { | ||
return getInlineCitation(c, kind); | ||
}, | ||
@@ -92,0 +92,0 @@ render() { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20612
310