tahamajs's picture
download
raw
1.21 kB
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.format = format;
var _config = _interopRequireDefault(require("../config.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function formatField(field, value, dict) {
return dict.listItem.join(`${field} = {${value}},`);
}
function formatEntry(entry, dict) {
const fields = [];
for (const field in entry.properties) {
fields.push(formatField(field, entry.properties[field], dict));
if (entry.annotations && entry.annotations[field]) {
for (const annotation in entry.annotations[field]) {
let annotationField = field + _config.default.biber.annotationMarker;
if (annotation !== 'default') {
annotationField += _config.default.biber.namedAnnotationMarker + annotation;
}
fields.push(formatField(annotationField, entry.annotations[field][annotation], dict));
}
}
}
return dict.entry.join(`@${entry.type}{${entry.label},${dict.list.join(fields.join(''))}}`);
}
function format(src, dict) {
const entries = src.map(entry => formatEntry(entry, dict)).join('');
return dict.bibliographyContainer.join(entries);
}

Xet Storage Details

Size:
1.21 kB
·
Xet hash:
9b7ec893ed7237ffa073c64b5f8931f0336fd2e5971ed2350e843af47a695a53

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.