
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
relative-package
Advanced tools

Find the package.json (or another) relative to a given path
Install the module with: npm install relative-package
var relativePackage = require('relative-package');
console.log('package.json relative to where relativePackage() is called:\n %s',
relativePackage())
console.log('package.json relative a given path:\n %s',
relativePackage('./test/relative-package.test.js'))
console.log('package.json relative to a given absolute path:\n %s',
relativePackage(__dirname + '/readme.md'))
console.log('package.json relative to a given package:\n %s',
relativePackage('mocha'))
console.log('package.json relative to a given package:\n %s',
relativePackage('mocha'))
var relativePackage = require('relative-package');
console.log('.gitignore relative to where relativePackage() is called:\n %s',
relativePackage(null, '.gitignore'))
console.log('Readme.md of a given package:\n %s',
relativePackage('mocha', 'Readme.md'))
(see demo.js)
FAQs
Find package.json (or another) relative to a given file
We found that relative-package 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.