Al-HUWAITI Shell
Al-huwaiti


Server : LiteSpeed
System : Linux server551.iseencloud.net 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64
User : pbkvidya ( 2092)
PHP Version : 8.1.34
Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open
Directory :  /usr/lib/node_modules/npm/node_modules/just-diff/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/node_modules/npm/node_modules/just-diff/index.tests.ts
import * as diffObj from './index'

const {diff, jsonPatchPathConverter} = diffObj;
const obj1 = {a: 2, b: 3};
const obj2 = {a: 2, c: 1};
const arr1 = [1, 'bee'];
const arr2 = [2, 'bee'];


//OK
diff(obj1, obj2);
diff(arr1, arr2);
diff(obj1, arr1);
diff(obj2, arr2);
diff(/yes/, arr1);
diff(new Date(), arr2);


diff(obj1, obj2, jsonPatchPathConverter);
diff(arr1, arr2, jsonPatchPathConverter);
diff(obj1, arr1, jsonPatchPathConverter);
diff(obj2, arr2, jsonPatchPathConverter);

// not OK
// @ts-expect-error
diff(obj1);
// @ts-expect-error
diff(arr2);
// @ts-expect-error
diff('a');
// @ts-expect-error
diff(true);

// @ts-expect-error
diff(obj1, 1);
// @ts-expect-error
diff(3, arr2);
// @ts-expect-error
diff(obj1, 'a');
// @ts-expect-error
diff('b', arr2);

// @ts-expect-error
diff('a', jsonPatchPathConverter);
// @ts-expect-error
diff(true, jsonPatchPathConverter);

// @ts-expect-error
diff(obj1, 1, jsonPatchPathConverter);
// @ts-expect-error
diff(3, arr2, jsonPatchPathConverter);
// @ts-expect-error
diff(obj1, 'a', jsonPatchPathConverter);
// @ts-expect-error
diff('b', arr2, jsonPatchPathConverter);

// @ts-expect-error
diff(obj1, obj2, 'a');
// @ts-expect-error
diff(arr1, arr2, 1);
// @ts-expect-error
diff(obj1, arr1, 'bee');
// @ts-expect-error
diff(obj2, arr2, 'nope');


Al-HUWAITI Shell