aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/getObjStructure.js
diff options
context:
space:
mode:
authorbrunobar79 <brunobar79@gmail.com>2018-07-04 01:31:30 +0800
committerbrunobar79 <brunobar79@gmail.com>2018-07-04 01:31:30 +0800
commit3290421e2f16bd0ea1b13ba3f3d93fc4d233c750 (patch)
treedfbcfb70609fd24074dad6686f447a452313c6c6 /app/scripts/lib/getObjStructure.js
parent85fd75c21f0e64817b3d4c4d51f37649e3a81233 (diff)
parent1f0cf11af1c94e750bbc4c5238c3ee028350a6c6 (diff)
downloadtangerine-wallet-browser-3290421e2f16bd0ea1b13ba3f3d93fc4d233c750.tar.gz
tangerine-wallet-browser-3290421e2f16bd0ea1b13ba3f3d93fc4d233c750.tar.zst
tangerine-wallet-browser-3290421e2f16bd0ea1b13ba3f3d93fc4d233c750.zip
fix merge conflicts
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)