Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Dump an object and kill the process in node.js for quick debugging. Based on Laravel's dd()
function.
npm install dump-die
Calling dd
will print the object in your terminal and kill the process.
const dd = require('dump-die')
let myObject = {
foo: 'bar',
baz: function() {
return 'Hi'
}
}
Outputs:
{ foo: 'bar',
baz:
{ [Function]
[length]: 0,
[name]: '',
[prototype]: { [constructor]: [Circular] } } }
You can dump any amount of objects.
let foo = 'bar', hodor = { hodor: 'hodor' }
dd(foo, baz, hodor)
Outputs:
'bar'
{ hodor: 'hodor' }
If you don't want to kill the process, you can require the inspect function (which is a simple wrapper around node.js' util.inspect
)
const inspect = require('dump-die/lib/inspect')
inspect({ foo: 'bar' }) // => '{ foo: \u001b[32m\'bar\'\u001b[39m }'
You can run the tests (ESLint & Mocha) with:
npm run test
Please see CONTRIBUTING for details.
If you discover any security related issues, please email freek@spatie.be instead of using the issue tracker.
Spatie is a webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.
The MIT License (MIT). Please see License File for more information.
FAQs
Dump an object and kill the process in node.js
We found that dump-die 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.