(methodName, theArguments)
| 227 | } |
| 228 | |
| 229 | function calculateOperationHash(methodName, theArguments) { |
| 230 | |
| 231 | |
| 232 | // build the signature of the function + arguments |
| 233 | |
| 234 | let key; |
| 235 | const args = []; |
| 236 | for (key in theArguments) { |
| 237 | |
| 238 | if (theArguments.hasOwnProperty(key)) { |
| 239 | |
| 240 | args.push(replaceObjectsByGUUID(theArguments[key])); |
| 241 | |
| 242 | } |
| 243 | |
| 244 | } |
| 245 | const argStr = JSON.stringify(args); |
| 246 | const cmd = `${methodName}(${argStr.substr(1, argStr.length - 2)})`; |
| 247 | const uuid = hash(cmd); |
| 248 | |
| 249 | return [uuid, cmd]; |
| 250 | |
| 251 | } |
| 252 | |
| 253 | function isFunction(a) { |
| 254 |
no test coverage detected