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-2 to 6.0.1-3

4

dist/cjs/format.d.ts

@@ -23,3 +23,3 @@ /// <reference types="node" resolution-mode="require"/>

/**
* optinally override {@link Style#bufferChunkSize }
* optinally override {@link tcompare!styles.Style#bufferChunkSize }
* */

@@ -68,3 +68,3 @@ bufferChunkSize?: number;

* The object being compared against in comparison classes. (Not used
* in {@link Format}.)
* in {@link tcompare!format.Format}.)
*/

@@ -71,0 +71,0 @@ expect?: any;

import { Has } from './has.js';
/**
* The same as {@link Has}, but strictly compare all properties
* The same as {@link tcompare!has.Has}, but strictly compare all properties
*/

@@ -5,0 +5,0 @@ export declare class HasStrict extends Has {

@@ -7,3 +7,3 @@ "use strict";

/**
* The same as {@link Has}, but strictly compare all properties
* The same as {@link tcompare!has.Has}, but strictly compare all properties
*/

@@ -10,0 +10,0 @@ class HasStrict extends has_js_1.Has {

import { Same } from './same.js';
/**
* The same as {@link Same}, but ignore any fields present in the
* The same as {@link tcompare!same.Same}, but ignore any fields present in the
* test object and not present in the expect pattern.

@@ -5,0 +5,0 @@ */

@@ -7,3 +7,3 @@ "use strict";

/**
* The same as {@link Same}, but ignore any fields present in the
* The same as {@link tcompare!same.Same}, but ignore any fields present in the
* test object and not present in the expect pattern.

@@ -10,0 +10,0 @@ */

@@ -24,3 +24,3 @@ /**

export declare const format: (obj: any, options?: FormatOptions) => string;
/** convenience method for {@link Same} */
/** convenience method for {@link tcompare!same.Same} */
export declare const same: (obj: any, pattern: any, options?: CompareOptions) => Result;

@@ -27,0 +27,0 @@ /** convenience method for {@link Strict} */

@@ -29,3 +29,3 @@ "use strict";

exports.format = format;
/** convenience method for {@link Same} */
/** convenience method for {@link tcompare!same.Same} */
exports.same = fn(same_js_1.Same);

@@ -32,0 +32,0 @@ /** convenience method for {@link Strict} */

import { Same } from './same.js';
/**
* this uses the test method from {@link MatchStrict}, but requires that *only*
* the specified fields in the pattern are present in the object.
* this uses the test method from {@link tcompare!match-strict.MatchStrict},
* but requires that *only* the specified fields in the pattern are present in
* the object.
*

@@ -6,0 +7,0 @@ * It does still allow a field to be present in the object and not the pattern

@@ -7,4 +7,5 @@ "use strict";

/**
* this uses the test method from {@link MatchStrict}, but requires that *only*
* the specified fields in the pattern are present in the object.
* this uses the test method from {@link tcompare!match-strict.MatchStrict},
* but requires that *only* the specified fields in the pattern are present in
* the object.
*

@@ -11,0 +12,0 @@ * It does still allow a field to be present in the object and not the pattern

import { Same } from './same.js';
/**
* this uses the test method from {@link Match}, but requires that *only* the
* specified fields in the pattern are present in the object.
* this uses the test method from {@link tcompare!match.Match}, but requires
* that *only* the specified fields in the pattern are present in the object.
*

@@ -6,0 +6,0 @@ * It does still allow a field to be present in the object and not the pattern

@@ -7,4 +7,4 @@ "use strict";

/**
* this uses the test method from {@link Match}, but requires that *only* the
* specified fields in the pattern are present in the object.
* this uses the test method from {@link tcompare!match.Match}, but requires
* that *only* the specified fields in the pattern are present in the object.
*

@@ -11,0 +11,0 @@ * It does still allow a field to be present in the object and not the pattern

import { Match } from './match.js';
/**
* Identical to {@link Match}, *except* in the case of two simple types.
* If the value loosely equals the expected pattern, but is not strictly
* equal, then the test returns false.
* Identical to {@link tcompare!match.Match}, *except* in the case of two
* simple types. If the value loosely equals the expected pattern, but is not
* strictly equal, then the test returns false.
*/

@@ -7,0 +7,0 @@ export declare class MatchStrict extends Match {

@@ -6,5 +6,5 @@ "use strict";

/**
* Identical to {@link Match}, *except* in the case of two simple types.
* If the value loosely equals the expected pattern, but is not strictly
* equal, then the test returns false.
* Identical to {@link tcompare!match.Match}, *except* in the case of two
* simple types. If the value loosely equals the expected pattern, but is not
* strictly equal, then the test returns false.
*/

@@ -11,0 +11,0 @@ class MatchStrict extends match_js_1.Match {

@@ -5,3 +5,3 @@ import { Has } from './has.js';

*
* - If the objects pass the {@link Has} test, then return true.
* - If the objects pass the {@link tcompare!has.Has} test, then return true.
* - If the pattern is a regular expression, then test it against the

@@ -8,0 +8,0 @@ * string form of the test value.

@@ -9,3 +9,3 @@ "use strict";

*
* - If the objects pass the {@link Has} test, then return true.
* - If the objects pass the {@link tcompare!has.Has} test, then return true.
* - If the pattern is a regular expression, then test it against the

@@ -12,0 +12,0 @@ * string form of the test value.

@@ -33,4 +33,5 @@ import { Format, FormatOptions } from './format.js';

* whether to check a given field. In this class, this is always true (because
* we are testing for full deep sameness), but in {@link Has} and subclasses,
* it's more complicated (only test nodes that exist in the expect object).
* we are testing for full deep sameness), but in {@link tcompare!has.Has} and
* subclasses, it's more complicated (only test nodes that exist in the expect
* object).
*/

@@ -37,0 +38,0 @@ export declare class Same extends Format {

@@ -32,4 +32,5 @@ "use strict";

* whether to check a given field. In this class, this is always true (because
* we are testing for full deep sameness), but in {@link Has} and subclasses,
* it's more complicated (only test nodes that exist in the expect object).
* we are testing for full deep sameness), but in {@link tcompare!has.Has} and
* subclasses, it's more complicated (only test nodes that exist in the expect
* object).
*/

@@ -36,0 +37,0 @@ class Same extends format_js_1.Format {

import { Same } from './same.js';
/**
* The same as {@link Same}, but without type coercion
* The same as {@link tcompare!same.Same}, but without type coercion
*/

@@ -5,0 +5,0 @@ export declare class Strict extends Same {

@@ -7,3 +7,3 @@ "use strict";

/**
* The same as {@link Same}, but without type coercion
* The same as {@link tcompare!same.Same}, but without type coercion
*/

@@ -10,0 +10,0 @@ class Strict extends same_js_1.Same {

@@ -156,3 +156,3 @@ "use strict";

/**
* same as the {@link js} style, but no indentation or \n
* same as the {@link tcompare!styles.js} style, but no indentation or \n
*

@@ -159,0 +159,0 @@ * Not suitable for diffs, as everything is printed on one line.

@@ -23,3 +23,3 @@ /// <reference types="node" resolution-mode="require"/>

/**
* optinally override {@link Style#bufferChunkSize }
* optinally override {@link tcompare!styles.Style#bufferChunkSize }
* */

@@ -68,3 +68,3 @@ bufferChunkSize?: number;

* The object being compared against in comparison classes. (Not used
* in {@link Format}.)
* in {@link tcompare!format.Format}.)
*/

@@ -71,0 +71,0 @@ expect?: any;

import { Has } from './has.js';
/**
* The same as {@link Has}, but strictly compare all properties
* The same as {@link tcompare!has.Has}, but strictly compare all properties
*/

@@ -5,0 +5,0 @@ export declare class HasStrict extends Has {

import { Has } from './has.js';
import { Strict } from './strict.js';
/**
* The same as {@link Has}, but strictly compare all properties
* The same as {@link tcompare!has.Has}, but strictly compare all properties
*/

@@ -6,0 +6,0 @@ export class HasStrict extends Has {

import { Same } from './same.js';
/**
* The same as {@link Same}, but ignore any fields present in the
* The same as {@link tcompare!same.Same}, but ignore any fields present in the
* test object and not present in the expect pattern.

@@ -5,0 +5,0 @@ */

import { Format } from './format.js';
import { Same } from './same.js';
/**
* The same as {@link Same}, but ignore any fields present in the
* The same as {@link tcompare!same.Same}, but ignore any fields present in the
* test object and not present in the expect pattern.

@@ -6,0 +6,0 @@ */

@@ -24,3 +24,3 @@ /**

export declare const format: (obj: any, options?: FormatOptions) => string;
/** convenience method for {@link Same} */
/** convenience method for {@link tcompare!same.Same} */
export declare const same: (obj: any, pattern: any, options?: CompareOptions) => Result;

@@ -27,0 +27,0 @@ /** convenience method for {@link Strict} */

@@ -25,3 +25,3 @@ /**

export const format = (obj, options = {}) => new Format(obj, options).print();
/** convenience method for {@link Same} */
/** convenience method for {@link tcompare!same.Same} */
export const same = fn(Same);

@@ -28,0 +28,0 @@ /** convenience method for {@link Strict} */

import { Same } from './same.js';
/**
* this uses the test method from {@link MatchStrict}, but requires that *only*
* the specified fields in the pattern are present in the object.
* this uses the test method from {@link tcompare!match-strict.MatchStrict},
* but requires that *only* the specified fields in the pattern are present in
* the object.
*

@@ -6,0 +7,0 @@ * It does still allow a field to be present in the object and not the pattern

import { MatchStrict } from './match-strict.js';
import { Same } from './same.js';
/**
* this uses the test method from {@link MatchStrict}, but requires that *only*
* the specified fields in the pattern are present in the object.
* this uses the test method from {@link tcompare!match-strict.MatchStrict},
* but requires that *only* the specified fields in the pattern are present in
* the object.
*

@@ -7,0 +8,0 @@ * It does still allow a field to be present in the object and not the pattern

import { Same } from './same.js';
/**
* this uses the test method from {@link Match}, but requires that *only* the
* specified fields in the pattern are present in the object.
* this uses the test method from {@link tcompare!match.Match}, but requires
* that *only* the specified fields in the pattern are present in the object.
*

@@ -6,0 +6,0 @@ * It does still allow a field to be present in the object and not the pattern

import { Match } from './match.js';
import { Same } from './same.js';
/**
* this uses the test method from {@link Match}, but requires that *only* the
* specified fields in the pattern are present in the object.
* this uses the test method from {@link tcompare!match.Match}, but requires
* that *only* the specified fields in the pattern are present in the object.
*

@@ -7,0 +7,0 @@ * It does still allow a field to be present in the object and not the pattern

import { Match } from './match.js';
/**
* Identical to {@link Match}, *except* in the case of two simple types.
* If the value loosely equals the expected pattern, but is not strictly
* equal, then the test returns false.
* Identical to {@link tcompare!match.Match}, *except* in the case of two
* simple types. If the value loosely equals the expected pattern, but is not
* strictly equal, then the test returns false.
*/

@@ -7,0 +7,0 @@ export declare class MatchStrict extends Match {

import { Match } from './match.js';
/**
* Identical to {@link Match}, *except* in the case of two simple types.
* If the value loosely equals the expected pattern, but is not strictly
* equal, then the test returns false.
* Identical to {@link tcompare!match.Match}, *except* in the case of two
* simple types. If the value loosely equals the expected pattern, but is not
* strictly equal, then the test returns false.
*/

@@ -7,0 +7,0 @@ export class MatchStrict extends Match {

@@ -5,3 +5,3 @@ import { Has } from './has.js';

*
* - If the objects pass the {@link Has} test, then return true.
* - If the objects pass the {@link tcompare!has.Has} test, then return true.
* - If the pattern is a regular expression, then test it against the

@@ -8,0 +8,0 @@ * string form of the test value.

@@ -6,3 +6,3 @@ import { Format } from './format.js';

*
* - If the objects pass the {@link Has} test, then return true.
* - If the objects pass the {@link tcompare!has.Has} test, then return true.
* - If the pattern is a regular expression, then test it against the

@@ -9,0 +9,0 @@ * string form of the test value.

@@ -33,4 +33,5 @@ import { Format, FormatOptions } from './format.js';

* whether to check a given field. In this class, this is always true (because
* we are testing for full deep sameness), but in {@link Has} and subclasses,
* it's more complicated (only test nodes that exist in the expect object).
* we are testing for full deep sameness), but in {@link tcompare!has.Has} and
* subclasses, it's more complicated (only test nodes that exist in the expect
* object).
*/

@@ -37,0 +38,0 @@ export declare class Same extends Format {

@@ -29,4 +29,5 @@ import { createTwoFilesPatch } from 'diff';

* whether to check a given field. In this class, this is always true (because
* we are testing for full deep sameness), but in {@link Has} and subclasses,
* it's more complicated (only test nodes that exist in the expect object).
* we are testing for full deep sameness), but in {@link tcompare!has.Has} and
* subclasses, it's more complicated (only test nodes that exist in the expect
* object).
*/

@@ -33,0 +34,0 @@ export class Same extends Format {

import { Same } from './same.js';
/**
* The same as {@link Same}, but without type coercion
* The same as {@link tcompare!same.Same}, but without type coercion
*/

@@ -5,0 +5,0 @@ export declare class Strict extends Same {

import { Format } from './format.js';
import { Same } from './same.js';
/**
* The same as {@link Same}, but without type coercion
* The same as {@link tcompare!same.Same}, but without type coercion
*/

@@ -6,0 +6,0 @@ export class Strict extends Same {

@@ -153,3 +153,3 @@ // can't use buf.toString('ascii') because that unmasks high bytes

/**
* same as the {@link js} style, but no indentation or \n
* same as the {@link tcompare!styles.js} style, but no indentation or \n
*

@@ -156,0 +156,0 @@ * Not suitable for diffs, as everything is printed on one line.

{
"name": "tcompare",
"version": "6.0.1-2",
"version": "6.0.1-3",
"description": "A comprehensive comparison library, for use in test frameworks",
"author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)",
"license": "ISC",
"license": "BlueOak-1.0.0",
"type": "module",

@@ -8,0 +8,0 @@ "exports": {

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

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

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

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