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

set default name to export if empty filename #3

Merged
merged 2 commits into from Feb 28, 2019
Merged

set default name to export if empty filename #3

merged 2 commits into from Feb 28, 2019

Conversation

estellepicq
Copy link
Contributor

If provided filename is an empty string:

  • Before: get file 'csv'
  • Now: set value to 'export' and get file 'export.csv'

Tried to pass it as default value (...public static data( filename: string = 'export',....) but empty strings are not undefined values.

@LCluber
Copy link
Owner

LCluber commented Feb 26, 2019

it would me more efficient to put your code after the data check :

if (!Is.object(data[0]) && !Is.json(data[0])) {
return false;
}

@estellepicq
Copy link
Contributor Author

estellepicq commented Feb 27, 2019

Code moved after data check as requested.

Off topic: my IDE points out this error in tsconfig.json: 'Cannot write file "[...]/src/ts/build/es6/convert.d" because it would overwrite input file'

@LCluber LCluber merged commit 4e0a1c0 into LCluber:master Feb 28, 2019
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.

None yet

2 participants