
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
relative-path-map
Advanced tools
Resolves a map of paths where some paths are relative to others in the same object. Useful for describing directory structures and for project configuration.
Install via npm:
npm install --save-dev relative-path-map
var relativePathMap = require('relative-path-map');
relativePathMap({
root: 'root/path',
sub: '[root]/sub' // => 'root/path/sub'
});
relativePathMap({
root: 'root/path',
obj: {
sub: '[root]/sub', // => 'root/path/sub'
file: '[sub]/file.js' // => 'root/path/sub/file.js'
}
});
relativePathMap({
root: 'root/path',
arr: [
'[root]/sub', // => 'root/path/sub'
'[0]/file.js' // => 'root/path/sub/file.js'
]
});
relativePathMap({
obj: {
sub: 'some/path',
},
dot: '[obj.sub]/dot-notation.js' // => // 'some/path/dot-notation.js'
});
relativePathMap(map)objectAn object containing strings representing paths. Paths beginning with a
placeholder [<prop>] are relative to some other path in the same object, where
<prop> is a property name, e.g. [root], or a sub-property name, e.g
[root.src].
Type: object
Returns an object whose relative paths have been resolved.
Copyright © 2016 Akim McMath. Licensed under the MIT License.
FAQs
Configure a map of paths that may refer to each other
The npm package relative-path-map receives a total of 14 weekly downloads. As such, relative-path-map popularity was classified as not popular.
We found that relative-path-map 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.