Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

json-diff-kit

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-diff-kit - npm Package Compare versions

Comparing version 1.0.22 to 1.0.23

bin/examples/after.json

14

package.json
{
"name": "json-diff-kit",
"version": "1.0.22",
"version": "1.0.23",
"description": "A better JSON differ & viewer.",

@@ -8,2 +8,5 @@ "main": "dist/cjs/index.js",

"typings": "typings",
"bin": {
"jsondiff": "bin/jsondiff.cjs"
},
"repository": {

@@ -35,5 +38,7 @@ "type": "git",

"@types/lodash": "^4.14.191",
"@types/node": "^20.11.16",
"@types/prismjs": "^1.26.0",
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"@types/terminal-kit": "^2.5.6",
"cross-env": "^7.0.3",

@@ -55,4 +60,7 @@ "fork-me-on-github": "^1.0.6",

"dependencies": {
"commander": "^11.1.0",
"fast-myers-diff": "^3.0.1",
"lodash": "^4.17.21"
"lodash": "^4.17.21",
"prompts": "^2.4.2",
"terminal-kit": "^3.0.1"
},

@@ -64,3 +72,3 @@ "scripts": {

"build": "cross-env pnpm build:ts && pnpm build:less",
"build:ts": "cross-env rollup -c",
"build:ts": "cross-env rollup -c && rollup -c rollup.config.cli.ts",
"build:less": "cross-env lessc src/viewer.less dist/viewer.css && lessc src/viewer-monokai.less dist/viewer-monokai.css",

@@ -67,0 +75,0 @@ "build:pages": "cross-env NODE_ENV=production BASEDIR=docs rollup -c rollup.config.pages.ts",

@@ -16,4 +16,5 @@ {

"target": "esnext",
"types": ["node"],
},
"include": ["src"],
}

@@ -81,9 +81,2 @@ export interface DifferOptions {

/**
* Whether to ignore the case when comparing keys, default `false`.
*
* Notice: if there are keys with different cases in the same object, the algorithm may fail
* since it's not able to tell which key is the correct one.
*/
ignoreCaseForKey?: boolean;
/**
* Whether to use recursive equal to compare objects, default `false`.

@@ -117,3 +110,3 @@ *

private arrayDiffFunc;
constructor({ detectCircular, maxDepth, showModifications, arrayDiffMethod, ignoreCase, ignoreCaseForKey, recursiveEqual, }?: DifferOptions);
constructor({ detectCircular, maxDepth, showModifications, arrayDiffMethod, recursiveEqual, }?: DifferOptions);
private detectCircular;

@@ -120,0 +113,0 @@ private sortResultLines;

@@ -0,0 +0,0 @@ import Differ from './differ';

@@ -1,4 +0,2 @@

interface CmpOptions {
ignoreCase?: boolean;
}
import type { DifferOptions } from '../differ';
/**

@@ -11,3 +9,3 @@ * The compare function to correct the order for "array" or "object":

*/
declare const cmp: (a: any, b: any, options: CmpOptions) => number;
declare const cmp: (a: any, b: any, options?: DifferOptions) => number;
export default cmp;

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

declare const detectCircular: (value: any, map?: Map<any, boolean>) => boolean;
export default detectCircular;
import type { DifferOptions, DiffResult } from '../differ';
declare const diffArrayLCS: (arrLeft: any[], arrRight: any[], keyLeft: string, keyRight: string, level: number, options: DifferOptions, linesLeft?: DiffResult[], linesRight?: DiffResult[]) => [DiffResult[], DiffResult[]];
export default diffArrayLCS;
import type { DiffResult, DifferOptions } from '../differ';
declare const diffArrayNormal: (arrLeft: any[], arrRight: any[], keyLeft: string, keyRight: string, level: number, options: DifferOptions, linesLeft?: DiffResult[], linesRight?: DiffResult[]) => [DiffResult[], DiffResult[]];
export default diffArrayNormal;
import type { DifferOptions, DiffResult, ArrayDiffFunc } from '../differ';
declare const diffObject: (lhs: Record<string, any>, rhs: Record<string, any>, level: number, options: DifferOptions, arrayDiffFunc: ArrayDiffFunc) => [DiffResult[], DiffResult[]];
export default diffObject;
declare const formatValue: (value: any, depth?: number, pretty?: boolean) => string;
export default formatValue;

@@ -0,0 +0,0 @@ export interface InlineDiffOptions {

@@ -0,0 +0,0 @@ import type { DiffResult } from '../differ';

declare const getType: (value: any) => "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "null" | "array";
export default getType;
import type { DifferOptions } from '../differ';
declare const isEqual: (a: any, b: any, options: DifferOptions) => boolean;
export default isEqual;
declare const shallowSimilarity: (left: any, right: any) => number;
export default shallowSimilarity;
import type { DifferOptions } from '../differ';
declare const sortInnerArrays: (source: any, options?: DifferOptions) => any;
export default sortInnerArrays;
import type { DifferOptions } from '../differ';
declare const sortStrings: (arr: string[], options: DifferOptions) => string[];
export default sortStrings;
declare const stringify: (obj: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number, depth?: number) => string;
export default stringify;

@@ -76,13 +76,2 @@ import * as React from 'react';

hideUnchangedLines?: HideUnchangedLinesOptions;
/**
* Use virtual list to speed up rendering, default is `false`.
*/
virtual?: boolean | {
/** @default 'body' */
scrollContainer?: string;
/** @default 18 */
itemHeight?: number;
/** @default 26 */
expandLineHeight?: number;
};
/** Extra class names */

@@ -89,0 +78,0 @@ className?: string;

Sorry, the diff of this file is not supported yet

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

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 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