Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello @Nuno135.
I was using this as a dependancy for one of my projects and decided to look at the code.
I noticed that there were 2 implementations of
meme
one that used callbacks and one that used promises. The main part of this refactor was to combine it into one implementation. That would use a callback if one was given and otherwise use a promise.This version also split the implementation into several smaller functions so that they can be tested and some of the logic can be decoupled.
I also added some unit tests for both the
untils.js
and theindex.js
files. (it currently does not have 100% coverage because I did not mock the web request library).I also noticed that the
package.json
file was broken when I went to runnpm install
to I proposed a fix for that too.Github shows that there are something like 13,000 additions in this PR but that is because of the addition of the
package-lock.json
file. (Which is considered to be a best practice).Let me know if there is anything else that you would like done as part of this PR.