1
0
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:
Kegan Dougal
2015-06-24 17:42:02 +01:00
parent 74fcbdee3f
commit 0be3c6837d
2 changed files with 135 additions and 14 deletions

View File

@@ -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.