(options)
| 55 | } |
| 56 | |
| 57 | function validateOptions(options) { |
| 58 | for (var key in options) { |
| 59 | if (options[key] === null || options[key] === undefined) { |
| 60 | logger("Option [" + key + "] is " + options[key] + ". This may cause unexpected behaviour."); |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | if (options) { |
| 65 | if (options.passphrase && typeof options.passphrase !== "string") { |
| 66 | throw new Error("Passphrase must be a string"); |
| 67 | } |
| 68 | |
| 69 | if (options.token) { |
| 70 | validateToken(options.token); |
| 71 | } |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | return config; |
| 76 | }; |
no test coverage detected
searching dependent graphs…