You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-18 05:42:00 +03:00
Add utils UTs. Remove unused functions.
This commit is contained in:
14
lib/utils.js
14
lib/utils.js
@@ -215,20 +215,6 @@ module.exports.checkObjectHasNoAdditionalKeys = function(obj, allowedKeys) {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Assigns all the properties in src to dst. If these properties are Objects,
|
||||
* then both src and dst will refer to the same thing.
|
||||
* @param {Object} src The object to copy properties from.
|
||||
* @param {Object} dst The object to write properties to.
|
||||
*/
|
||||
module.exports.shallowCopy = function(src, dst) {
|
||||
for (var i in src) {
|
||||
if (src.hasOwnProperty(i)) {
|
||||
dst[i] = src[i];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Deep copy the given object. The object MUST NOT have circular references and
|
||||
* MUST NOT have functions.
|
||||
|
Reference in New Issue
Block a user