fix(core): update
This commit is contained in:
parent
8937dfb553
commit
d1d679ac34
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartjson',
|
||||
version: '5.0.14',
|
||||
version: '5.0.15',
|
||||
description: 'typed json handlers'
|
||||
}
|
||||
|
13
ts/index.ts
13
ts/index.ts
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user