UNPKG

superflected

Version:

A port of ActiveSupport's inflector to Node.js

6 lines (4 loc) 239 B
import { cacheable } from "./cacheable"; import { camelize } from "./camelize"; import { singularize } from "./singularize"; export const classify = cacheable((tableName: string) => camelize(singularize(tableName.replace(/.*\./g, ""))));