[core][njs][js] textformatter: rename few functions and attributs