diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-09-07 17:35:33 -0400 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-09-10 20:09:33 -0400 |
commit | c4e6d7e3d18bc87a9e682349bd96fc35d7815bbc (patch) | |
tree | c5fd842e9bb41e240c0790059bf68326e3e980f6 /ext/bg/js/util.js | |
parent | 05ce350792fd60c1721bff4d0fb971e2bec24818 (diff) |
Add utility method for checking if a value is a standard object
Diffstat (limited to 'ext/bg/js/util.js')
-rw-r--r-- | ext/bg/js/util.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js index 3dc7c900..79229229 100644 --- a/ext/bg/js/util.js +++ b/ext/bg/js/util.js @@ -104,3 +104,7 @@ function utilReadFile(file) { reader.readAsBinaryString(file); }); } + +function utilIsObject(value) { + return typeof value === 'object' && value !== null && !Array.isArray(value); +} |