@progress/kendo-vue-common
Version:
Kendo UI for Vue Common Utilities package
42 lines (41 loc) • 1.07 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import { isObject as i } from "./isObject.mjs";
const f = (n) => n ? new Date(n.getTime()) : null;
function l(n) {
const e = {};
return r(n, e), e;
}
function r(n, e) {
for (const t in n)
if (!(t === "__proto__" || t === "constructor" || t === "prototype") && n.hasOwnProperty(t)) {
const c = n[t];
e[t] = o(c, e[t]);
}
}
function o(n, e) {
if (Array.isArray(n))
return s(n);
if (n instanceof Date)
return f(n);
if (n && i(n)) {
const t = e || {};
return r(n, t), t;
} else
return n;
}
function s(n) {
return n.map((e) => o(e, void 0));
}
export {
l as clone,
s as cloneArray,
f as cloneDate,
r as cloneObject,
o as cloneValue
};