Repository URL to install this package:
|
Version:
2.0.1 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fromArrayToSet_1 = require("./fromArrayToSet");
const isSet_1 = require("./isSet");
const isObj_1 = require("../obj/check/isObj");
const toArray_1 = require("../array/cast/toArray");
const isArray_1 = require("../array/check/isArray");
const fromObjToSet = (x) => fromObjToSet(x);
const fromAnyToSet = (x) => fromArrayToSet_1.default(toArray_1.toArray(x));
const toSet = (x) => {
if (isArray_1.isArray(x))
return fromArrayToSet_1.default(x);
else if (isSet_1.isSet(x))
return x;
else if (isObj_1.isObj(x))
return fromObjToSet(x);
else
return fromAnyToSet(x);
};
exports.toSet = toSet;
exports.default = toSet;
//# sourceMappingURL=toSet.js.map