index.js 1.0 KB

123456789101112131415161718192021222324
  1. "use strict";
  2. const { URL, URLSearchParams } = require("./webidl2js-wrapper");
  3. const urlStateMachine = require("./dist/url-state-machine");
  4. const percentEncoding = require("./dist/percent-encoding");
  5. const sharedGlobalObject = {};
  6. URL.install(sharedGlobalObject, ["Window"]);
  7. URLSearchParams.install(sharedGlobalObject, ["Window"]);
  8. exports.URL = sharedGlobalObject.URL;
  9. exports.URLSearchParams = sharedGlobalObject.URLSearchParams;
  10. exports.parseURL = urlStateMachine.parseURL;
  11. exports.basicURLParse = urlStateMachine.basicURLParse;
  12. exports.serializeURL = urlStateMachine.serializeURL;
  13. exports.serializeHost = urlStateMachine.serializeHost;
  14. exports.serializeInteger = urlStateMachine.serializeInteger;
  15. exports.serializeURLOrigin = urlStateMachine.serializeURLOrigin;
  16. exports.setTheUsername = urlStateMachine.setTheUsername;
  17. exports.setThePassword = urlStateMachine.setThePassword;
  18. exports.cannotHaveAUsernamePasswordPort = urlStateMachine.cannotHaveAUsernamePasswordPort;
  19. exports.percentDecode = percentEncoding.percentDecodeBytes;