mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Move the isEmptyObj
helper function from src/shared/util.js
to test/unit/test_utils.js
Since this helper function is no longer used anywhere in the main code-base, but only in a couple of unit-tests, it's thus being moved to a more appropriate spot. Finally, the implementation of `isEmptyObj` is also tweaked slightly by removing the manual loop.
This commit is contained in:
parent
159e13c4e4
commit
88fdb482b0
4 changed files with 10 additions and 20 deletions
|
@ -793,13 +793,6 @@ function utf8StringToString(str) {
|
|||
return unescape(encodeURIComponent(str));
|
||||
}
|
||||
|
||||
function isEmptyObj(obj) {
|
||||
for (const key in obj) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function isBool(v) {
|
||||
return typeof v === "boolean";
|
||||
}
|
||||
|
@ -931,7 +924,6 @@ export {
|
|||
isArrayBuffer,
|
||||
isArrayEqual,
|
||||
isBool,
|
||||
isEmptyObj,
|
||||
isNum,
|
||||
isString,
|
||||
isSameOrigin,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue