Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@supertenant/core / src / util / clone.js
Size: Mime:
// (c) Copyright 2023 Supertenant Ltd. - all rights reserved.
// See LICENSE file in project root for license terms.
"use strict";module.exports=function clone(x){let r;if(null==x)return x;if(x.constructor===Array){r=[];for(let i=0,n=x.length;i<n;i++)r[i]=clone(x[i])}else{if("object"!=typeof x)return x;r={};for(const key in x)x.hasOwnProperty(key)&&(r[key]=clone(x[key]))}return r};