Utopian API NPM V0.4.0

in #utopian-io8 years ago (edited)
Changes made

The dependencies of the library were removed and replaced for plain code to be dependencies free. In result, it allows the library to be less vulnerable to deprecation or any other security concerns.

One of the first functions added was the one responsible to make http calls to the endpoints in the api. Before, this was done using a third party library. However, this is not needed since Node already gives you one ready to use.

The second function that was added was the one responsible to add parameters to the urls. In the original library, it was done by using a third party library called http-build-query. I believe that using this library can make the process easier. However, it is not really necessary to use it when you can make a function that receives an object and append it to the url as parameters.

In addition, comments were added to all the methods in the library, so, any other contributors can know what is going on in this code instead of being guessing it.

The last thing done was to remove the array-filter dependence. By default, a method is available to do such operations in an array.

Relevant code


Benefits


This change benefits the structure of the dependencies of the code in a positive way. For instance, the dependency tree of the module request (the one that was used to simplify the http calls) has 53 nodes and 65 links:

Screen Shot 2018-01-19 at 11.27.13 AM.png

In conclusion, removing all the nodes incorporated from third party libraries can make this module lighter and more performant.

Github account proof


Here is an image of my Github account logged in:
Screen Shot 2018-01-19 at 11.30.02 AM.png



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Hey @jaysermendez I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.04
TRX 0.33
JST 0.096
BTC 61821.29
ETH 1727.74
USDT 1.00
SBD 0.39