tahamajs's picture
download
raw
1.43 kB
import { plugins } from '@citation-js/core';
import config from './config.json';
import { parse, parseNew, parseOld, parseMixed, format } from './ris.js';
const oldProps = ['A1', 'AV', 'BT', 'CP', 'ED', 'EP', 'ID', 'J1', 'JA', 'JF', 'JO', 'L2', 'L3', 'N2', 'T1', 'U1', 'U2', 'U3', 'U4', 'U5', 'U6', 'Y1'];
const newProps = ['A4', 'AD', 'AN', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'CA', 'CN', 'DA', 'DB', 'DO', 'DP', 'ET', 'LA', 'LB', 'NV', 'OP', 'PY', 'RI', 'RN', 'SE', 'ST', 'SV', 'TA', 'TT'];
plugins.add('@ris', {
input: {
'@ris/file': {
parse,
parseType: {
dataType: 'String',
predicate: /^TY {2}- /m
}
},
'@ris/record': {
parse: parseMixed,
parseType: {
dataType: 'SimpleObject',
propertyConstraint: {
props: ['TY']
}
}
},
'@ris/new+record': {
parse: parseNew,
parseType: {
extends: '@ris/record',
propertyConstraint: [{
props: newProps,
match: 'some'
}, {
props: oldProps,
match: 'none'
}]
}
},
'@ris/old+record': {
parse: parseOld,
parseType: {
extends: '@ris/record',
propertyConstraint: [{
props: oldProps,
match: 'some'
}, {
props: newProps,
match: 'none'
}]
}
}
},
config,
output: {
ris: format
}
});

Xet Storage Details

Size:
1.43 kB
·
Xet hash:
9636aec90d8bf6faa7c8b590b0949e1d60417264efa41c0563d8ddc24cc4727a

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