This package has been deprecated

Author message:

moved to @onereach/regular-expressions

@onereach/regexes-favorites-and-library

0.0.4Β β€’Β PublicΒ β€’Β Published

@onereach/regexes-favorites-and-library

πŸ—„ UI for browsing Regular Expressions from Favorites (in your OR account) and Library (in Provides account) storage & FavoritesAPI Service for CRUD operations with Favorites list.

πŸš€ 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 }

Readme

Keywords

none

Package Sidebar

Install

npm i @onereach/regexes-favorites-and-library

Weekly Downloads

0

Version

0.0.4

License

UNLICENSED

Unpacked Size

5.63 kB

Total Files

8

Last publish

Collaborators

  • onereach.admin
  • onereach.user