|
1 | 1 | # normalizr [](https://travis-ci.org/paularmstrong/normalizr) [](https://coveralls.io/github/paularmstrong/normalizr?branch=master) [](https://www.npmjs.com/package/normalizr) [](https://www.npmjs.com/package/normalizr)
|
2 | 2 |
|
3 |
| -# [📣 🤝 Maintainer help wanted ](https://github.com/paularmstrong/normalizr/discussions/493) |
| 3 | +# 📣 Normalizr is no longer maintained |
4 | 4 |
|
5 |
| -## Install |
| 5 | +Due to lack of ability to find an invested maintainer and inability to find time to do routine maintenance and community building, this package is no longer maintained. Please see the discussion [🤝 Maintainer help wanted](https://github.com/paularmstrong/normalizr/discussions/493) for more information. |
6 | 6 |
|
7 |
| -Install from the NPM repository using yarn or npm: |
| 7 | +## FAQs |
8 | 8 |
|
9 |
| -```shell |
10 |
| -yarn add normalizr |
11 |
| -``` |
| 9 | +### Should I still use Normalizr? |
12 | 10 |
|
13 |
| -```shell |
14 |
| -npm install normalizr |
15 |
| -``` |
| 11 | +If you need it, yes. Normalizr is and has been at a stable release for a very long time, used by thousands of others without issue. |
16 | 12 |
|
17 |
| -## Motivation |
| 13 | +### What should I do if I want other features or found a bug? |
18 | 14 |
|
19 |
| -Many APIs, public or not, return JSON data that has deeply nested objects. Using data in this kind of structure is often very difficult for JavaScript applications, especially those using [Flux](http://facebook.github.io/flux/) or [Redux](http://redux.js.org/). |
| 15 | +Fork [Normalizr on Github](https://github.com/paularmstrong/normalizr) and maintain a version yourself. |
20 | 16 |
|
21 |
| -## Solution |
| 17 | +### Can I contribute back to Normalizr? |
22 | 18 |
|
23 |
| -Normalizr is a small, but powerful utility for taking JSON with a schema definition and returning nested entities with their IDs, gathered in dictionaries. |
24 |
| - |
25 |
| -## Documentation |
26 |
| - |
27 |
| -* [Introduction](/docs/introduction.md) |
28 |
| - * [Build Files](/docs/introduction.md#build-files) |
29 |
| -* [Quick Start](/docs/quickstart.md) |
30 |
| -* [API](/docs/api.md) |
31 |
| - * [normalize](/docs/api.md#normalizedata-schema) |
32 |
| - * [denormalize](/docs/api.md#denormalizeinput-schema-entities) |
33 |
| - * [schema](/docs/api.md#schema) |
34 |
| -* [Using with JSONAPI](/docs/jsonapi.md) |
35 |
| - |
36 |
| -## Examples |
37 |
| - |
38 |
| -* [Normalizing GitHub Issues](/examples/github) |
39 |
| -* [Relational Data](/examples/relationships) |
40 |
| -* [Interactive Redux](/examples/redux) |
41 |
| - |
42 |
| -## Quick Start |
43 |
| - |
44 |
| -Consider a typical blog post. The API response for a single post might look something like this: |
45 |
| - |
46 |
| -```json |
47 |
| -{ |
48 |
| - "id": "123", |
49 |
| - "author": { |
50 |
| - "id": "1", |
51 |
| - "name": "Paul" |
52 |
| - }, |
53 |
| - "title": "My awesome blog post", |
54 |
| - "comments": [ |
55 |
| - { |
56 |
| - "id": "324", |
57 |
| - "commenter": { |
58 |
| - "id": "2", |
59 |
| - "name": "Nicole" |
60 |
| - } |
61 |
| - } |
62 |
| - ] |
63 |
| -} |
64 |
| -``` |
65 |
| - |
66 |
| -We have two nested entity types within our `article`: `users` and `comments`. Using various `schema`, we can normalize all three entity types down: |
67 |
| - |
68 |
| -```js |
69 |
| -import { normalize, schema } from 'normalizr'; |
70 |
| - |
71 |
| -// Define a users schema |
72 |
| -const user = new schema.Entity('users'); |
73 |
| - |
74 |
| -// Define your comments schema |
75 |
| -const comment = new schema.Entity('comments', { |
76 |
| - commenter: user |
77 |
| -}); |
78 |
| - |
79 |
| -// Define your article |
80 |
| -const article = new schema.Entity('articles', { |
81 |
| - author: user, |
82 |
| - comments: [comment] |
83 |
| -}); |
84 |
| - |
85 |
| -const normalizedData = normalize(originalData, article); |
86 |
| -``` |
87 |
| - |
88 |
| -Now, `normalizedData` will be: |
89 |
| - |
90 |
| -```js |
91 |
| -{ |
92 |
| - result: "123", |
93 |
| - entities: { |
94 |
| - "articles": { |
95 |
| - "123": { |
96 |
| - id: "123", |
97 |
| - author: "1", |
98 |
| - title: "My awesome blog post", |
99 |
| - comments: [ "324" ] |
100 |
| - } |
101 |
| - }, |
102 |
| - "users": { |
103 |
| - "1": { "id": "1", "name": "Paul" }, |
104 |
| - "2": { "id": "2", "name": "Nicole" } |
105 |
| - }, |
106 |
| - "comments": { |
107 |
| - "324": { id: "324", "commenter": "2" } |
108 |
| - } |
109 |
| - } |
110 |
| -} |
111 |
| -``` |
112 |
| - |
113 |
| -## Dependencies |
114 |
| - |
115 |
| -None. |
116 |
| - |
117 |
| -## Credits |
118 |
| - |
119 |
| -Normalizr was originally created by [Dan Abramov](http://github.com/gaearon) and inspired by a conversation with [Jing Chen](https://twitter.com/jingc). Since v3, it was completely rewritten and maintained by [Paul Armstrong](https://twitter.com/paularmstrong). It has also received much help, enthusiasm, and contributions from [community members](https://github.com/paularmstrong/normalizr/graphs/contributors). |
| 19 | +There are no current plans to resurrect this origin of Normalizr. If a forked version becomes sufficiently maintained and popular, please reach out about merging the fork and changing maintainers. |
0 commit comments