Neurosis Prevention Mechanism

    is-jira-key

    1.0.1 • Public • Published

    is-jira-key

    NPM version Build Status

    Test that a string is a valid and supported JIRA issue identifier

    Installation

    yarn add is-jira-key

    Usage

    const isJiraKey = require('is-jira-key')
     
    isJiraKey('BF-18') //=> true
    isJiraKey('abc-123') //=> false
    isJiraKey('X-88') //=> true
    isJiraKey('ABCDEFGHIJKL-999') //=> true
    isJiraKey('abc') //=> false
    isJiraKey('XY-Z-333') //=> false
    isJiraKey('abcDEF-33') //=> false
    isJiraKey('ABC-1') //=> true
     
    // or
     
    const {
      isJiraKey,
      containsJiraKey,
      startsWithJiraKey,
      endsWithJiraKey,
      findJiraKeys,
    } = require('is-jira-key')
     
    isJiraKey('BF-18') //=> true
    containsJiraKey('foo X-88 bar') //=> true
    startsWithJiraKey('ABC-1 foobar') //=> true
    endsWithJiraKey('foobar ABC-123') //=> true
    findJiraKeys('BF-18 foo X-88 bar') //=> ['BF-18', 'X-88']

    License

    MIT

    Keywords

    none

    Install

    npm i is-jira-key

    DownloadsWeekly Downloads

    141

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3.06 kB

    Total Files

    5

    Last publish

    Collaborators

    • jdcrensh