Simplification of JS native function