(data, variableName)
| 495 | } |
| 496 | |
| 497 | function getProperty (data, variableName) { |
| 498 | variableName = variableName.replace(/\./gi, '\\.'); |
| 499 | const regexp = new RegExp(variableName + '\s*=\s*[^\n]+'); |
| 500 | const lookup = data.match(regexp); |
| 501 | const result = lookup && lookup.length == 1 ? lookup[0] : null; |
| 502 | if (result) { |
| 503 | return result.substring(result.indexOf('=') + 1) |
| 504 | } |
| 505 | return null; |
| 506 | } |
| 507 | |
| 508 | function monthYears (now, then) { |
| 509 | let years = now.getUTCFullYear() - then.getUTCFullYear() |
no outgoing calls
no test coverage detected