Closed karuppiah7890 closed 7 years ago
Very much agreed! It should go in the README.
I'll try to get this done this weekend, or you could add it if you're interested :)
(let me know if you want to do it and I'll leave it to you)
I am new to the repository. I need some guidance on this. And it's API documentation, I think people who created the API should do it, or help me do it. But the latter is kind of double work in this case, no ?
I don't mind double work if you're interested in working on it (always happy to support someone contributing to mathsteps
!) but am also quite fine to do it on my own - just wanted to give you the option :)
Okay! Let me help :smile:
We can discuss here or in gitter.im and I am in India, UTC+05:30 time zone.
It's night now, for me. We can discuss tomorrow!
goodnight! 🌃
oo I was going to make a gitter for mathsteps! I'm so glad you suggested it too.
I'm thinking something very similar to the existing expression example in the README, just add one for equations
e.g. building on your example above
const mathsteps = require('.');
const steps = mathsteps.solveEquation('2x + 3x = 35');
console.log(steps);
steps.forEach(step => {
// e.g. before change: 2x + 3x = 35
console.log("before change: " + step.oldEquation.print());
// e.g. change: SIMPLIFY_LEFT_SIDE
console.log("change: " + step.changeType);
// e.g. after change: 5x = 35
console.log("after change: " + step.newEquation.print());
// e.g. # of substeps: 2
console.log("# of substeps: " + step.substeps.length);
});
what do you think?
Pretty neat code! @evykassirer :smile:
Do add this one as an example for equations ! :smile: Just remove the console.log(steps)
line since it puts up lots of clumsy values. The forEach
function part shows em in a neat manner.
oh yes! I meant to take that line out oooops.
Do you want to make the pull request that adds this example?
Sure! :+1:
I created a separate issue for the equation solving example. #102 And created a PR #103 for the same
great! would you like to see more thorough API docs too? or do you think the example you added gives enough information (which would mean we can close this issue)
I think a more thorough API documentation is needed since there are some more functionalities, like substeps
that has some information same as steps
. But it's not mentioned and we can't just assume that steps
and substeps
are of same type. So, it's good if we provide this and more info in the API docs. We can keep it small and simple!
sweet, I think it should go in the wiki #66
Cool, so shall we close this issue ? or just keep it open till we add docs Wiki ?
And woah, Wiki list has lots of stuff, it can help contributors to get familiar with the code base :+1: and contribute with more ease!
eh, let's just close this issue, and have it part of the wiki issue instead.
yeah! I'm excited about the wiki 👍
I didn't know how to use the
mathsteps.solveEquation()
function. And the README is misleading, as if we just have to changemathsteps.simplifyExpression()
tomathsteps.solveEquation()
to solve an equation. Finally I had to see some tests and understand how to use the API and ended up coding this small piece of code to see how the lib worksI personally feel there should be documentation on API usage