implementation for library, sructure and buffer generators for javascript