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.

28 lines
681 B

  1. declare namespace astralRegex {
  2. interface Options {
  3. /**
  4. Only match an exact string. Useful with `RegExp#test()` to check if a string is a astral symbol. Default: `false` _(Matches any astral symbols in a string)_
  5. */
  6. readonly exact?: boolean;
  7. }
  8. }
  9. /**
  10. Regular expression for matching [astral symbols](https://everything2.com/title/astral+plane).
  11. @returns A `RegExp` for matching astral symbols.
  12. @example
  13. ```
  14. import astralRegex = require('astral-regex');
  15. astralRegex({exact: true}).test('🦄');
  16. //=> true
  17. 'foo 🦄 💩 bar'.match(astralRegex());
  18. //=> ['🦄', '💩']
  19. ```
  20. */
  21. declare function astralRegex(options?: astralRegex.Options): RegExp;
  22. export = astralRegex;