Gathering detailed insights and metrics for redux-object
Gathering detailed insights and metrics for redux-object
Gathering detailed insights and metrics for redux-object
Gathering detailed insights and metrics for redux-object
@redux-saga/deferred
Helper for creating "exposed" promise object (with resolve & reject methods).
object-path-immutable
Modify deep object properties without modifying the original object (immutability). Works great with React and Redux.
objective-redux
A powerful Redux wrapper for easy state development and management.
rememo
Memoized selectors for Redux and other immutable object derivation
Builds complex JS object from normalized redux store. Best works with json-api-normalizer
npm install redux-object
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
138 Stars
120 Commits
19 Forks
6 Watchers
7 Branches
11 Contributors
Updated on Sep 28, 2023
Latest Version
1.0.1
Package Id
redux-object@1.0.1
Unpacked Size
34.71 kB
Size
8.54 kB
File Count
8
NPM Version
6.14.5
Node Version
12.18.2
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Builds complex JS object from normalized redux store. Best works with json-api-normalizer.
DEMO - https://yury-dymov.github.io/json-api-react-redux-example/
Demo sources and description - https://github.com/yury-dymov/json-api-react-redux-example
Library provides build
function, which takes 4 parameters: redux state part, object type, ID or an array of IDs or null, and options.
If ID is provided in a form of array, multiple objects are fetched. If ID is null, all objects of selected type are fetched.
Option | Default | Description |
---|---|---|
eager | false | Controls lazy loading for the child relationship objects. By default, lazy loading is enabled. |
ignoreLinks | false | redux-object doesn't support remote objects. This option suppresses the exception thrown in case user accesses a property, which is not loaded to redux store yet. |
includeType | false | Include the record type as a property 'type' on each result. This is particularly useful for identifying the record type returned by a polymorphic relationship. |
1import build from 'redux-object'; 2 3/* 4state: 5{ 6 data: { 7 post: { 8 "2620": { 9 attributes: { 10 "text": "hello", 11 "id": 2620 12 }, 13 relationships: { 14 daQuestion: { 15 id: "295", 16 type: "question" 17 }, 18 liker: [{ 19 id: "1", 20 type: "user" 21 }, { 22 id: "2", 23 type: "user", 24 }, { 25 id: "3", 26 type: "user" 27 } 28 ], 29 comments: [] 30 } 31 } 32 }, 33 question: { 34 "295": { 35 attributes: { 36 text: "hello?" 37 } 38 } 39 }, 40 user: { 41 "1": { 42 attributes: { 43 id: 1, 44 name: "Alice" 45 } 46 }, 47 "2": { 48 attributes: { 49 id: 2, 50 name: "Bob" 51 } 52 }, 53 "3": { 54 attributes: { 55 id: 3, 56 text: "Jenny" 57 } 58 } 59 }, 60 meta: { 61 'posts/me': { 62 data: { 63 post: '2620' 64 } 65 } 66 } 67 } 68}; 69*/ 70 71const post = build(state.data, 'post', '2620'); 72 73console.log(post.id); // -> 2620 74console.log(post.text); // -> hello 75console.log(post.daQuestion); // -> { id: 295, text: "hello?" } 76console.log(post.liker.length); //-> 3 77console.log(post.liker[0]); // -> { id: 1, name: "Alice" } 78 79// Other examples 80 81const post = build(state.data, 'post', '2620', { eager: true }); 82const post = build(state.data, 'post', '2620', { eager: false, ignoreLinks: true });
Child objects are lazy loaded unless eager option is explicitly provided.
MIT (c) Yury Dymov
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 4/14 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
23 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More