@adtonos/mstl-node
v1.0.1
Published
Javascript bindings of MSTL based on STL implementation from ankane/stl-cpp
Readme
mstl-node
Javascript bindings of MSTL based on STL implementation from ankane/stl-cpp
Requirements
- C++ compiler compatible with
node-addon-api - NodeV20 or higher
npmclang-format(for pre-commit hook)
How to use
Install the package:
npm install --save @adtonos/mstl-nodeUse it in your code:
import { fit } from '@adtonos/mstl-node';
// ...
const series = new Float32Array([
5.0, 9.0, 2.0, 9.0, 0.0, 6.0, 3.0, 8.0, 5.0, 8.0, 7.0, 8.0, 8.0, 0.0, 2.0,
5.0, 0.0, 5.0, 6.0, 7.0, 3.0, 6.0, 1.0, 4.0, 4.0, 4.0, 3.0, 7.0, 5.0, 8.0,
]);
const results = fit(series, [7, 10]);
results.seasonalContributing
Any contributions are welcome, please submit a PR with ready suggestion from your fork and/or create an issue and we will be happy to discuss.
How to compile/run
git clone [email protected]:adtonos/mstl-node.git
npm install
npm testTips
Generating compile_commands.json
Many IDEs use compile_commands.json for LSP setup, one easy way to generate them is to use bear
bear -- npx node-gyp rebuild --verbose