yann-yinn / d8-jsonapi-querystring

Npm module to create a Drupal 8 JSON-API query string from a nested object.
6 stars 2 forks source link

Why not export buildQueryString as default? #7

Open adborden opened 6 years ago

adborden commented 6 years ago

You're exporting the function as a name, so I looked to see what was exported as default, but there's nothing else. Why not just export buildQueryString as the default?

On line 52, you can do

module.exports = buildQueryString;

//... then consume it in another file
var buildQueryString = require('d8-jsonapi-querystring');
yann-yinn commented 6 years ago

Hello True, when writing code i was not sure that they wont be any other functions. I guess i could change that but that would be a breaking change for few benefits. Any thoughts ?