group-similar-functions

1.0.2 • Public • Published

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.

/group-similar-functions/

    Package Sidebar

    Install

    npm i group-similar-functions

    Weekly Downloads

    0

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    3.77 kB

    Total Files

    5

    Last publish

    Collaborators

    • mistersingh