aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/getObjStructure.js
diff options
context:
space:
mode:
authorThomas <thomas.b.huang@gmail.com>2018-07-11 02:34:00 +0800
committerThomas <thomas.b.huang@gmail.com>2018-07-11 02:34:00 +0800
commit5188b727d43e91087449818dee69942c382b6d89 (patch)
tree4a89be50f09d24bc7e6ed3daf83b660f5e87380e /app/scripts/lib/getObjStructure.js
parentdd18684a5d682f48528f278284619983f13bf82f (diff)
parentf6de948e42ae633d40aef72595a01caa622a280d (diff)
downloadtangerine-wallet-browser-5188b727d43e91087449818dee69942c382b6d89.tar.gz
tangerine-wallet-browser-5188b727d43e91087449818dee69942c382b6d89.tar.zst
tangerine-wallet-browser-5188b727d43e91087449818dee69942c382b6d89.zip
Merge branch 'develop' into removeNonceTrackerFunction
Diffstat (limited to 'app/scripts/lib/getObjStructure.js')
-rw-r--r--app/scripts/lib/getObjStructure.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/scripts/lib/getObjStructure.js b/app/scripts/lib/getObjStructure.js
index 52250d3fb..9c92879fb 100644
--- a/app/scripts/lib/getObjStructure.js
+++ b/app/scripts/lib/getObjStructure.js
@@ -18,12 +18,12 @@ module.exports = getObjStructure
* Creates an object that represents the structure of the given object. It replaces all values with the result of their
* type.
*
- * @param {object} obj The object for which a 'structure' will be returned. Usually a plain object and not a class.
+ * @param {object} obj The object for which a 'structure' will be returned. Usually a plain object and not a class.
* @returns {object} The "mapped" version of a deep clone of the passed object, with each non-object property value
* replaced with the javascript type of that value.
*
*/
-function getObjStructure(obj) {
+function getObjStructure (obj) {
const structure = clone(obj)
return deepMap(structure, (value) => {
return value === null ? 'null' : typeof value
@@ -38,7 +38,7 @@ function getObjStructure(obj) {
* @param {Function} visit The modifier to apply to each non-object property value
* @returns {object} The modified object
*/
-function deepMap(target = {}, visit) {
+function deepMap (target = {}, visit) {
Object.entries(target).forEach(([key, value]) => {
if (typeof value === 'object' && value !== null) {
target[key] = deepMap(value, visit)