3 ms·
For mangling, I made a proxy that creates meaningful names in dev, and sequential or pre-baked ones in production. For example, FileFields.js: const FF =
by efortis 4y ago
For mangling, I made a proxy that creates meaningful names in dev, and sequential or pre-baked ones in production.
For example, FileFields.js:
const FF = proxyFieldNames('FF', { foo: null, bar: null })
// DEV: FF.foo → FF_foo
// PROD: FF.foo → 'a'
https://github.com/uxtely/js-utils/tree/main/proxy-fields-obfuscator https://github.com/uxtely/js-utils/tree/main/proxy-fields-ob...
As a bonus, it's helpful for renaming, autocompleting, and finding usages.