fave77 / Mathball

A JavaScript library for Competitive Programming
https://fave77.github.io/Mathball-Docs/
MIT License
99 stars 49 forks source link

Added convert function. Removing degree and radian #149

Closed Shubhayu-Das closed 5 years ago

Shubhayu-Das commented 5 years ago

Do the checklist before submitting the PR:

Q: What version of Node.js you've used in the project? (e.g. Node v10.11.0) A:v11.6.0 Q: Mention the Issue Number! (e.g. Fixed #8) A:#140

codecov-io commented 5 years ago

Codecov Report

Merging #149 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #149   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          78     77    -1     
  Lines        1273   1292   +19     
=====================================
+ Hits         1273   1292   +19
Impacted Files Coverage Δ
src/convert/index.js 100% <100%> (ø)
src/index.js 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7ff791f...af99c34. Read the comment docs.

fave77 commented 5 years ago

Ok, but if I do so, then it wouldn't be M.convert(...) anymore, would it? I will have to use the radian and degree modules which are there in the current version.

Why not? ...check the implementation of other modules like avg, count. I'm not even sure how is it working with your exports.convert and convert = require('./convert'), cause in your case it should have been convert = require('./convert').convert

Shubhayu-Das commented 5 years ago

Sorry, I figured it out. I'm using module.exports now. using exports.something is just a reference to module.exports = something. I guess that's why its working. In the test module, I was using M.convert. Now it's just convert(...).

Shubhayu-Das commented 5 years ago

I'll fix it by 7pm . Sorry about that 😅

Shubhayu-Das commented 5 years ago

I am closing this pull request and making a fresh one. Extremely sorry for the inconvenience.