support the text package
fast Text <-> JavaScript string conversion