paularmstrong/normalizr ? reverse-engineered prompt
Reverse engineered prompt
Build me a small JavaScript library that takes deeply nested JSON from an API and turns it into a flat, easy to use structure based on a schema I define.
I want to be able to describe entities like users, posts, and comments, then pass in nested data and get back normalized objects grouped by type, with repeated items shared by id instead of duplicated everywhere. It should feel simple to use in Redux style apps or anywhere I need cleaner data handling.
Please include a few realistic examples and basic tests, and make sure the library is usable from modern JavaScript and TypeScript. If you need to check current setup or docs style, look up anything missing online and follow the existing project conventions.
Are you gonna build this?
make sure you review the code using coderabbit