Compare commits

..

4 Commits

Author SHA1 Message Date
8e93b8cb73 5.0.16 2024-03-19 13:50:07 +01:00
e38ccd221a fix(core): update 2024-03-19 13:50:06 +01:00
969b892ed8 5.0.15 2024-03-19 13:30:15 +01:00
d1d679ac34 fix(core): update 2024-03-19 13:30:15 +01:00
3 changed files with 19 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@push.rocks/smartjson", "name": "@push.rocks/smartjson",
"version": "5.0.14", "version": "5.0.16",
"private": false, "private": false,
"description": "typed json handlers", "description": "typed json handlers",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@push.rocks/smartjson', name: '@push.rocks/smartjson',
version: '5.0.14', version: '5.0.16',
description: 'typed json handlers' description: 'typed json handlers'
} }

View File

@ -1,5 +1,6 @@
import * as plugins from './smartjson.plugins.js'; import * as plugins from './smartjson.plugins.js';
import * as bufferhandling from './bufferhandling.js'; import * as bufferhandling from './bufferhandling.js';
import { json } from 'stream/consumers';
/** /**
* allows you to parse a json * allows you to parse a json
@ -114,3 +115,19 @@ export const deepEqualObjects = (object1: any, object2: any): boolean => {
const object2String = stringify(object2); const object2String = stringify(object2);
return object1String === object2String; return object1String === object2String;
}; };
export const deepEqualJsonLStrings = (jsonLString1: string, jsonLString2: string): boolean => {
const firstArray = [];
jsonLString1.split('\n').forEach((line) => {
if (line) {
firstArray.push(parse(line));
}
});
const secondArray = [];
jsonLString2.split('\n').forEach((line) => {
if (line) {
secondArray.push(parse(line));
}
});
return deepEqualObjects(firstArray, secondArray);
}