Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function privacy returns "[Array]" #163

Open
xxccm opened this issue Jul 1, 2021 · 2 comments
Open

Function privacy returns "[Array]" #163

xxccm opened this issue Jul 1, 2021 · 2 comments

Comments

@xxccm
Copy link

xxccm commented Jul 1, 2021

Description:

Store.privacy function is not returning words/phrases like "Email Address", "Phone Number" as shown in the provided example in Readme, now it returns "[Array]" under "dataCategories" and "purposes" sections (see example below).

Example code:

var store = require('app-store-scraper');

store.privacy({
  id: 324684580,
})
.then(console.log)
.catch(console.log);

Error message:

{
  managePrivacyChoicesUrl: null,
  privacyTypes: [
    {
      privacyType: 'Data Used to Track You',
      identifier: 'DATA_USED_TO_TRACK_YOU',
      description: 'The following data may be used to track you across apps and websites owned by other companies:',
      dataCategories: [Array],
      purposes: []
    },
    {
      privacyType: 'Data Linked to You',
      identifier: 'DATA_LINKED_TO_YOU',
      description: 'The following data, which may be collected and linked to your identity, may be used for the following purposes:',
      dataCategories: [],
      purposes: [Array]
    }
  ]
}
@kasnder
Copy link
Contributor

kasnder commented May 18, 2022

Looks to me like this is just because of the console.log function? Try calling JSON.stringify first.

@edubasegr
Copy link

Has anyone improved the code to return the Arrays content i.e. "Email Address", "Phone Number" rather than the work [Array]?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants