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

Feature/excel file import #198

Merged
merged 3 commits into from
Sep 7, 2016
Merged

Conversation

ysg410
Copy link
Contributor

@ysg410 ysg410 commented Sep 7, 2016

No description provided.

var storeName = data[0];
storeName = storeName.replace(/_/g, ' '); // . is treated as regex when
//console.log('regex with storeName', storeName);
if(fileExtension[1] === 'csv' || fileExtension[1] === 'CSV'){
Copy link
Contributor

@pulkitsinghal pulkitsinghal Sep 7, 2016

Choose a reason for hiding this comment

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

You can cover more ground if you use something like:

  1. if( (fileExtension[1]).toLowerCase() === 'csv' ) ) {, or
  2. if( (fileExtension[1]).toUpperCase() === 'CSV' ) ) {
    because it lets you account for weird things like: file.cSV or file.CsV etc.

I haven't tested my pseudo-code, just wrote the idea down.

@pulkitsinghal pulkitsinghal merged commit d7e68d6 into develop Sep 7, 2016
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.

2 participants