
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.
path-notation
Advanced tools
A dot-notation based path string which yields key literals, allows for the inclusion of the "."character in keys and square bracket notation in path strings, promotes readability of path strings and provides other useful utilities for reasoning and workin
A dot-notation based path string which yields key literals, allows for the inclusion of the "." character in keys and square bracket notation in path strings, promotes readability of path strings and provides other useful utilities for reasoning and working with objects paths.
import PathNotation from 'path-notation';
const path = new PathNotation('foo', 'bar', 2, '10','baz\\.qux');
console.log(`Path notation string: ${path}`);
// Path notation string: foo.bar[2].10[baz.qux]
console.log(`Number of keys in the path: ${path.length}`);
// Number of keys in the path: 5
console.log(`First key in the path: ${path.firstKey}`);
// First key in the path: foo
console.log(`Last key in the path: ${path.lastKey}`);
// Last key in the path: baz.qux
// Create a PathNotation instance from a path notation string.
const pathStr = new PathNotation('foo.bar[2].10[baz.qux]');
console.log('\nKeys')
for(const key of pathStr) {
console.log(` Key: ${key}; Type ${typeof key}`);
}
// Keys
// Key: foo; Type string
// Key: bar; Type string
// Key: 2; Type number
// Key: 10; Type string
// Key: baz.qux; Type string
Full docs.
FAQs
A dot-notation based path string which yields key literals, allows for the inclusion of the "."character in keys and square bracket notation in path strings, promotes readability of path strings and provides other useful utilities for reasoning and workin
The npm package path-notation receives a total of 4 weekly downloads. As such, path-notation popularity was classified as not popular.
We found that path-notation 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.