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.

21 lines
643 B

  1. 'use strict';
  2. var GetIntrinsic = require('get-intrinsic');
  3. var $RegExp = GetIntrinsic('%RegExp%');
  4. // var RegExpAlloc = require('./RegExpAlloc');
  5. // var RegExpInitialize = require('./RegExpInitialize');
  6. var ToString = require('./ToString');
  7. // https://262.ecma-international.org/6.0/#sec-regexpcreate
  8. module.exports = function RegExpCreate(P, F) {
  9. // var obj = RegExpAlloc($RegExp);
  10. // return RegExpInitialize(obj, P, F);
  11. // covers spec mechanics; bypass regex brand checking
  12. var pattern = typeof P === 'undefined' ? '' : ToString(P);
  13. var flags = typeof F === 'undefined' ? '' : ToString(F);
  14. return new $RegExp(pattern, flags);
  15. };