Socket
Socket
Sign inDemoInstall

string-kit

Package Overview
Dependencies
Maintainers
1
Versions
221
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string-kit - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

27

documentation.md

@@ -151,2 +151,29 @@

<a name="ref.inspect"></a>
### .inspect( [options] , variable )
* options `Object` display options, the following key are possible:
* style `String` this is the style to use, the value can be:
* 'none': (default) normal output suitable for console.log() or writing into a file
* 'color': colorful output suitable for terminal
* 'html': html output
* depth: depth limit, default: 3
* nofunc: do not display functions
* funcDetails: display function's details
* proto: display object's prototype
* variable `mixed` anything we want to inspect/debug
It inspect a variable, and return a string ready to be displayed with console.log(), or even as HTML output.
It produces a slightly better output than node's `util.inspect()`, with more options to control what should be displayed.
Since `options` come first, it is possible to use `bind()` to create some custom variable inspector.
For example:
```js
var colorInspect = require( 'string-kit' ).inspect.bind( undefined , { style: 'color' } ) ;
```
## Escape functions collection

@@ -153,0 +180,0 @@

2

package.json
{
"name": "string-kit",
"version": "0.0.9",
"version": "0.0.10",
"description": "A string manipulation toolbox, featuring a string formater (inspired by printf), a variable inspector (output featuring ANSI color and HTML) and various escape function (shell argument, regexp, html, etc).",

@@ -5,0 +5,0 @@ "main": "lib/string.js",

@@ -151,2 +151,29 @@

<a name="ref.inspect"></a>
### .inspect( [options] , variable )
* options `Object` display options, the following key are possible:
* style `String` this is the style to use, the value can be:
* 'none': (default) normal output suitable for console.log() or writing into a file
* 'color': colorful output suitable for terminal
* 'html': html output
* depth: depth limit, default: 3
* nofunc: do not display functions
* funcDetails: display function's details
* proto: display object's prototype
* variable `mixed` anything we want to inspect/debug
It inspect a variable, and return a string ready to be displayed with console.log(), or even as HTML output.
It produces a slightly better output than node's `util.inspect()`, with more options to control what should be displayed.
Since `options` come first, it is possible to use `bind()` to create some custom variable inspector.
For example:
```js
var colorInspect = require( 'string-kit' ).inspect.bind( undefined , { style: 'color' } ) ;
```
## Escape functions collection

@@ -153,0 +180,0 @@

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