Socket
Socket
Sign inDemoInstall

pretty-format

Package Overview
Dependencies
Maintainers
5
Versions
237
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pretty-format - npm Package Compare versions

Comparing version 21.3.0-beta.4 to 21.3.0-beta.5

54

build/index.js

@@ -51,2 +51,10 @@ 'use strict';

class PrettyFormatPluginError extends Error {
constructor(message, stack) {
super(message);
this.stack = stack;
this.name = this.constructor.name;
}}
function isToStringedArrayType(toStringed) {

@@ -250,21 +258,27 @@ return (

{
const printed = plugin.serialize ?
plugin.serialize(val, config, indentation, depth, refs, printer) :
plugin.print(
val,
valChild => printer(valChild, config, indentation, depth, refs),
str => {
const indentationNext = indentation + config.indent;
return (
indentationNext +
str.replace(NEWLINE_REGEXP, '\n' + indentationNext));
let printed;
},
{
edgeSpacing: config.spacingOuter,
min: config.min,
spacing: config.spacingInner },
try {
printed = plugin.serialize ?
plugin.serialize(val, config, indentation, depth, refs, printer) :
plugin.print(
val,
valChild => printer(valChild, config, indentation, depth, refs),
str => {
const indentationNext = indentation + config.indent;
return (
indentationNext +
str.replace(NEWLINE_REGEXP, '\n' + indentationNext));
config.colors);
},
{
edgeSpacing: config.spacingOuter,
min: config.min,
spacing: config.spacingInner },
config.colors);
} catch (error) {
throw new PrettyFormatPluginError(error.message, error.stack);
}
if (typeof printed !== 'string') {

@@ -280,4 +294,8 @@ throw new Error(

for (let p = 0; p < plugins.length; p++) {
if (plugins[p].test(val)) {
return plugins[p];
try {
if (plugins[p].test(val)) {
return plugins[p];
}
} catch (error) {
throw new PrettyFormatPluginError(error.message, error.stack);
}

@@ -284,0 +302,0 @@ }

{
"name": "pretty-format",
"version": "21.3.0-beta.4",
"version": "21.3.0-beta.5",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

Sorry, the diff of this file is too big to display

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