mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-27 07:58:54 +03:00
1 parent
93b688a1b9
commit
0c334e9560
20 files changed
+31
-27
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import _ from 'lodash';
|
||||
import Decimal from 'decimal.js';
|
||||
import type { Difference, DifferenceStatus } from './json-diff.types';
|
||||
|
||||
export { diff };
|
||||
@@ -109,6 +110,9 @@ function getType(value: unknown): 'object' | 'array' | 'value' {
|
||||
if (Array.isArray(value)) {
|
||||
return 'array';
|
||||
}
|
||||
if (Decimal.isDecimal(value)) {
|
||||
return 'value';
|
||||
}
|
||||
if (typeof value === 'object') {
|
||||
return 'object';
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ const { t } = useI18n();
|
||||
const rawLeftJson = ref('');
|
||||
const rawRightJson = ref('');
|
||||
|
||||
const leftJson = computed(() => withDefaultOnError(() => JSON.parseBigInt(rawLeftJson.value), undefined));
|
||||
const rightJson = computed(() => withDefaultOnError(() => JSON.parseBigInt(rawRightJson.value), undefined));
|
||||
const leftJson = computed(() => withDefaultOnError(() => JSON.parseBigNum(rawLeftJson.value), undefined));
|
||||
const rightJson = computed(() => withDefaultOnError(() => JSON.parseBigNum(rawRightJson.value), undefined));
|
||||
|
||||
const jsonValidationRules = [
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user