@gmod/bed
Version:
A BED file format parser with autoSql support
25 lines • 671 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.detectTypes = detectTypes;
const numericTypes = new Set([
'uint',
'int',
'short',
'ushort',
'byte',
'ubyte',
'float',
'double',
]);
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