(compatibleSDK)
| 1 | var semver = require('semver'); |
| 2 | |
| 3 | function compatible(compatibleSDK) { |
| 4 | return function (clientSDK) { |
| 5 | if (typeof clientSDK === 'string') { |
| 6 | clientSDK = fromString(clientSDK); |
| 7 | } |
| 8 | // REST API, or custom SDK |
| 9 | if (!clientSDK) { |
| 10 | return true; |
| 11 | } |
| 12 | const clientVersion = clientSDK.version; |
| 13 | const compatiblityVersion = compatibleSDK[clientSDK.sdk]; |
| 14 | return semver.satisfies(clientVersion, compatiblityVersion); |
| 15 | }; |
| 16 | } |
| 17 | |
| 18 | function supportsForwardDelete(clientSDK) { |
| 19 | return compatible({ |
no test coverage detected