mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-06 12:01:40 +08:00
DISABLE_THIRD_PARTY_CHECK=NPM update R=jacktfranklin@chromium.org Bug: none Change-Id: I6bc8fd7e6f416ceae5e849ba3c4061887b940f07 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692306 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
29 lines
681 B
TypeScript
29 lines
681 B
TypeScript
declare namespace astralRegex {
|
|
interface Options {
|
|
/**
|
|
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)_
|
|
*/
|
|
readonly exact?: boolean;
|
|
}
|
|
}
|
|
|
|
/**
|
|
Regular expression for matching [astral symbols](https://everything2.com/title/astral+plane).
|
|
|
|
@returns A `RegExp` for matching astral symbols.
|
|
|
|
@example
|
|
```
|
|
import astralRegex = require('astral-regex');
|
|
|
|
astralRegex({exact: true}).test('🦄');
|
|
//=> true
|
|
|
|
'foo 🦄 💩 bar'.match(astralRegex());
|
|
//=> ['🦄', '💩']
|
|
```
|
|
*/
|
|
declare function astralRegex(options?: astralRegex.Options): RegExp;
|
|
|
|
export = astralRegex;
|