UNPKG

@wbce-d9/schema

Version:

Utility for extracting information about existing DB schema

8 lines (7 loc) 197 B
/** * Extracts the type out of a given datatype * For example: `varchar(32)` => varchar */ export default function extractType(type) { return type.replace(/[^a-zA-Z]/g, '').toLowerCase(); }