Lots of people said that there were no javascript pivot table libraries. Actually, that's not true. As I know, flexmonster pivot table component is a mature implementation. And recently I have a pure javascript implementation. It supports CSV data just exactly like excel and also I am adding OLAP support as well.
webpivottable.com
bi2.io
If you want more functionality that Pivot.js in your web application, you can give it a try.