template/cordova/lib/package.js
function getPackageName (platformPath) {
    // Can reliably read from package.windows.appxmanifest even if targeting Windows 10
    // because the function is only used for desktop deployment, which always has the same
    // package name when uninstalling / reinstalling
    try {
        return Q.when(AppxManifest.get(path.join(platformPath, 'package.windows.appxmanifest'))
            .getIdentity().getName());
    } catch (e) {
        return Q.reject('Can\'t read package name from manifest ' + e);
    }
}
function getPackageName (platformPath) {
    // Can reliably read from package.windows.appxmanifest even if targeting Windows 10
    // because the function is only used for desktop deployment, which always has the same
    // package name when uninstalling / reinstalling
    try {
        return Q.when(AppxManifest.get(path.join(platformPath, 'package.windows.appxmanifest'))
            .getIdentity().getName());
    } catch (e) {
        return Q.reject('Can\'t read package name from manifest ' + e);
    }
}
function getPackageName ( platformPath ) { // Can reliably read from package.windows.appxmanifest even if targeting Windows 10 // because the function is only used for desktop deployment, which always has the same // package name when uninstalling / reinstalling try { return Q . when ( AppxManifest . get ( path . join ( platformPath , 'package.windows.appxmanifest' ) ) . getIdentity ( ) . getName ( ) ) ; } catch ( e ) { return Q . reject ( 'Can\'t read package name from manifest ' + e ) ; } }
return package name fetched from appxmanifest return rejected promise if appxmanifest not valid
return package name fetched from appxmanifest return rejected promise if appxmanifest not valid