Collection of pure JS helper methods (required by other pk libraries, can be used stand-alone)