
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
nested-obj
is a simple and lightweight JavaScript utility library for safely accessing and modifying nested properties in objects using string paths.
npm install nested-obj
Retrieve a nested property value from an object.
import objectPath from 'nested-obj';
const obj = {
user: {
name: 'John Doe',
address: {
street: '123 Main St',
city: 'Anytown'
}
}
};
const userName = objectPath.get(obj, 'user.name');
console.log(userName); // 'John Doe'
Set a value at a specific path in an object. If any part of the path does not exist, it will be created.
objectPath.set(obj, 'user.address.zip', '12345');
console.log(obj.user.address.zip); // '12345'
Check if a path exists within an object.
const hasCity = objectPath.has(obj, 'user.address.city');
console.log(hasCity); // true
To run tests, execute the following command:
npm test
or for continuous
npm test:watch
FAQs
manipulate deep objects safely and simply
The npm package nested-obj receives a total of 748 weekly downloads. As such, nested-obj popularity was classified as not popular.
We found that nested-obj 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 MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.