mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-07-03 09:35:05 +00:00
Make project multiplatform (#91)
* Prefer `c ? x : y` over `c && x || y` * Avoid unnecessary asssignment expressions * Prefer switch statements over object lookup tables * Add an .editorconfig * Fix style issues * Fix mentioned issues * remove dynamic require * Introduce esbuild as a build system * Add cross platform stream api * Replace 'fs' with custom cache api * Add cross platform crypto api * Add misc. dependencies * Create multi-platform tests * Update package-lock, Add build files * Pull from upstream * Fix linting issues, and update build files * Fix comments issues * Regenerate types, add source maps Co-authored-by: bob <bob.varioa@gmail.com>
This commit is contained in:
6
scripts/globals.js
Normal file
6
scripts/globals.js
Normal file
@@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
global.XMLHttpRequest = class extends require('xhr2') {
|
||||
// This is for browser-like environments not nessacarily a browser
|
||||
// So disabling this is okay, sort of
|
||||
_restrictedHeaders = {};
|
||||
};
|
||||
Reference in New Issue
Block a user