From c4e6d7e3d18bc87a9e682349bd96fc35d7815bbc Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 7 Sep 2019 17:35:33 -0400 Subject: Add utility method for checking if a value is a standard object --- ext/bg/js/util.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ext/bg/js/util.js') 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); +} -- cgit v1.2.3