climbing-grade-recognizer
v0.9.0
Published
Module that simply recognises which climbing grade system is provided
Downloads
4
Readme
Climbing grade recognizer
Climbing grade recognizer is a module wirtten in JavaScript (ES6), that simply recognizes which climbing grade system is provided.
Installation
With node:
npm install climbing-grade-recognizer
Usage
Recognize a climbing grade system.
API
recognize
Parameter: string
Return an array of possible systems or throws an error when provided parameter is not a string.
Node
var GradeRecognizer = require('climbing-grade-recognizer');
GradeRecognizer.recognize('6a'); // ['french', 'font']
GradeRecognizer.recognize('VI.2'); // ['kurtyki']
GradeRecognizer.recognize('5.12a'); // ['yds']
GradeRecognizer.recognize('V12'); // ['hueco']
GradeRecognizer.recognize('E8'); // ['british']
GradeRecognizer.recognize('35'); // ['australian']
GradeRecognizer.recognize('1'); // [ 'french', 'british' ]
Systems
- 'french'
- 'yds'
- 'kurtyki'
- 'uiaa'
- 'british'
- 'australian'
- 'font'
- 'hueco'
Tests
npm test