facundoolano/google-play-scraper

Don't mutate options objects

Open

#238 opened on Jun 2, 2018

 (1 comment) (0 reactions) (0 assignees)JavaScript (723 forks)github user discovery
buggood first issue

Repository metrics

Stars
 (2,948 stars)
PR merge metrics
 (Avg merge 103d 2h) (4 merged PRs in 30d)

Description

Most of the methods take an options object and then mutate by setting default values, like here. This is not a good practice, since the methods don't own those objects and are introducing unexpected side effects. Use Object.assign instead to make copies of the options.

Contributor guide