Skip to content

Commit

Permalink
fix: remove superfluous regex for v scale
Browse files Browse the repository at this point in the history
  • Loading branch information
johncalvinroberts authored and musoke committed Aug 1, 2023
1 parent 013b6dc commit f9688a9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/scales/v.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import { Boulder } from '.'
import { boulderScoreToBand, GradeBandTypes } from '../GradeBands'

const vGradeRegex = /^(V[0-9]{1,2}|VB(?![0-9]))([/+])?([/-])?([0-9]{1,2})?$/i
const vGradeIrregular = /^V-([a-zA-Z]*)$/i

const VScale: GradeScale = {
displayName: 'V Scale',
name: GradeScales.VSCALE,
offset: 1000,
allowableConversionType: [GradeScales.FONT],
isType: (grade: string): boolean => {
const isVGrade = grade.match(vGradeRegex) !== null || grade.match(vGradeIrregular)
const isVGrade = grade.match(vGradeRegex)
// If there isn't a match sort it to the bottom
if (isVGrade === null) {
return false
Expand Down

0 comments on commit f9688a9

Please sign in to comment.