15 July 2020

How to split string in ES6. I would suggest the method of using split function from lodash. In modern JavaScript frontend you use a lot of dependencies and lodash is used in almost every project. Leave function maintenance to the communities keen eye and use lodash.

Source code viewer
  1. import _split from 'lodash/split';
  2.  
  3. _split([string=''], separator, [limit]);
Programming Language: ECMAScript