(operation: any)
| 140 | |
| 141 | // Wrap NeDB operations in promises since it uses callbacks |
| 142 | function wrapDbOperationInPromise<A=any>(operation: any): Promise<A> { |
| 143 | return new Promise((resolve, reject) => { |
| 144 | operation((err: Error, result: any) => { |
| 145 | if (err) reject(err) |
| 146 | else resolve(result) |
| 147 | }) |
| 148 | }) |
| 149 | } |
| 150 | function isNoentError(error: any) { |
| 151 | return error.code === 'ENOENT' |
| 152 | } |
no outgoing calls
no test coverage detected