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:
commit
cc499505df
4 changed files with 10 additions and 23 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue