这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@jordanshatford
Copy link
Contributor

NOTE: Blob class is fully supported Node 18+ meaning we directly check value instanceof Blob. And because File extends Blob, File instanceof Blob === true.

@jordanshatford jordanshatford requested a review from mrlubos March 30, 2024 03:43
@codecov
Copy link

codecov bot commented Mar 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.84%. Comparing base (7b66dfa) to head (3d18aae).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #186   +/-   ##
=======================================
  Coverage   91.84%   91.84%           
=======================================
  Files          66       66           
  Lines        3935     3935           
  Branches      476      476           
=======================================
  Hits         3614     3614           
  Misses        320      320           
  Partials        1        1           
Flag Coverage Δ
unittests 91.84% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

/^(Blob|File)$/.test(value.constructor.name) &&
/^(Blob|File)$/.test(value[Symbol.toStringTag])
);
return value instanceof Blob;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible to inline this call wherever it's used instead of having a separate function? It's so straightforward now that we don't need a wrapper function around it...

@jordanshatford jordanshatford merged commit 7558299 into main Mar 30, 2024
@jordanshatford jordanshatford deleted the feat/file-or-blob branch March 30, 2024 04:09
@github-actions github-actions bot mentioned this pull request Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants