How to use 'pivottable' npm in wix code?

Hi, recently I was working on how to make pivot table of the wix database, so I found a npm that meet my requirements. And the npm I found is ‘pivottable’ and I placed a request and it got accepted. But now the problem is I don’t know how to use it.

Here is the link to the npm Page -

I tried this way but didn’t work -

import pivot from 'pivottable';

$w("#columnStip1").pivot( // Error : 'pivot' doesn't exist on columnStip1 (CODE ERROR)
        {color: "blue", shape: "circle"},
        {color: "red", shape: "triangle"}
        rows: ["color"],
        cols: ["shape"]

-----------------RUN TIME ERROR--------------
There was an error in your script
$.extend is not a function

Thanks in advance!!