Hacker News new | past | comments | ask | show | jobs | submit login

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-ob...

As a bonus, it's helpful for renaming, autocompleting, and finding usages.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: