@ 引用- js/ plugin- enw
Thie 插件添加支持 .enw 文件。 。 。 .
安装
npm install @citation-js/plugin-enw
使用
安装插件 require- 说:
require('@citation-js/plugin-enw')
格式
投入
@enw/file
文本文件 .enw 格式.
const data = Cite(`%0 Journal Article
%A Willighagen, Lars G.
%E Peroni, Silvio
%P e214
%V 5
%J PeerJ Computer Science
%T Citation.js: a format-independent, modular bibliography tool for the browser and command line
%8 2019-08-12
%R 10.7717/peerj-cs.214
%@ 2376-5992
%U https://peerj.com/articles/cs-214/
`)
data.format('data', { format: 'object' }) // returns:
{
author: [{ family: 'Willighagen', given: 'Lars G.' }],
editor: [{ family: 'Peroni', given: 'Silvio' }],
page: 'e214',
volume: '5',
'container-title': 'PeerJ Computer Science',
title: 'Citation.js: a format-independent, modular bibliography tool for the browser and command line',
issued: { 'date-parts': [[2019, 8, 12]] },
type: 'article-journal',
DOI: '10.7717/peerj-cs.214',
ISSN: '2376-5992',
URL: 'https://peerj.com/articles/cs-214/
}
产出
enw
data.format('enw', { format: 'text', lineEnding: '\n' })
选项 :
format(字符串):'text'(默认; 对于纯文本文件) 或'object'(用于一系列对象)lineEnding(字符串):例如:.'\n'(违约)或'\r\n'(可能没有提及后者的说明)