I would like to use Pond.js but cannot figure out how to require it Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of I would like to use Pond.js but cannot figure out how to require it without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I am using node.js (not typescript) and would like to perform some aggregation on time series data. I came across Pond.js (https://github.com/esnet/pond) which seems to have the functionality I need. Unfortunately, I was hot able to use it in my project.

I did npm install and my package.json includes: "pond": "1.0.2". The recommended approach (http://software.es.net/pond/#/) is:

const {TimeSeries} = require("pond"); // instructions write "pondjs" but that is not found

Simply looking at the module leads to undefined:

console.log("Pond:",JSON.stringify(TimeSeries));

What am I doing wrong here?

Thank you.

Answer

The problem appears to be related to using the latest version of pond which was developed in TypeScript.

The previous version (pondjs 0.8.9) has no problems executing under node.js using JavaScript following the steps above.

Documentation: https://esnet-pondjs.appspot.com/#/

We are here to answer your question about I would like to use Pond.js but cannot figure out how to require it - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji