@adguard/agtree
Version:
Tool set for working with adblock filter lists
26 lines (23 loc) • 639 B
JavaScript
/*
* AGTree v3.4.3 (build date: Thu, 11 Dec 2025 13:43:19 GMT)
* (c) 2025 Adguard Software Ltd.
* Released under the MIT license
* https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
*/
import camelCaseKeys from 'camelcase-keys';
/**
* @file Zod camelCase utility.
*/
/**
* Transforms Zod schema to camelCase.
*
* @param zod Zod schema.
*
* @returns Zod schema with camelCase properties.
*
* @see {@link https://github.com/colinhacks/zod/issues/486#issuecomment-1501097361}
*/
const zodToCamelCase = (zod) => {
return zod.transform((val) => camelCaseKeys(val));
};
export { zodToCamelCase };