1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Merge pull request #16123 from Snuffleupagus/Node-16

[api-minor] Update the minimum supported Node.js version to 16
This commit is contained in:
Tim van der Meij 2023-03-11 14:49:59 +01:00 committed by GitHub
commit cc499505df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 23 deletions

View file

@ -16,28 +16,6 @@
import { isNodeJS } from "./is_node.js";
// Support: Node.js<16.0.0
(function checkNodeBtoa() {
if (globalThis.btoa || !isNodeJS) {
return;
}
globalThis.btoa = function (chars) {
// eslint-disable-next-line no-undef
return Buffer.from(chars, "binary").toString("base64");
};
})();
// Support: Node.js<16.0.0
(function checkNodeAtob() {
if (globalThis.atob || !isNodeJS) {
return;
}
globalThis.atob = function (input) {
// eslint-disable-next-line no-undef
return Buffer.from(input, "base64").toString("binary");
};
})();
// Support: Node.js
(function checkDOMMatrix() {
if (globalThis.DOMMatrix || !isNodeJS) {