# astral-regex

> Regular expression for matching astral symbols

Latest version **2.0.0** (published 2019-04-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install astral-regex
pnpm add astral-regex
yarn add astral-regex
bun add astral-regex
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-04-05 |
| First published | 2017-07-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 34 |
| Author | Kevin Mårtensson |
| Maintainers | kevva |
| Keywords | astral, emoji, regex, surrogate |

## Links

- npm: https://www.npmjs.com/package/astral-regex
- Repository: https://github.com/kevva/astral-regex
- Homepage: https://github.com/kevva/astral-regex#readme
- Issues: https://github.com/kevva/astral-regex/issues
- npm.io page: https://npm.io/package/astral-regex

## Recent versions

- 2.0.0 (latest) — 2019-04-05
- 1.0.0 — 2017-07-21

## README

# astral-regex [![Build Status](https://travis-ci.org/kevva/astral-regex.svg?branch=master)](https://travis-ci.org/kevva/astral-regex)

> Regular expression for matching [astral symbols](https://everything2.com/title/astral+plane)


## Install

```
$ npm install astral-regex
```


## Usage

```js
const astralRegex = require('astral-regex');

astralRegex({exact: true}).test('🦄');
//=> true

'foo 🦄 💩 bar'.match(astralRegex());
//=> ['🦄', '💩']
```


## API

### astralRegex([options])

Returns a `RegExp` for matching astral symbols.

#### options

Type: `Object`

##### exact

Type: `boolean`<br>
Default: `false` *(Matches any astral symbols in a string)*

Only match an exact string. Useful with `RegExp#test()` to check if a string is a astral symbol.


## License

MIT © [Kevin Mårtensson](https://github.com/kevva)

---
_Source: https://npm.io/package/astral-regex · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
