web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
973 B

  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', {
  3. value: true
  4. });
  5. exports.default = isBuiltinModule;
  6. function _module() {
  7. const data = _interopRequireDefault(require('module'));
  8. _module = function () {
  9. return data;
  10. };
  11. return data;
  12. }
  13. function _interopRequireDefault(obj) {
  14. return obj && obj.__esModule ? obj : {default: obj};
  15. }
  16. /**
  17. * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
  18. *
  19. * This source code is licensed under the MIT license found in the
  20. * LICENSE file in the root directory of this source tree.
  21. */
  22. const EXPERIMENTAL_MODULES = ['worker_threads'];
  23. const BUILTIN_MODULES = new Set(
  24. _module().default.builtinModules
  25. ? _module().default.builtinModules.concat(EXPERIMENTAL_MODULES)
  26. : Object.keys(process.binding('natives'))
  27. .filter(module => !/^internal\//.test(module))
  28. .concat(EXPERIMENTAL_MODULES)
  29. );
  30. function isBuiltinModule(module) {
  31. return BUILTIN_MODULES.has(module);
  32. }