[core][js] cregex as object + revert previous commit