Skip to content

Instantly share code, notes, and snippets.

@MylesBorins
Created September 29, 2014 23:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MylesBorins/ff70649de370c2c21ed6 to your computer and use it in GitHub Desktop.
Save MylesBorins/ff70649de370c2c21ed6 to your computer and use it in GitHub Desktop.
Examples Path Reduce
var output = _.groupBy(examples, function (file) {
return file.split('/')[0];
});
output = _.reduce(output, function (result, folder, key) {
result[key] = _.groupBy(folder, function (file) {
return path.dirname(file);
});
return result;
}, {});
@rozap
Copy link

rozap commented Sep 29, 2014

8/8 m8

@MylesBorins
Copy link
Author

I do not at all remember the context of this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment