Skip to content

Conversation

monfera
Copy link
Contributor

@monfera monfera commented Jun 8, 2016

No description provided.

@monfera monfera force-pushed the try-to-parse-json-only branch from 916ea9e to a709cb4 Compare June 8, 2016 13:50

function createMocksList(files) {
var mocksList = files.map(function(file) {
var mocksList = files.filter(function(file) {return file.extname === '.json';}).map(function(file) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice find!

Can we make this filter clearer though? Something like:

// in case pollutants (e.g .DS_Store) got in the mock directory
var jsonFiles = files.filter( /* */ );

var mockList = jsonFiles.map(function(mock) { /* */ })

@monfera monfera force-pushed the try-to-parse-json-only branch from a709cb4 to 34e07fa Compare June 8, 2016 14:45
@etpinard etpinard merged commit 9ee53c9 into plotly:master Jun 8, 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.

3 participants