Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Andarist/regexgen.macro
🎣 Convert your set of strings to optimized RegExps at build time.
https://github.com/Andarist/regexgen.macro
babel-plugin-macros
Last synced: 3 months ago
JSON representation
🎣 Convert your set of strings to optimized RegExps at build time.
- Host: GitHub
- URL: https://github.com/Andarist/regexgen.macro
- Owner: Andarist
- Created: 2018-08-19T08:56:45.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-16T10:24:48.000Z (almost 6 years ago)
- Last Synced: 2024-07-19T04:18:36.385Z (4 months ago)
- Topics: babel-plugin-macros
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 38
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# regexgen.macro
[![Babel Macro](https://img.shields.io/badge/babel--macro-%F0%9F%8E%A3-f5da55.svg?style=flat-square)](https://github.com/kentcdodds/babel-plugin-macros)
[![npm version](https://img.shields.io/npm/v/regexgen.macro.svg)](https://www.npmjs.com/package/regexgen.macro)
[![Build Status](https://travis-ci.org/Andarist/regexgen.macro.svg?branch=master)](https://travis-ci.org/Andarist/regexgen.macro)
[![npm](https://img.shields.io/npm/dm/regexgen.macro.svg)](https://www.npmjs.com/package/regexgen.macro)Convert your set of strings to optimized RegExps at build time with [babel macros](https://github.com/kentcdodds/babel-plugin-macros).
## Installation
```sh
npm install --save-dev regexgen.macro
```## Usage
```js
import regexgen from 'regexgen.macro'regexgen('children dangerouslySetInnerHTML key ref autoFocus defaultValue')
regexgen([
'children',
'dangerouslySetInnerHTML',
'key',
'ref',
'autoFocus',
'defaultValue',
])regexgen({
children: true,
dangerouslySetInnerHTML: true,
key: true,
ref: true,
autoFocus: true,
defaultValue: true,
})
```