pklib JavaScript library