is-jira-key
v1.0.1
Published
Test that a string is a valid and supported JIRA issue identifier
Downloads
460
Readme
is-jira-key
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