@gmod/bed
Version:
A BED file format parser with autoSql support
22 lines • 566 B
JavaScript
const numericTypes = new Set([
'uint',
'int',
'short',
'ushort',
'byte',
'ubyte',
'float',
'double',
]);
export function detectTypes(autoSql) {
return {
...autoSql,
fields: autoSql.fields.map(autoField => ({
...autoField,
isArray: !!autoField.size && autoField.type !== 'char',
arrayIsNumeric: !!autoField.size && numericTypes.has(autoField.type),
isNumeric: !autoField.size && numericTypes.has(autoField.type),
})),
};
}
//# sourceMappingURL=util.js.map