Socket
Socket
Sign inDemoInstall

power-assert-renderer-comparison

Package Overview
Dependencies
72
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    power-assert-renderer-comparison

comparison renderer for power-assert context


Version published
Weekly downloads
108K
decreased by-11.96%
Maintainers
1
Install size
2.40 MB
Created
Weekly downloads
 

Changelog

Source

1.2.0 (2018-06-12)

Features
Breaking Changes

Readme

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

Last updated on 12 Jun 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc