(operation: "store" | "unstore", id: string, object: any, node: string, scope: string)
| 280 | } |
| 281 | |
| 282 | _storeObject(operation: "store" | "unstore", id: string, object: any, node: string, scope: string) { |
| 283 | for(let attr of Object.keys(object)) { |
| 284 | let value = object[attr]; |
| 285 | if(value === undefined) continue; |
| 286 | if(value.constructor === Array) { |
| 287 | for(let item of value) { |
| 288 | this[operation](scope, id, attr, item, node); |
| 289 | } |
| 290 | } else if(typeof value === "object") { |
| 291 | throw new Error("Attempting to store a non-value in an Eve database"); |
| 292 | } else { |
| 293 | this[operation](scope, id, attr, value, node); |
| 294 | } |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | storeObject(id: string, object: any, node: string, scope: string) { |
| 299 | this._storeObject("store", id, object, node, scope); |
no outgoing calls
no test coverage detected