Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
redux-object
Advanced tools
Builds complex JS object from normalized redux store. Best works with json-api-normalizer
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 3 parameters: state part, object type and ID.
import build from 'redux-object';
/*
state:
{
data: {
post: {
"2620": {
attributes: {
"text": "hello",
"id": 2620
},
relationships: {
daQuestion: {
id: "295",
type: "question"
},
liker: {
id: "1,2,3",
type: "user"
},
comments: {}
}
}
},
question: {
"295": {
attributes: {
text: "hello?"
}
}
},
user: {
"1": {
attributes: {
id: 1,
name: "Alice"
}
},
"2": {
attributes: {
id: 2,
name: "Bob"
}
},
"3": {
attributes: {
id: 3,
text: "Jenny"
}
}
},
meta: {
'posts/me': {
data: {
post: '2620'
}
}
}
}
};
*/
const post = build(state.data, 'post', '2620');
console.log(post.id); // -> 2620
console.log(post.text); // -> hello
console.log(post.daQuestion); // -> { id: 295, text: "hello?" }
console.log(post.liker.length); //-> 3
console.log(post.liker[0]); // -> { id: 1, name: "Alice" }
Child objects are lazy loaded.
MIT (c) Yury Dymov
FAQs
Builds complex JS object from normalized redux store. Best works with json-api-normalizer
The npm package redux-object receives a total of 21,719 weekly downloads. As such, redux-object popularity was classified as popular.
We found that redux-object demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.