Split source in several files. Generate API documentation. Add eslinter.
I like your library! Thanks. But I miss more documentation, so I always end reading the source code (I've learn a lot of dsp by doing it, by the way), but I feel it's too long. So here's my my contribution:
Basically I've splited the source code in modules. To prevent errors I've installed an eslinter (following your syntax conventions). I didn't modify anything inside code except the some eslinter warnings (like some missing new operators before Float32Array).
Now that the code is splitted, the dsp.js replacement is now generated into dist/dsp.js (and you get a minified version too). As bonus, users can require the modules individually to save space if only need some part of the library: require('dsp.js/lib/fft')
Then I modifed the benchmarks and the examples to run against the new generated source file and test that everything continue to working exactly the same (as far as I could: big part of the examples are too old to be running in modern browsers).
Then I've add missing jsdoc documentation, and generate the docs/API.md file.
If you feel this valuable and merge it, I would like to give some more love to the code, like writing more tests or refactoring some code to unify the style (like Biquad that uses this instead of prototype to define methods).
I would be very nice to publish it into npm.
Hope you like it!
Summary of changes:
- Split the source code into modules inside
lib/ - Generate browser ready distribution files into
dist/(replaces the olddsp.jsfile) - Add missing jsdoc documentation
- Generate API documentation into
docs/ - Update the benchmarks code to use in node
- Update the examples to use the new
dsp.min.jsfile - Add eslint to make syntax coherent and prevent errors
- Add docs/README.md with the new install and development instructions