export default function () {
    const minVersionChecker = (currentVersion: string, minVersionList = [0, 0, 0]) => {
        const currentVersionList = currentVersion.split('.');

        let isMinVersion = true;
        for (let i = 0; i <= minVersionList.length - 1; i++) {
            if (Number(currentVersionList[i]) > minVersionList[i]) {
                break;
            }

            isMinVersion = Number(currentVersionList[i]) >= minVersionList[i];

            if (!isMinVersion) {
                break;
            }
        }

        return isMinVersion;
    };

    return {
        minVersionChecker,
    };
}
