'use strict';

/*!
 * @techmely/utils
 * Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com>
 * MIT Licensed
 */


// src/cacheStringFunc.ts
function cacheStringFunction(fn) {
  const cache = /* @__PURE__ */ Object.create(null);
  return (str) => {
    const hit = cache[str];
    return hit || (cache[str] = fn(str));
  };
}

// src/snakeToCamel.ts
var snake2camel = cacheStringFunction((str) => {
  return str.replace(/_([a-z])/g, (g) => g[1].toUpperCase());
});

exports.snake2camel = snake2camel;
