- Initial commit, should be quite complete

This commit is contained in:
AlexanderBuzz
2023-01-12 16:24:36 +01:00
parent abd57c9db6
commit a71665cca4
13 changed files with 2542 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
'use strict';
module.exports = {
isAmountObject : function (arg) {
const keys = Object.keys(arg).sort()
return (
keys.length === 3 &&
keys[0] === 'currency' &&
keys[1] === 'issuer' &&
keys[2] === 'value'
)
},
sortFuncCanonical : function (a, b) {
a = this.fieldSortKey(a)
b = this.fieldSortKey(b)
return a.typeCode - b.typeCode || a.fieldCode - b.fieldCode
}
}