| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import $ from 'jquery' |
||
| 5 | export function init (options) { |
||
| 6 | if (!status) { |
||
| 7 | const apiKey = options.apiKey |
||
| 8 | const callback = `googleMaps_${Date.now()}` |
||
| 9 | const url = `https://maps.googleapis.com/maps/api/js?key=${apiKey}&callback=${callback}` |
||
| 10 | status = new Promise((resolve, reject) => { |
||
|
|
|||
| 11 | window[callback] = () => { |
||
| 12 | resolve() |
||
| 13 | } |
||
| 14 | }) |
||
| 15 | $.getScript(url) |
||
| 16 | } |
||
| 17 | return status |
||
| 18 | } |
||
| 19 |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.