Skip to content
This repository was archived by the owner on Mar 20, 2022. It is now read-only.

Add denormalization #214

Merged
merged 5 commits into from
Jan 11, 2017
Merged

Add denormalization #214

merged 5 commits into from
Jan 11, 2017

Conversation

paularmstrong
Copy link
Owner

@paularmstrong paularmstrong commented Jan 10, 2017

Problem

The people have spoken. They want denormalization. Normalizr doesn't include a reverse of normalization internally. External packages require you to add more dependencies and increase your application bloat.

Solution

I wanted a solution that was open enough for everyone. Therefore, I didn't want to just assume any data structure. So, denormalize will expect two separate arguments for what was the result and entities from normalization: denormalize(result, schema, entities).

This looks to be the simplest, fastest, and smallest approach to denormalization, to me.

TODO

  • Add & update tests (100% test coverage)
  • Ensure CI is passing (lint, tests, flow)
  • Update relevant documentation

Size Diff

Before

  Package:      dist/index.js
  Bundle Size:  13.63 KB
  Compressed:   3.12 KB

  Package:      dist/index.min.js
  Bundle Size:  6.94 KB
  Compressed:   2.12 KB

After

  Package:      dist/index.js
  Bundle Size:  16.68 KB
  Compressed:   3.52 KB

  Package:      dist/index.min.js
  Bundle Size:  8.45 KB
  Compressed:   2.39 KB

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.4%) to 98.561% when pulling 99a9e9d on denormalize into b51f9ee on master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 34e0418 on denormalize into b51f9ee on master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 2a94c91 on denormalize into b51f9ee on master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 5fc61d0 on denormalize into 058d5df on master.

@paularmstrong paularmstrong merged commit 5fc61d0 into master Jan 11, 2017
@paularmstrong paularmstrong deleted the denormalize branch January 11, 2017 16:11
@lock
Copy link

lock bot commented May 7, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the Outdated label May 7, 2018
@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants