Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@poppinss/inspect

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@poppinss/inspect

Stringify Javascript values to a string or pretty print HTML

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

object-inspect

Fork of object-inspect to add support for newlines, indentation and slight modifications to the output.

Convert Javascript datatypes to their string representation. Handles every in-built data type including.

  • Objects
  • Arrays
  • BigInt
  • Symbols
  • Map/WeakMap
  • Set/WeakSet
  • Date
  • RegExp
  • Object literals
  • Classes
  • String
  • Boolean
  • Number
  • Null
  • Undefined
  • Error
  • Buffer

This module will be re-written from scratch soon. So please, do not send any PR's for improvements. However, feel free to report issues and they will be picked up during re-write.

Installation

Install the package from npm registry as follows

npm install @poppinss/object-inspect

Usage

const { inspect } = require('@poppinss/inspect')
inspect({ foo: 'bar', bar: 'baz' })

Pretty print to HTML

const { stringify } = require('@poppinss/inspect')
stringify.html({ foo: 'bar', bar: 'baz' })

Credits

To the original object-inspect package. 90% of the code is still the same, we have just made opinionated changes to suit it better to our needs.

I didn't created a PR for the original package, since the modifications are very specific to serve our use case.

License

MIT

Keywords

FAQs

Package last updated on 02 May 2020

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc