aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/getObjStructure.js
diff options
context:
space:
mode:
authorbrunobar79 <brunobar79@gmail.com>2018-07-03 06:49:33 +0800
committerbrunobar79 <brunobar79@gmail.com>2018-07-03 06:49:33 +0800
commita8f745f9fe74751b87f500af3857b66d4c80f45e (patch)
treef4f09d2b4227b35a6d2fd996113d36a8aa658ddd /app/scripts/lib/getObjStructure.js
parentcc11a623972acf707291d7b42d9dc2f8d7006e20 (diff)
downloadtangerine-wallet-browser-a8f745f9fe74751b87f500af3857b66d4c80f45e.tar
tangerine-wallet-browser-a8f745f9fe74751b87f500af3857b66d4c80f45e.tar.gz
tangerine-wallet-browser-a8f745f9fe74751b87f500af3857b66d4c80f45e.tar.bz2
tangerine-wallet-browser-a8f745f9fe74751b87f500af3857b66d4c80f45e.tar.lz
tangerine-wallet-browser-a8f745f9fe74751b87f500af3857b66d4c80f45e.tar.xz
tangerine-wallet-browser-a8f745f9fe74751b87f500af3857b66d4c80f45e.tar.zst
tangerine-wallet-browser-a8f745f9fe74751b87f500af3857b66d4c80f45e.zip
eslint --fix .
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)