no message
Former-commit-id: e8974f6e7f2bd30aba21642072ec81e38a597e8e Former-commit-id: 5c20e0d4058d2a4e9a17deec64597678e736ef32 Former-commit-id: b0dd76f4e1f5082dd24c24e0fbb2dad134bab31b
This commit is contained in:
23
src/utils/clone.js
Normal file
23
src/utils/clone.js
Normal file
@@ -0,0 +1,23 @@
|
||||
const clone = (obj) => {
|
||||
var o
|
||||
if (typeof obj === 'object') {
|
||||
if (obj === null) {
|
||||
o = null
|
||||
} else {
|
||||
if (obj instanceof Array) {
|
||||
o = []
|
||||
for (var i = 0, len = obj.length; i < len; i++) {
|
||||
o.push(clone(obj[i]))
|
||||
}
|
||||
} else {
|
||||
o = {}
|
||||
for (var j in obj) {
|
||||
o[j] = clone(obj[j])
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { o = obj }
|
||||
return o
|
||||
}
|
||||
|
||||
export default clone
|
||||
1
src/utils/htmlFormat.js.REMOVED.git-id
Normal file
1
src/utils/htmlFormat.js.REMOVED.git-id
Normal file
@@ -0,0 +1 @@
|
||||
637e1ab54544a3296a996a352314ab659e5b43a2
|
||||
Reference in New Issue
Block a user