MCPcopy Create free account
hub / github.com/TGX-Android/Publisher / getProperty

Function getProperty

main.js:497–506  ·  view source on GitHub ↗
(data, variableName)

Source from the content-addressed store, hash-verified

495}
496
497function 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
508function monthYears (now, then) {
509 let years = now.getUTCFullYear() - then.getUTCFullYear()

Callers 2

getAppVersionFunction · 0.85
processPrivateCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected