UNPKG

superflected

Version:

A port of ActiveSupport's inflector to Node.js

9 lines (8 loc) 344 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.constantify = void 0; const cacheable_1 = require("./cacheable"); const underscore_1 = require("./underscore"); exports.constantify = (0, cacheable_1.cacheable)((word) => { return (0, underscore_1.underscore)(word).toUpperCase().replace(/\s+/g, "_"); });