site/node_modules/@citation-js/plugin-csl/lib-mjs/styles.js

12 lines
335 B
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
import { util } from '@citation-js/core';
import defaultTemplates from './styles.json';
const templates = new util.Register(defaultTemplates);
const fetchStyle = style => {
if (templates.has(style)) {
return templates.get(style);
} else {
return templates.get('apa');
}
};
export default fetchStyle;
export { templates };