0.5.15 • Published 3 years ago
@onereach/regex-helper v0.5.15
💔 DEPRECATED!!! USE @onereach/regular-expressions instead
@onereach/regex-helper
🔍 Vue component for creating and testing Regular Expressions.
🚀 Usage example
<template>
<RegexHelper :regex.sync="regex" />
</template>
<script>
import { RegexHelper, getRegexBodyFlags } from '@onereach/regex-helper'
export default {
components: {
RegexHelper
},
data () {
return {
regex: '/\d{2}/'
}
},
watch: {
regex (v) {
const { body, flags } = getRegexBodyFlags(v)
console.log('regex change', new RegExp(body, flags))
}
}
}
</script>
⚙ Props
{
/**
* RegExp value
*/
regex: {
type: String,
default: ''
},
/**
* Testable text value
*/
testInput: {
type: String,
default: ''
},
/**
* Error message. If not empty component will be in error state.
*/
error: {
type: String,
default: ''
},
/**
* Input field for RegExp
*/
regexInputVisibility: {
type: Boolean,
default: true
},
/**
* Extended information about RegExp parts
*/
regexDetailsVisibility: {
type: Boolean,
default: false
},
/**
* Docs/help information popup
*/
docsVisibility: {
type: Boolean,
default: false
},
/**
* Testable text input field
*/
testInputVisibility: {
type: Boolean,
default: false
},
/**
* Extended information about findings in testInput
*/
matchDetailsVisibility: {
type: Boolean,
default: false
},
/**
* Text input labels
*/
labels: {
type: Object,
default: () => ({ regex: '', testInput: '' })
}
readonly: {
type: Boolean,
default: false
},
}
🔥 Events
Event | Payload | Description |
---|---|---|
matchFound | arrayOfMatches | Emitted when got match in testInput |
focus | null | Emitted when regex input field is focused |
blur | null | Emitted when regex input field is unfocused |
Exports
{ RegexHelper, RegexDocs, getRegexBodyFlags }
0.5.10
3 years ago
0.5.11
3 years ago
0.5.14
3 years ago
0.5.15
3 years ago
0.5.13
3 years ago
0.5.8
3 years ago
0.5.9
3 years ago
0.5.7
3 years ago
0.5.6
3 years ago
0.5.5
3 years ago
0.5.4
3 years ago
0.5.3
3 years ago
0.5.2
3 years ago
0.5.1
3 years ago
0.5.0
3 years ago
0.4.8
3 years ago
0.4.7
4 years ago
0.4.6
4 years ago
0.4.5
4 years ago
0.4.4
4 years ago
0.4.3
4 years ago
0.4.1
4 years ago
0.4.2
4 years ago
0.4.0
4 years ago
0.3.2
4 years ago
0.3.1
4 years ago
0.3.0
4 years ago
0.2.3
4 years ago
0.2.4
4 years ago
0.2.1
4 years ago
0.2.2
4 years ago
0.2.0
4 years ago
0.1.2
4 years ago
0.1.0
4 years ago
0.0.17
4 years ago
0.0.16
4 years ago
0.0.15
4 years ago
0.0.10
4 years ago
0.0.11
4 years ago
0.0.12
4 years ago
0.0.13
4 years ago
0.0.14
4 years ago
0.0.9
4 years ago
0.0.8
4 years ago
0.0.7
4 years ago
0.0.6
4 years ago
0.0.5
4 years ago
0.0.4
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago