import { i as isString, b as isObject } from './helpers.types-DNztiAH0.js';

const parseJSONString = (value) => {
    if (isString(value) && value.length) {
        try {
            console.log(value);
            const parsed = JSON.parse(value);
            if (Array.isArray(parsed) || 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 (isString(value)) {
        const parsed = parseJSONString(value);
        if (Array.isArray(parsed)) {
            return parsed;
        }
    }
    return [];
};

export { createArrayRange as c, propsValueToArray as p };
//# sourceMappingURL=array.utils-CJ0U_ONv.js.map

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