Reactive session with JavaScript

Hello there

I'm trying to make a simple code like this one below work, but it doesn't.
Reactive session poorly documented in the JavaScript driver manual.

Here is the code:

function readTimebarDataReactive(entity,timebar) {
  start = new Date().getTime();
      map(record => record.get('item')),
      next: data => {
      complete: () => {
        timeElapsed('Completed', start)
        timebar.zoom('fit', { animate: false })
      error: err => console.log(err)

I tried it many times, always the same thing, the functions map and concat in the pipe function are not defined.


Can you share the imports of your code?
Also, where do the variable session and rxSession come from? Why are they both used here?

Thanks @florent.biville1 for the quick answer

Here is all the files of my tiny code
The import sequence is in the index.html file.

index.html.txt (509 Bytes)
neo4j.js.txt (2.7 KB)
app.js.txt (2.6 KB)

I think map and concat functions are using a module i don't have, it's usually the case with a non-defined error.