get-new-name
getNewName
is a function that return unique numbered name from names array.
Install
npm i get-new-name
How to use
// You will get 'abc(3)' as a newName // You'll get 'abc(4)' // You'll get 'abc(2)' // You'll get 'abc'