You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

power-assert-renderer-comparison

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

power-assert-renderer-comparison

comparison renderer for power-assert context

1.1.1
Source
npmnpm
Version published
Maintainers
1
Created
Source

power-assert

Build Status NPM version License

Produces comparison of expected and actual values of BinaryExpression.

  assert(a.name === 'bar')
  --- [string] 'bar'
  +++ [string] a.name
  @@ -1,3 +1,3 @@
  -bar

USAGE

var ComparisonRenderer = require('power-assert-renderer-comparison');

options.stringify

typedefault value
functionstringifier module

Function to stringify any target value.

options.maxDepth

typedefault value
number2

Depth of object traversal. If object depth is greater than maxDepth, compound object (IOW, Array or object) will be pruned with # like ["foo",#Array#,#Object#].

options.lineSeparator

typedefault value
string"\n"

Line separator in power assert output.

options.anonymous

typedefault value
string"Object"

Type name to show when target object is created by anonymous constructor.

options.circular

typedefault value
string"#@Circular#"

Name to show when target object is detected as circular structure.

options.diff

typedefault value
functionudiff.js

Function to create diff string between two strings.

options.lineDiffThreshold

typedefault value
number5

Threshold to show diff at character level or line level. If number of lines in target string is greater than lineDiffThreshold, then line diff mode will be used to show diff output.

INSTALL

$ npm install --save-dev power-assert-renderer-comparison

AUTHOR

  • Takuto Wada

LICENSE

Licensed under the MIT license.

Keywords

power-assert

FAQs

Package last updated on 10 Nov 2016

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