This is an update of the polygonal package to use es6 and to allow testing of whether a number is a polygonal number or which polygonal the number is polygonal to. This is because I needed it for my own purposes and because the only other package seems abandoned.
TBD (for now, check the tests)