Socket
Book a DemoInstallSign in
Socket

@knighted/dump

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@knighted/dump

Wrapper around util.inspect to dump your nested objects to the console.

1.0.3
latest
Source
npmnpm
Version published
Weekly downloads
1
-92.86%
Maintainers
1
Weekly downloads
 
Created
Source

@knighted/dump

CI NPM version

Wrapper around Node's util.inpsect to dump your nested objects to the console.

Example

import { dump } from '@knighted/dump'

const nested = {
  knighted: {
    code: {
      monkey: {
        bananas: true
      }
    }
  }
}

dump({
  obj: nested,
  prefix: 'prefix',
  opts: { depth: 3, colors: true }
})

Output:

prefix {
  knighted: { code: { monkey: { bananas: true } } }
}

Or simply use dump.log if not passing opts.

dump.log(nested, 'prefix') // Same output as above

Options

dump.log(obj) uses until.inspect(obj, false, null, true).

Keywords

node

FAQs

Package last updated on 25 Jul 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.