UNPKG

superflected

Version:

A port of ActiveSupport's inflector to Node.js

8 lines (7 loc) 390 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.classify = void 0; const cacheable_1 = require("./cacheable"); const camelize_1 = require("./camelize"); const singularize_1 = require("./singularize"); exports.classify = (0, cacheable_1.cacheable)((tableName) => (0, camelize_1.camelize)((0, singularize_1.singularize)(tableName.replace(/.*\./g, ""))));