(data = {})
| 138 | } |
| 139 | |
| 140 | function canonicalJson(data = {}) { |
| 141 | const sorted = {}; |
| 142 | Object.keys(data || {}) |
| 143 | .sort() |
| 144 | .forEach((key) => { |
| 145 | sorted[key] = data[key]; |
| 146 | }); |
| 147 | return JSON.stringify(sorted); |
| 148 | } |
| 149 | |
| 150 | function makeSignature(data, config = {}) { |
| 151 | const key = config.key || ""; |
no test coverage detected