[cutes] implementation suitable for any js engine