BREAKING CHANGE(core): switch to esm

This commit is contained in:
2022-06-26 11:34:09 +02:00
parent bb7bee3b42
commit 143eef8781
14 changed files with 8721 additions and 9082 deletions

View File

@ -1,5 +1,5 @@
import * as plugins from './nodehash.plugins';
import * as helpers from './nodehash.helpers';
import * as plugins from './nodehash.plugins.js';
import * as helpers from './nodehash.helpers.js';
/**
* creates sha256 Hash from Stream
@ -56,7 +56,7 @@ export const sha256FromBuffer = async (bufferArg: Buffer): Promise<string> => {
* computes sha265 Hash from Object
*/
export const sha265FromObject = async (objectArg: any): Promise<string> => {
const stringifiedObject = plugins.smartjson.stringify(objectArg, {});
const stringifiedObject = plugins.smartjson.stringify(objectArg);
const hashResult = await sha256FromString(stringifiedObject);
return hashResult;
};