Skip to content

Conversation

@abubakarkhawaja
Copy link
Owner

No description provided.

Copy link

@Fiju Fiju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Include package.json file in the project and add required scripts in it.
  • Constants like base url or any other hard coded value can be maintained as an environment variable. And use those values in the project
  • Declare all constants using const keyword rather them let or var
  • Add build script in package.json that will bundle our code

scrapper.cjs Outdated
}
};

fetchPrada();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use IIFE (immediately invoked functional expression) in such cases.

(function() {
.
.
.
})()```


fetchPrada = async () => {
try {
let productsRecord = { totalProducts: 0 };
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always declare immutable variable using const keywords.

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

Successfully merging this pull request may close these issues.

3 participants