1.0.2 • Published 1 year ago

group-similar-functions v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

groupSimilarFunctions

Takes an array of functions and sorts them by putting functions with similar names together.

For e.g.

If you have functions names like

['balance', 'cats', 'setBalance', 'removeCat']

then it will re-arrange them and return

['cats', 'removeCat', 'balance', 'setBalance']

Usage

const groupSimilarFunctions = require('groupSimilarFunctions');
const input = ['balance', 'cats', 'setBalance', 'removeCat']
const output = groupSimilarFunctions(input);
console.log(output);

Contribution

Please submit a PR.