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.

43 lines
724 B

4 years ago
  1. # astral-regex [![Build Status](https://travis-ci.org/kevva/astral-regex.svg?branch=master)](https://travis-ci.org/kevva/astral-regex)
  2. > Regular expression for matching astral symbols
  3. ## Install
  4. ```
  5. $ npm install astral-regex
  6. ```
  7. ## Usage
  8. ```js
  9. const astralRegex = require('astral-regex');
  10. astralRegex({exact: true}).test('');
  11. //=> true
  12. ```
  13. ## API
  14. ### astralRegex([options])
  15. Returns a `RegExp` for matching astral symbols.
  16. #### options
  17. Type: `Object`
  18. ##### exact
  19. Type: `boolean`<br>
  20. Default: `false` *(Matches any astral symbols in a string)*
  21. Only match an exact string. Useful with `RegExp#test()` to check if a string is a astral symbol.
  22. ## License
  23. MIT © [Kevin Mårtensson](https://github.com/kevva)