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.1.0 to 21.2.0

9

build/collections.js

@@ -21,3 +21,2 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.

printIteratorEntries = printIteratorEntries;exports.

@@ -160,5 +159,4 @@

*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*

@@ -181,3 +179,4 @@ *

// without surrounding punctuation (for example, braces)
function printObjectProperties(val, config, indentation, depth, refs, printer) {let result = '';let keys = Object.keys(val).sort();const symbols = getSymbols(val);if (symbols.length) {keys = keys.filter(key => !isSymbol(key)).concat(symbols);}if (keys.length) {result += config.spacingOuter;const indentationNext = indentation + config.indent;for (let i = 0; i < keys.length; i++) {const key = keys[i];const name = printer(key, config, indentationNext, depth, refs);
function printObjectProperties(val, config, indentation, depth, refs, printer) {let result = '';let keys = Object.keys(val).sort();const symbols = getSymbols(val);if (symbols.length) {keys = keys.filter(key => !isSymbol(key)).concat(symbols);}if (keys.length) {result += config.spacingOuter;const indentationNext = indentation + config.indent;for (let i = 0; i < keys.length; i++) {const key = keys[i];
const name = printer(key, config, indentationNext, depth, refs);
const value = printer(val[key], config, indentationNext, depth, refs);

@@ -184,0 +183,0 @@

@@ -22,3 +22,2 @@ 'use strict';

var _ansiStyles = require('ansi-styles');var _ansiStyles2 = _interopRequireDefault(_ansiStyles);

@@ -43,8 +42,8 @@

*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/const toISOString = Date.prototype.toISOString;const errorToString = Error.prototype.toString;const regExpToString = RegExp.prototype.toString;const symbolToString = Symbol.prototype.toString;const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;const NEWLINE_REGEXP = /\n/gi;
function isToStringedArrayType(toStringed) {

@@ -51,0 +50,0 @@ return (

@@ -12,12 +12,11 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.test = exports.serialize = undefined;

var _collections = require('../collections'); /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/const asymmetricMatcher = Symbol.for('jest.asymmetricMatcher');const SPACE = ' ';const serialize = exports.serialize = (val, config, indentation,
*/const asymmetricMatcher = Symbol.for('jest.asymmetricMatcher');const SPACE = ' ';const serialize = exports.serialize = (val, config,
indentation,
depth,

@@ -24,0 +23,0 @@ refs,

@@ -12,3 +12,2 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.serialize = exports.test = undefined;

var _ansiRegex = require('ansi-regex');var _ansiRegex2 = _interopRequireDefault(_ansiRegex);

@@ -52,8 +51,8 @@ var _ansiStyles = require('ansi-styles');var _ansiStyles2 = _interopRequireDefault(_ansiStyles);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}

*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/const test = exports.test = val => typeof val === 'string' && val.match((0, _ansiRegex2.default)());const serialize = exports.serialize = (val, config, indentation,
*/const test = exports.test = val => typeof val === 'string' && val.match((0, _ansiRegex2.default)());const serialize = exports.serialize = (val, config,
indentation,
depth,

@@ -60,0 +59,0 @@ refs,

@@ -12,9 +12,7 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.serialize = exports.test = undefined;

var _markup = require('./lib/markup'); /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*

@@ -43,2 +41,3 @@ *

const ELEMENT_NODE = 1;

@@ -45,0 +44,0 @@ const TEXT_NODE = 3;

@@ -11,3 +11,2 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.test = exports.serialize = undefined;

var _collections = require('../collections');

@@ -19,5 +18,4 @@

*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*

@@ -27,2 +25,3 @@ *

const IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';const IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';const IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';
const getImmutableName = name => 'Immutable.' + name;

@@ -29,0 +28,0 @@ const printAsLeaf = name => '[' + name + ']';

@@ -10,11 +10,9 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.default =

escapeHTML; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/function escapeHTML(str) {return str.replace(/</g, '&lt;').replace(/>/g, '&gt;');}

@@ -12,3 +12,2 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.printElementAsLeaf = exports.printElement = exports.printComment = exports.printText = exports.printChildren = exports.printProps = undefined;

var _escape_html = require('./escape_html');var _escape_html2 = _interopRequireDefault(_escape_html);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}

@@ -20,8 +19,8 @@

*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/const printProps = exports.printProps = (keys, props, config, indentation, depth, refs, printer) => {
*/const printProps = exports.printProps = (keys, props, config, indentation, depth, refs, printer) =>
{
const indentationNext = indentation + config.indent;

@@ -28,0 +27,0 @@ const colors = config.colors;

@@ -12,12 +12,11 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.test = exports.serialize = undefined;

var _markup = require('./lib/markup'); /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/const elementSymbol = Symbol.for('react.element');
// Given element.props.children, or subtree during recursive traversal,

@@ -24,0 +23,0 @@ // return flattened array of children.

@@ -18,12 +18,11 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.test = exports.serialize = undefined;

var _markup = require('./lib/markup'); /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/const testSymbol = Symbol.for('react.test.json');
const serialize = exports.serialize = (

@@ -30,0 +29,0 @@ object,

{
"name": "pretty-format",
"version": "21.1.0",
"version": "21.2.0",
"repository": {

@@ -8,3 +8,3 @@ "type": "git",

},
"license": "BSD-3-Clause",
"license": "MIT",
"description": "Stringify any JavaScript value.",

@@ -11,0 +11,0 @@ "main": "build/index.js",

/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

@@ -8,0 +7,0 @@

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