
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
object-property-editor
Advanced tools
This JavaScript library tries to simplify the fact of reading/writing to a nested object property using a path contained in a string. It's created with the purpose of been used on polymorphic interfaces or web-components with dynamic mappings.
Under the hood the library process the path once and creates a function chain for reading and another for writing. This way operations are way faster than if they have to reprocess the path.
The implementation way has also other advantages like avoiding problems with references, the editor will always point to the correct object and will recreate its path on write, there is no problem if you modify it externally without using the PropertyEditor instance.
Reading from an object property in a nested array:
const model = { test: { nested: [{ property: 16 }, { property: 1 }, { property: 1992 }] } };
const propertyEditor = getPropertyEditor<number>(model, "test.nested[1].property");
propertyEditor.read() === model.test.nested[1].property; // This evaluates to true
Writing to an object property in a nested array:
const model = {} as any;
const value = 1;
const propertyEditor = getPropertyEditor<number>(model, "test.nested[1].property");
propertyEditor.write(value);
model.test.nested[1].property === value; // This will also be true
FAQs
Write/read nested object properties.
The npm package object-property-editor receives a total of 1 weekly downloads. As such, object-property-editor popularity was classified as not popular.
We found that object-property-editor 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
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.