'use strict';

var helpers_types = require('./helpers.types-vap8QfRH.js');

const parseJSONString = (value) => {
    if (helpers_types.isString(value) && value.length) {
        try {
            console.log(value);
            const parsed = JSON.parse(value);
            if (Array.isArray(parsed) || helpers_types.isObject(parsed)) {
                return parsed;
            }
        }
        catch (e) {
            console.log(e);
            return null;
        }
    }
    return null;
};

const createArrayRange = (from, to) => {
    if (Number.isInteger(from) && Number.isInteger(to)) {
        return [...Array(to + 1).keys()].slice(from);
    }
    return [];
};
const propsValueToArray = (value) => {
    if (Array.isArray(value)) {
        return value;
    }
    else if (helpers_types.isString(value)) {
        const parsed = parseJSONString(value);
        if (Array.isArray(parsed)) {
            return parsed;
        }
    }
    return [];
};

exports.createArrayRange = createArrayRange;
exports.propsValueToArray = propsValueToArray;
//# sourceMappingURL=array.utils-DOh1gCQS.js.map

//# sourceMappingURL=array.utils-DOh1gCQS.js.map