re: How to start planning and build a library ? VIEW POST

FULL DISCUSSION
 

I like to start with the README (README driven development), define the API of the library I'm going to build and how Is going to be used (basically document it), then I just code it to follow that API.

E.g. I'm going to create a JS module to sum N amount of numbers, so I create a README and define it's going to be used this way:

import sum from 'cool-sum';
const result = sum(1, 2, 3, 4, 5, ...N);

Then I code it so it works as expected.

code of conduct - report abuse