UNPKG
parsec-node
Version:
latest (2.2.2)
2.2.2
2.2.1
2.2.0
2.1.3
2.1.2
2.1.1
2.1.0
2.0.3
2.0.2
2.0.1
2.0.0
1.6.10
1.6.9
1.6.8
1.6.7
1.6.6
1.6.5
1.6.4
1.6.3
1.6.2
1.6.1
1.6.0
1.5.2
1.5.1
1.5.0
1.4.0
1.3.2
1.3.1
1.3.0
1.2.0
1.2.0-0
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
https://parseclabs.readthedocs.io/en/latest/
parsec-node
/
lotion
/
lib
/
get-root.js
11 lines
(8 loc)
•
253 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
const
{ createHash } =
require
(
'crypto'
);
const
{ stringify } =
require
(
'deterministic-json'
);
module
.
exports
=
async
function
getAppStateHash
(
store
) {
const
hash =
createHash
(
'sha256'
) .
update
(
stringify
(store)) .
digest
();
return
hash; };