Socket
Socket
Sign inDemoInstall

tcompare

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tcompare - npm Package Compare versions

Comparing version 6.0.1-3 to 6.0.1-4

51

dist/cjs/format.d.ts
/// <reference types="node" resolution-mode="require"/>
import { Style, StyleType } from './styles.js';
/**
* The base class for all other comparators, and used
* directly by comparators for their "simplePrint" methods.
* It doesn't do comparison, just formatting.
* Options to control the formatting of objects.
*/
export interface FormatOptions {
/** set when formatting keys and values of collections */
parent?: Format;
/** sort items alphabetically by key */
sort?: boolean;
/** how to print this thing */
style?: StyleType;
/**
* optinally override {@link tcompare!styles.Style#bufferChunkSize }
* */
bufferChunkSize?: number;
/**
* Include any and all enumerable properties, including those inherited on
* the prototype chain. By default, only `own` properties are printed.
*/
includeEnumerable?: boolean;
/**
* Include getter properties
*/
includeGetters?: boolean;
/**
* set when formatting keys and values of collections
*
* @internal
* */
parent?: Format;
/**
* test whether an object has been seen, and get a reference to the

@@ -18,11 +35,7 @@ * Format handling them, if so.

* overridden in child classes when doing simplePrint()
*
* @internal
*/
seen?: (obj?: any) => false | Format;
/** how to print this thing */
style?: StyleType;
/**
* optinally override {@link tcompare!styles.Style#bufferChunkSize }
* */
bufferChunkSize?: number;
/**
* Set when printing child fields

@@ -58,16 +71,14 @@ *

/**
* Include any and all enumerable properties, including those inherited on
* the prototype chain. By default, only `own` properties are printed.
*/
includeEnumerable?: boolean;
/**
* Include getter properties
*/
includeGetters?: boolean;
/**
* The object being compared against in comparison classes. (Not used
* in {@link tcompare!format.Format}.)
*
* @internal
*/
expect?: any;
}
/**
* The base class for all other comparators, and used
* directly by comparators for their "simplePrint" methods.
* It doesn't do comparison, just formatting.
*/
export declare class Format {

@@ -74,0 +85,0 @@ options: FormatOptions;

@@ -15,2 +15,7 @@ "use strict";

const objToString = (obj) => toString.call(obj);
/**
* The base class for all other comparators, and used
* directly by comparators for their "simplePrint" methods.
* It doesn't do comparison, just formatting.
*/
class Format {

@@ -17,0 +22,0 @@ options;

@@ -21,2 +21,5 @@ /**

}
/**
* Options that can be used to set how diffs are formatted.
*/
export type CompareOptions = FormatOptions & Pick<SameOptions, 'diffContext'>;

@@ -23,0 +26,0 @@ /** format a value and return the formatted string */

/// <reference types="node" resolution-mode="require"/>
import { Style, StyleType } from './styles.js';
/**
* The base class for all other comparators, and used
* directly by comparators for their "simplePrint" methods.
* It doesn't do comparison, just formatting.
* Options to control the formatting of objects.
*/
export interface FormatOptions {
/** set when formatting keys and values of collections */
parent?: Format;
/** sort items alphabetically by key */
sort?: boolean;
/** how to print this thing */
style?: StyleType;
/**
* optinally override {@link tcompare!styles.Style#bufferChunkSize }
* */
bufferChunkSize?: number;
/**
* Include any and all enumerable properties, including those inherited on
* the prototype chain. By default, only `own` properties are printed.
*/
includeEnumerable?: boolean;
/**
* Include getter properties
*/
includeGetters?: boolean;
/**
* set when formatting keys and values of collections
*
* @internal
* */
parent?: Format;
/**
* test whether an object has been seen, and get a reference to the

@@ -18,11 +35,7 @@ * Format handling them, if so.

* overridden in child classes when doing simplePrint()
*
* @internal
*/
seen?: (obj?: any) => false | Format;
/** how to print this thing */
style?: StyleType;
/**
* optinally override {@link tcompare!styles.Style#bufferChunkSize }
* */
bufferChunkSize?: number;
/**
* Set when printing child fields

@@ -58,16 +71,14 @@ *

/**
* Include any and all enumerable properties, including those inherited on
* the prototype chain. By default, only `own` properties are printed.
*/
includeEnumerable?: boolean;
/**
* Include getter properties
*/
includeGetters?: boolean;
/**
* The object being compared against in comparison classes. (Not used
* in {@link tcompare!format.Format}.)
*
* @internal
*/
expect?: any;
}
/**
* The base class for all other comparators, and used
* directly by comparators for their "simplePrint" methods.
* It doesn't do comparison, just formatting.
*/
export declare class Format {

@@ -74,0 +85,0 @@ options: FormatOptions;

@@ -12,2 +12,7 @@ import { styles } from './styles.js';

const objToString = (obj) => toString.call(obj);
/**
* The base class for all other comparators, and used
* directly by comparators for their "simplePrint" methods.
* It doesn't do comparison, just formatting.
*/
export class Format {

@@ -14,0 +19,0 @@ options;

@@ -21,2 +21,5 @@ /**

}
/**
* Options that can be used to set how diffs are formatted.
*/
export type CompareOptions = FormatOptions & Pick<SameOptions, 'diffContext'>;

@@ -23,0 +26,0 @@ /** format a value and return the formatted string */

{
"name": "tcompare",
"version": "6.0.1-3",
"version": "6.0.1-4",
"description": "A comprehensive comparison library, for use in test frameworks",

@@ -5,0 +5,0 @@ "author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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