Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
115K
decreased by-17.53%
Maintainers
1
Weekly downloads
 
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

LICENSE

Licensed under the MIT license.

Keywords

FAQs

Package last updated on 12 Jun 2018

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