Compare commits

...

4 Commits

Author SHA1 Message Date
969b892ed8 5.0.15 2024-03-19 13:30:15 +01:00
d1d679ac34 fix(core): update 2024-03-19 13:30:15 +01:00
8937dfb553 5.0.14 2024-03-03 10:35:27 +01:00
09d45b1f45 fix(core): update 2024-03-03 10:35:26 +01:00
3 changed files with 15 additions and 2 deletions

View File

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

View File

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

View File

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