(keyId, deep)
| 56 | } |
| 57 | |
| 58 | getForId(keyId, deep) { |
| 59 | for (let i = 0; i < this.keys.length; i++) { |
| 60 | if (keyIdCheck(keyId, this.keys[i])) { |
| 61 | return this.keys[i]; |
| 62 | } |
| 63 | if (deep && this.keys[i].subkeys.length) { |
| 64 | for (let j = 0; j < this.keys[i].subkeys.length; j++) { |
| 65 | if (keyIdCheck(keyId, this.keys[i].subkeys[j])) { |
| 66 | return this.keys[i]; |
| 67 | } |
| 68 | } |
| 69 | } |
| 70 | } |
| 71 | return null; |
| 72 | } |
| 73 | |
| 74 | push(key) { |
| 75 | return this.keys.push(key); |
no test coverage detected